commit ea6f006b3efc8b1f711ad9b11f5a24355b6bfcb8 Author: JvanKatwijk Date: Tue Mar 6 20:05:31 2018 +0100 first commit diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6377cfe --- /dev/null +++ b/.travis.yml @@ -0,0 +1,74 @@ +language: c++ +compiler: gcc +sudo: require +dist: trusty + +before_install: + - sudo add-apt-repository ppa:beineri/opt-qt532-trusty -y + - sudo apt-get update -qq + +install: + - sudo apt-get install qt4-qmake build-essential g++ + - sudo apt-get install libsndfile1-dev qt4-default libfftw3-dev portaudio19-dev + - sudo apt-get install libfaad-dev zlib1g-dev libusb-1.0-0-dev mesa-common-dev + - sudo apt-get install libgl1-mesa-dev libqt4-opengl-dev libsamplerate-dev libqwt-dev + + - cp CMakeLists.txt-qt4 CMakeLists.txt +script: + - # sed -i -e 's|CONFIG.*sdrplay||g' qt-dab.pro + - # sed -i -e 's|CONFIG.*airspy||g' qt-dab.pro + - # sed -i -e 's|CONFIG.*spectrum||g' qt-dab.pro + - cmake . -DDABSTICK=ON -DAIRSPY=ON -DSDRPLAY=ON -DSPECTRUM=ON -DCMAKE_INSTALL_PREFIX=/usr + - make -j4 + - # sudo make DESTIDR=appdir install ; sudo chown -R $USER appdir ; find appdir/ + - ls -lh . + - mkdir -p appdir/usr/bin + - cp qt-dab-1.0-alpha appdir/usr/bin/qt-dab + - mkdir -p appdir/usr/lib + - mkdir -p appdir/usr/share/applications ; cp qt-dab.desktop appdir/usr/share/applications + - cp screenshot_qt-dab.png appdir/qt-dab.png + - touch appdir/qt-dab.png # Dear upstream developers, please provide an application icon + + - wget http://sm5bsz.com/linuxdsp/hware/rtlsdr/rtl-sdr-linrad4.tbz + - tar xvfj rtl-sdr-linrad4.tbz + - cd rtl-sdr-linrad4 + - mkdir build + - cd build + - cmake .. -DDETACH_KERNEL_DRIVER=ON -DCMAKE_INSTALL_PREFIX=../../appdir/usr + - make + - make install + - cd .. + - cd .. + + - sudo apt-get install build-essential cmake libusb-1.0-0-dev pkg-config + - wget https://github.com/airspy/host/archive/master.zip + - unzip master.zip + - cd airspyone_host-master + - mkdir build + - cd build +# udev rules are installed separately + - cmake ../ -DCMAKE_INSTALL_PREFIX=../../appdir/usr + - make + - make install + - cd .. + - cd .. + - ls -l appdir/usr/lib +after_success: + - wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" + - chmod a+x linuxdeployqt*.AppImage + - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH + - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/* -bundle-non-qt-libs + - # Workaround for https://github.com/probonopd/linuxdeployqt/issues/31#issuecomment-289267637 + - ./linuxdeployqt*.AppImage --appimage-extract + - find appdir/usr/plugins/ -type f -exec squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/../../lib' {} \; + - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/* -bundle-non-qt-libs + - # Workaround for https://github.com/JvanKatwijk/qt-dab/issues/34 + - # find /usr/lib/ -type f -name librtlsdr.so* -exec cp {} appdir/usr/lib/librtlsdr.so \; + - chmod a+x appimage/* ; rm appdir/AppRun ; cp appimage/* appdir/ + - export PATH=squashfs-root/usr/bin/:$PATH # Make it pick up our private patched mksquashfs; https://github.com/plougher/squashfs-tools/pull/13/files + - squashfs-root/usr/bin/appimagetool $(readlink -f ./appdir/) + - find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq + - curl --upload-file ./Qt_DAB*.AppImage https://transfer.sh/Qt_DAB-git.$(git rev-parse --short HEAD)-x86_64.AppImage + - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh + - bash ./upload.sh ./Qt_DAB*.AppImage + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..27f52d2 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,15 @@ +Qt-DAB is written and maintained by + Jan van Katwijk + Lazy Chair Computing + +with many thanks to + + Stefan Pöschel + probonopd +and especially to + Andreas Mikula +and + Athanasios Oikonomou + +for continuous and valuable input. + diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3814be7 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,539 @@ +cmake_minimum_required( VERSION 2.8.11 ) +set (objectName dabradio) +set (CMAKE_CXX_FLAGS "${CMAKE_XCC_FLAGS} -Wall -std=c++11 -flto") +set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto") + +set(CMAKE_AUTORCC ON) +if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set (CMAKE_INSTALL_PREFIX "/usr/local/bin" CACHE PATH "default install path" FORCE ) +endif() +#set (CMAKE_INSTALL_PREFIX /usr/local/bin) + +# modify if you want + +if(MINGW) + add_definitions ( -municode) +endif() + +IF(EXISTS (".git") AND IS_DIRECTORY (".git")) + execute_process ( + COMMAND git rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_COMMIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +endif () + +if(GIT_COMMIT_HASH) + add_definitions("-DGITHASH=\"${GIT_COMMIT_HASH}\"") +else () + add_definitions ("-DGITHASH=\" \"") +endif() + + +######################################################################## +# select the release build type by default to get optimization flags +######################################################################## +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") + message(STATUS "Build type not specified: defaulting to release.") +endif(NOT CMAKE_BUILD_TYPE) +set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") + +### make sure our local CMake Modules path comes first +list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) + +###################################################################### +# +##################################################################### +# +# default value + set(USE_PORTAUDIO true) + +if(DEFINED AIRSPY) + set(AIRSPY true) +endif () + +if(DEFINED SDRPLAY) + set(SDRPLAY true) +endif () + +if(DEFINED RTLSDR) + set(RTLSDR true) +endif () + +if(DEFINED RTLTCP) + set(RTLTCP true) +endif () + + +#add_definitions (-DTHREADED_DECODING) # uncomment for use for an RPI +# +######################################################################## + + find_package (PkgConfig) + find_package (LSBId) + + find_package (Qt5Core REQUIRED) + find_package (Qt5Widgets REQUIRED) + find_package (Qt5Network REQUIRED) + include_directories ( + ${Qt5Network_INCLUDE_DIRS} + ) + + find_package(FFTW3f) + if (NOT FFTW3F_FOUND) + message(FATAL_ERROR "please install FFTW3") + endif () + + find_package(Faad) + if (NOT FAAD_FOUND ) + message(FATAL_ERROR "please install libfaad") + endif () + + find_package(zlib) + if (NOT ZLIB_FOUND) + message(FATAL_ERROR "please install libz") + endif () + list(APPEND extraLibs ${ZLIB_LIBRARY}) + + find_package(LibSndFile) + if (NOT LIBSNDFILE_FOUND) + message(FATAL_ERROR "please install libsndfile") + endif () + list(APPEND extraLibs ${LIBSNDFILE_LIBRARY}) + + find_package(LibSampleRate) + if (NOT LIBSAMPLERATE_FOUND) + message(FATAL_ERROR "please install libsamplerate") + endif () + list(APPEND extraLibs ${LIBSAMPLERATE_LIBRARY}) + + find_library (PTHREADS pthread) + if (NOT(PTHREADS)) + message (FATAL_ERROR "please install libpthread") + else (NOT(PTHREADS)) + set (extraLibs ${extraLibs} ${PTHREADS}) + endif (NOT(PTHREADS)) + +####################################################################### +# +# Here we really start + + include_directories ( + ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} + ${QT5Widgets_INCLUDES} + ${QT_QTCORE_INCLUDE_DIR} + ${QT_QTGUI_INCLUDE_DIR} + . + ./ + ./includes + ./dab-scope + ./includes/ofdm + ./includes/backend + ./includes/backend/viterbi_768 + ./includes/backend/audio + ./includes/backend/data + ./includes/backend/data/journaline + ./includes/various + ./includes/output + ./includes/scopes-qwt6 + ./devices + ./devices/rawfiles + ./devices/wavfiles + /usr/include/ + ) + + set (${objectName}_HDRS + ./dab-processor.h + ./dab-scope/spectrum-handler.h + ./includes/ofdm/sample-reader.h + ./includes/dab-constants.h + ./includes/ofdm/phasereference.h + ./includes/ofdm/phasetable.h + ./includes/ofdm/freq-interleaver.h + ./includes/backend/viterbi_768/viterbi-768.h + ./includes/backend/protection.h + ./includes/backend/uep-protection.h + ./includes/backend/eep-protection.h + ./includes/backend/firecode-checker.h + ./includes/backend/frame-processor.h + ./includes/backend/charsets.h + ./includes/backend/galois.h + ./incluces/backend/reed-solomon.h + ./includes/backend/msc-handler.h + ./includes/backend/virtual-backend.h + ./includes/backend/audio-backend.h + ./includes/backend/data-backend.h + ./includes/backend/audio/faad-decoder.h + ./includes/backend/audio/mp4processor.h + ./includes/backend/audio/mp2processor.h + ./includes/backend/data/mot-databuilder.h + ./includes/backend/data/virtual-datahandler.h + ./includes/backend/data/pad-handler.h + ./includes/backend/data/mot-data.h + ./includes/backend/data/data-processor.h + ./devices/virtual-input.h + ./devices/rawfiles/rawfiles.h + ./devices/wavfiles/wavfiles.h + ./includes/output/fir-filters.h + ./includes/output/audio-base.h + ./includes/output/newconverter.h + ./includes/various/fft-handler.h + ./includes/various/ringbuffer.h + ./includes/various/Xtan2.h + ./includes/various/dab-params.h + ./includes/various/band-handler.h + ./includes/various/text-mapper.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./main.cpp + ./dab-processor.cpp + ./dab-scope/spectrum-handler.cpp + ./src/ofdm/sample-reader.cpp + ./src/ofdm/ofdm-decoder.cpp + ./src/ofdm/phasereference.cpp + ./src/ofdm/phasetable.cpp + ./src/ofdm/freq-interleaver.cpp + ./src/backend/viterbi_768/viterbi-768.cpp + ./src/backend/viterbi_768/spiral-no-sse.c + ./src/backend/fic-handler.cpp + ./src/backend/protection.cpp + ./src/backend/eep-protection.cpp + ./src/backend/uep-protection.cpp + ./src/backend/fib-processor.cpp + ./src/backend/firecode-checker.cpp + ./src/backend/frame-processor.cpp + ./src/backend/protTables.cpp + ./src/backend/charsets.cpp + ./src/backend/galois.cpp + ./src/backend/reed-solomon.cpp + ./src/backend/msc-handler.cpp + ./src/backend/virtual-backend.cpp + ./src/backend/audio-backend.cpp + ./src/backend/data-backend.cpp + ./src/backend/audio/faad-decoder.cpp + ./src/backend/audio/mp4processor.cpp + ./src/backend/audio/mp2processor.cpp + ./src/backend/data/mot-databuilder.cpp + ./src/backend/data/virtual-datahandler.cpp + ./src/backend/data/pad-handler.cpp + ./src/backend/data/mot-data.cpp + ./src/backend/data/data-processor.cpp + ./devices/virtual-input.cpp + ./devices/rawfiles/rawfiles.cpp + ./devices/wavfiles/wavfiles.cpp + ./src/output/audio-base.cpp + ./src/output/newconverter.cpp + ./src/output/fir-filters.cpp + ./src/various/fft-handler.cpp + ./src/various/Xtan2.cpp + ./src/various/dab-params.cpp + ./src/various/band-handler.cpp + ./src/various/text-mapper.cpp + ) + + set (${objectName}_MOCS + ./dab-processor.h + ./includes/output/audio-base.h + ./includes/ofdm/sample-reader.h + ./includes/ofdm/ofdm-decoder.h + ./includes/ofdm/phasereference.h + ./includes/backend/fic-handler.h + ./includes/backend/fib-processor.h + ./includes/backend/data-backend.h + ./includes/backend/audio/faad-decoder.h + ./includes/backend/audio/mp2processor.h + ./includes/backend/audio/mp4processor.h + ./includes/backend/data/virtual-datahandler.h + ./includes/backend/data/pad-handler.h + ./includes/backend/data/mot-data.h + ./includes/backend/data/mot-databuilder.h + ./includes/backend/data/data-processor.h + ./devices/rawfiles/rawfiles.h + ./devices/wavfiles/wavfiles.h + ) + + set (${objectName}_UIS + ${${objectName}_UIS} ./forms/dabradio.ui ./forms/technical_data.ui) + + set (${objectName}_MOCS + ${${objectName}_MOCS} ./radio.h) + + set ($(objectName)_HDRS + ${${objectName}_HDRS} ./radio.h) + + set (${objectName}_SRCS + ${${objectName}_SRCS} ./radio.cpp) + + +########################################################################## +# The devices +# + if (SDRPLAY) +# find_path (SDRPLAYLIB_INCLUDE_DIR +# NAMES mirsdrapi-rsp.h +# PATHS +# /usr/local/include/ +# ) +# include_directories (${SDRPLAYLIB_INCLUDE_DIR}) + set (${objectName}_UIS + ${${objectName}_UIS} + ./devices/sdrplay-handler/sdrplay-widget.ui + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./devices/sdrplay-handler/sdrplay-handler.h + ./devices/sdrplay-handler/sdrplayselect.h + ) + + include_directories ( + ./devices/sdrplay-handler + ) + + set ($(objectName)_HDRS + ${${objectName}_HDRS} + ./devices/sdrplay-handler/sdrplay-handler.h + ./devices/sdrplay-handler/sdrplayselect.h + ./devices/sdrplay-handler/mirsdrapi-rsp.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./devices/sdrplay-handler/sdrplay-handler.cpp + ./devices/sdrplay-handler/sdrplayselect.cpp + ) + + add_definitions (-DHAVE_SDRPLAY) + endif (SDRPLAY) + + if (AIRSPY) +# find_package(LibAIRSPY) +# if (NOT LIBAIRSPY_FOUND) +# message(FATAL_ERROR "please install airspy library") +# endif () +# ## include_directories (${AIRSPYLIB_INCLUDE_DIR}) + + set (${objectName}_UIS + ${${objectName}_UIS} + ./devices/airspy-handler/airspy-widget.ui + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./devices/airspy-handler/airspy-handler.h + ) + + include_directories ( + ./devices/airspy-handler + ./devices/airspy-handler/libairspy + ) + + set ($(objectName)_HDRS + ${${objectName}_HDRS} + ./devices/airspy-handler/airspy-handler.h + ./devices/airspy-handler/airspyfilter.h + ./devices/airspy-handler/libairspy/airspy.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./devices/airspy-handler/airspy-handler.cpp + ./devices/airspy-handler/airspyfilter.cpp + ) + + add_definitions (-DHAVE_AIRSPY) + endif (AIRSPY) + +# + if (RTLSDR) + find_package(LibRTLSDR) + if (NOT LIBRTLSDR_FOUND) + message(FATAL_ERROR "please install librtlsdr") + endif () + ###include_directories (${RTLSDR_INCLUDE_DIR}) + + set (${objectName}_UIS + ${${objectName}_UIS} + ./devices/rtlsdr-handler/rtlsdr-widget.ui + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./devices/rtlsdr-handler/rtl-dongleselect.h + ./devices/rtlsdr-handler/rtlsdr-handler.h + ) + + include_directories ( + ./devices/rtlsdr-handler/ + ) + + set (${objectName}_HDRS + ${${objectName}_HDRS} + ./devices/rtlsdr-handler/rtlsdr-handler.h + ./devices/rtlsdr-handler/rtl-dongleselect.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./devices/rtlsdr-handler/rtlsdr-handler.cpp + ./devices/rtlsdr-handler/rtl-dongleselect.cpp + ) + + add_definitions (-DHAVE_RTLSDR) + endif() +# + if (TCP_STREAMER) + add_definitions (-DTCP_STREAMER) + find_package (Qt5Network REQUIRED) + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./includes/output/tcp-streamer.h + ) + set (${objectName}_HDRS + ${${objectName}_HDRS} + ./includes/output/tcp-streamer.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./src/output/tcp-streamer.cpp + ) + endif (TCP_STREAMER) + + if (QT_AUDIO) + add_definitions (-DQT_AUDIO) + find_package (Qt5Multimedia REQUIRED) + include_directories ( + ${Qt5Multimedia_INCLUDE_DIRS} + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./includes/output/Qt-audio.h + ./includes/output/Qt-audiodevice.h + ) + set (${objectName}_HDRS + ${${objectName}_HDRS} + ./includes/output/Qt-audio.h + ./includes/output/Qt-audiodevice.h + ) + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./src/output/Qt-audio.cpp + ./src/output/Qt-audiodevice.cpp + ) + endif (QT_AUDIO) + + if (RTLTCP) + find_package (Qt5Network REQUIRED) + set (${objectName}_UIS + ${${objectName}_UIS} + ./devices/rtl_tcp/rtl_tcp-widget.ui + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./devices/rtl_tcp/rtl_tcp_client.h + ) + + include_directories ( + ./devices/rtl_tcp + ${Qt5Network_INCLUDE_DIRS} + ) + + set ($(objectName)_HDRS + ${${objectName}_HDRS} + ./devices/rtl_tcp/rtl_tcp_client.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./devices/rtl_tcp/rtl_tcp_client.cpp + ) + + set (RTLTCP_lib Qt5::Network) + add_definitions (-DHAVE_RTL_TCP) + endif (RTLTCP) + + find_package(Qwt) + if (NOT QWT_FOUND) + message(FATAL_ERROR "please install qwt library") + endif () + include_directories ( ${QWT_INCLUDE_DIRS}) + list(APPEND extraLibs ${QWT_LIBRARIES}) + + if (USE_PORTAUDIO) + find_package(Portaudio) + if (NOT PORTAUDIO_FOUND) + message(FATAL_ERROR "please install portaudio V19") + endif () + list(APPEND extraLibs ${PORTAUDIO_LIBRARIES}) + set (${objectName}_HDRS + ${${objectName}_HDRS} + ./includes/output/audiosink.h + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./includes/output/audiosink.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./src/output/audiosink.cpp + ) + endif (USE_PORTAUDIO) + + QT5_WRAP_UI (UIS ${${objectName}_UIS} + ./devices/filereader-widget.ui) + + include_directories ( + ${SDRPLAY_INCLUDES} + ${QT5Widgets_INCLUDES} + ${QT_QTCORE_INCLUDE_DIR} + ${QT_QTGUI_INCLUDE_DIR} + ${FFTW_INCLUDE_DIRS} + ${PORTAUDIO_INCLUDE_DIRS} + ${FAAD_INCLUDE_DIRS} + ${SNDFILES_INCLUDE_DIRS} + ) + + QT5_WRAP_CPP (MOCS ${${objectName}_MOCS}) + + add_executable (${objectName} + ${${objectName}_SRCS} + ${UIS} + ${RSCS} + ${TRS} + ${MOCS} + resources.qrc + ) + + target_link_libraries (${objectName} + Qt5::Widgets + Qt5::Network + ${RTLTCP_lib} + ${FFTW3F_LIBRARIES} + ${extraLibs} + ${FAAD_LIBRARIES} + ${CMAKE_DL_LIBS} + ) + + INSTALL (TARGETS ${objectName} DESTINATION ${CMAKE_INSTALL_PREFIX}) +# INSTALL (TARGETS ${objectName} DESTINATION ./linux-bin) + +######################################################################## +# Create uninstall target +######################################################################## + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) + +add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) diff --git a/CMakeLists.txt-qt4 b/CMakeLists.txt-qt4 new file mode 100644 index 0000000..648223f --- /dev/null +++ b/CMakeLists.txt-qt4 @@ -0,0 +1,474 @@ +cmake_minimum_required( VERSION 2.8.11 ) +set (objectName dabradio-1.0) +set (CMAKE_CXX_FLAGS "${CMAKE_XCC_FLAGS} -Wall -std=c++11 -flto") +set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto") + +if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set (CMAKE_INSTALL_PREFIX "/usr/local/bin" CACHE PATH "default install path" FORCE ) +endif() +#set (CMAKE_INSTALL_PREFIX /usr/local/bin) +# modify if you want + +if(MINGW) + add_definitions ( -municode) +endif() +IF(EXISTS (".git") AND IS_DIRECTORY (".git")) + execute_process ( + COMMAND git rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_COMMIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +endif () + +if(GIT_COMMIT_HASH) + add_definitions("-DGITHASH=\"${GIT_COMMIT_HASH}\"") +else () + add_definitions ("-DGITHASH=\" \"") +endif() + +######################################################################## +# select the release build type by default to get optimization flags +######################################################################## +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") + message(STATUS "Build type not specified: defaulting to release.") +endif(NOT CMAKE_BUILD_TYPE) +set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") + +### make sure our local CMake Modules path comes first +list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) + +###################################################################### +# +##################################################################### + +if(DEFINED AIRSPY) + set(AIRSPY true) +endif () + +if(DEFINED SDRPLAY) + set(SDRPLAY true) +endif () + +if(DEFINED DABSTICK) + set(DABSTICK true) +endif () + +if(DEFINED RTLTCP) + set(RTLTCP true) +endif () + +add_definitions (-DTHREADED_DECODING) # uncomment for use for an RPI + +######################################################################## + + find_package (PkgConfig) + find_package (LSBId) + +# set(CMAKE_AUTOMOC ON) + set(CMAKE_INCLUDE_CURRENT_DIR ON) + find_package(Qt4 REQUIRED COMPONENTS QtCore QtNetwork) + include(${QT_USE_FILE}) + find_package(QWT REQUIRED) + + find_package(FFTW3f) + if (NOT FFTW3F_FOUND) + message(FATAL_ERROR "please install FFTW3") + endif () + + find_package(Portaudio) + if (NOT PORTAUDIO_FOUND) + message(FATAL_ERROR "please install portaudio V19") + endif () + list(APPEND extraLibs ${PORTAUDIO_LIBRARIES}) + + find_package(Faad) + if (NOT FAAD_FOUND ) + message(FATAL_ERROR "please install libfaad") + endif () + + find_package(zlib) + if (NOT ZLIB_FOUND) + message(FATAL_ERROR "please install libz") + endif () + list(APPEND extraLibs ${ZLIB_LIBRARY}) + + find_package(LibSndFile) + if (NOT LIBSNDFILE_FOUND) + message(FATAL_ERROR "please install libsndfile") + endif () + list(APPEND extraLibs ${LIBSNDFILE_LIBRARY}) + + find_package(LibSampleRate) + if (NOT LIBSAMPLERATE_FOUND) + message(FATAL_ERROR "please install libsamplerate") + endif () + list(APPEND extraLibs ${LIBSAMPLERATE_LIBRARY}) + + find_library (PTHREADS pthread) + if (NOT(PTHREADS)) + message (FATAL_ERROR "please install libpthread") + else (NOT(PTHREADS)) + set (extraLibs ${extraLibs} ${PTHREADS}) + endif (NOT(PTHREADS)) + +####################################################################### +# +# Here we really start + + include_directories ( + ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} + ${QT5Widgets_INCLUDES} + ${QT_QTCORE_INCLUDE_DIR} + ${QT_QTGUI_INCLUDE_DIR} + . + ./ + ./includes + ./dab-scopes + ./includes/ofdm + ./includes/backend + ./includes/backend/viterbi_768 + ./includes/backend/audio + ./includes/backend/data + ./includes/backend/data/journaline + ./includes/various + ./includes/output + ./includes/scopes-qwt6 + ./devices + ./devices/rawfiles + ./devices/wavfiles + /usr/include/ + ) + + set (${objectName}_HDRS + ./dab-processor.h + ./dab-scope/spectrum-handler.h + ./includes/ofdm/sample-reader.h + ./includes/dab-constants.h + ./includes/ofdm/phasereference.h + ./includes/ofdm/phasetable.h + ./includes/ofdm/freq-interleaver.h + ./includes/backend/viterbi_768/viterbi-768.h + ./includes/backend/protection.h + ./includes/backend/uep-protection.h + ./includes/backend/eep-protection.h + ./includes/backend/firecode-checker.h + ./includes/backend/frame-processor.h + ./includes/backend/charsets.h + ./includes/backend/galois.h + ./incluces/backend/reed-solomon.h + ./includes/backend/msc-handler.h + ./includes/backend/virtual-backend.h + ./includes/backend/audio-backend.h + ./includes/backend/databackend.h + ./includes/backend/audio/faad-decoder.h + ./includes/backend/audio/mp4processor.h + ./includes/backend/audio/mp2processor.h + ./includes/backend/data/mot-databuilder.h + ./includes/backend/data/virtual-datahandler.h + ./includes/backend/data/pad-handler.h + ./includes/backend/data/mot-data.h + ./includes/backend/data/data-processor.h + ./devices/virtual-input.h + ./devices/rawfiles/rawfiles.h + ./devices/wavfiles/wavfiles.h + ./includes/output/fir-filters.h + ./includes/output/audio-base.h + ./includes/output/audiosink.h + ./includes/output/newconverter.h + ./includes/various/fft-handler.h + ./includes/various/ringbuffer.h + ./includes/various/Xtan2.h + ./includes/various/dab-params.h + ./includes/various/band-handler.h + ./includes/various/text-mapper.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./main.cpp + ./dab-processor.cpp + ./dab-scope/spectrum-handler.cpp + ./src/ofdm/sample-reader.cpp + ./src/ofdm/ofdm-decoder.cpp + ./src/ofdm/phasereference.cpp + ./src/ofdm/phasetable.cpp + ./src/ofdm/freq-interleaver.cpp + ./src/backend/viterbi_768/viterbi-768.cpp + ./src/backend/viterbi_768/spiral-no-sse.c + ./src/backend/fic-handler.cpp + ./src/backend/protection.cpp + ./src/backend/eep-protection.cpp + ./src/backend/uep-protection.cpp + ./src/backend/fib-processor.cpp + ./src/backend/firecode-checker.cpp + ./src/backend/frame-processor.cpp + ./src/backend/protTables.cpp + ./src/backend/charsets.cpp + ./src/backend/galois.cpp + ./src/backend/reed-solomon.cpp + ./src/backend/msc-handler.cpp + ./src/backend/virtual-backend.cpp + ./src/backend/audio-backend.cpp + ./src/backend/data-backend.cpp + ./src/backend/audio/faad-decoder.cpp + ./src/backend/audio/mp4processor.cpp + ./src/backend/audio/mp2processor.cpp + ./src/backend/data/mot-databuilder.cpp + ./src/backend/data/virtual-datahandler.cpp + ./src/backend/data/pad-handler.cpp + ./src/backend/data/mot-data.cpp + ./src/backend/data/data-processor.cpp + ./devices/virtual-input.cpp + ./devices/rawfiles/rawfiles.cpp + ./devices/wavfiles/wavfiles.cpp + ./src/output/audio-base.cpp + ./src/output/audiosink.cpp + ./src/output/newconverter.cpp + ./src/output/fir-filters.cpp + ./src/various/fft-handler.cpp + ./src/various/Xtan2.cpp + ./src/various/dab-params.cpp + ./src/various/band-handler.cpp + ./src/various/text-mapper.cpp + ) + + set (${objectName}_MOCS + ./dab-processor.h + ./includes/output/audio-base.h + ./includes/ofdm/sample-reader.h + ./includes/ofdm/ofdm-decoder.h + ./includes/ofdm/phasereference.h + ./includes/backend/fic-handler.h + ./includes/backend/fib-processor.h + ./includes/backend/data-backend.h + ./includes/backend/audio/faad-decoder.h + ./includes/backend/audio/mp2processor.h + ./includes/backend/audio/mp4processor.h + ./includes/backend/data/virtual-datahandler.h + ./includes/backend/data/pad-handler.h + ./includes/backend/data/mot-data.h + ./includes/backend/data/mot-databuilder.h + ./includes/backend/data/data-processor.h + ./devices/rawfiles/rawfiles.h + ./devices/wavfiles/wavfiles.h + ) + + set (${objectName}_UIS + ${${objectName}_UIS} ./forms/dabradio.ui ./forms/technical_data.ui) + + set (${objectName}_MOCS + ${${objectName}_MOCS} ./radio.h) + + set ($(objectName)_HDRS + ${${objectName}_HDRS} ./radio.h) + + set (${objectName}_SRCS + ${${objectName}_SRCS} ./radio.cpp) + + +########################################################################## +# The devices +# + if (SDRPLAY) +# find_path (SDRPLAYLIB_INCLUDE_DIR +# NAMES mirsdrapi-rsp.h +# PATHS +# /usr/local/include/ +# ) +# include_directories (${SDRPLAYLIB_INCLUDE_DIR}) + set (${objectName}_UIS + ${${objectName}_UIS} + ./devices/sdrplay-handler/sdrplay-widget.ui + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./devices/sdrplay-handler/sdrplay-handler.h + ./devices/sdrplay-handler/sdrplayselect.h + ) + + include_directories ( + ./devices/sdrplay-handler + ) + + set ($(objectName)_HDRS + ${${objectName}_HDRS} + ./devices/sdrplay-handler/rtl-sdr.h + ./devices/sdrplay-handler/sdrplay-handler.h + ./devices/sdrplay-handler/sdrplayselect.h + ./devices/sdrplay-handler/mirsdrapi-rsp.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./devices/sdrplay-handler/sdrplay-handler.cpp + ./devices/sdrplay-handler/sdrplayselect.cpp + ) + + add_definitions (-DHAVE_SDRPLAY) + endif (SDRPLAY) + + if (AIRSPY) +# find_package(LibAIRSPY) +# if (NOT LIBAIRSPY_FOUND) +# message(FATAL_ERROR "please install airspy library") +# endif () +# ## include_directories (${AIRSPYLIB_INCLUDE_DIR}) + + set (${objectName}_UIS + ${${objectName}_UIS} + ./devices/airspy-handler/airspy-widget.ui + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./devices/airspy-handler/airspy-handler.h + ) + + include_directories ( + ./devices/airspy-handler + ./devices/airspy-handler/libairspy + ) + + set ($(objectName)_HDRS + ${${objectName}_HDRS} + ./devices/airspy-handler/airspy-handler.h + ./devices/airspy-handler/airspyfilter.h + ./devices/airspy-handler/libairspy/airspy.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./devices/airspy-handler/airspy-handler.cpp + ./devices/airspy-handler/airspyfilter.cpp + ) + + add_definitions (-DHAVE_AIRSPY) + endif (AIRSPY) +# + if (DABSTICK) +# find_package(LibRTLSDR) +# if (NOT LIBRTLSDR_FOUND) +# message(FATAL_ERROR "please install librtlsdr") +# endif () +# ###include_directories (${RTLSDR_INCLUDE_DIR}) + + set (${objectName}_UIS + ${${objectName}_UIS} + ./devices/rtlsdr-handler/rtlsdr-widget.ui + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./devices/rtlsdr-handler/rtl-dongleselect.h + ./devices/rtlsdr-handler/rtlsdr-handler.h + ) + + include_directories ( + ./devices/rtlsdr-handler/ + ) + + set (${objectName}_HDRS + ${${objectName}_HDRS} + ./devices/rtlsdr-handler/rtlsdr-handler.h + ./devices/rtlsdr-handler/rtl-dongleselect.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./devices/rtlsdr-handler/rtlsdr-handler.cpp + ./devices/rtlsdr-handler/rtl-dongleselect.cpp + ) + + add_definitions (-DHAVE_RTLSDR) + endif() +# +# +# if (RTLTCP) +# find_package (Qt5Network REQUIRED) +# set (${objectName}_UIS +# ${${objectName}_UIS} +# ./devices/rtl_tcp/rtl_tcp-widget.ui +# ) +# +# set (${objectName}_MOCS +# ${${objectName}_MOCS} +# ./devices/rtl_tcp/rtl_tcp_client.h +# ) +# +# include_directories ( +# ./devices/rtl_tcp +# ${Qt5Network_INCLUDE_DIRS} +# ) +# +# set ($(objectName)_HDRS +# ${${objectName}_HDRS} +# ./devices/rtl_tcp/rtl_tcp_client.h +# ) +# +# set (${objectName}_SRCS +# ${${objectName}_SRCS} +# ./devices/rtl_tcp/rtl_tcp_client.cpp +# ) +# +# set (RTLTCP_lib Qt5::Network) +# add_definitions (-DHAVE_RTL_TCP) +# endif (RTLTCP) + + find_package(Qwt) + if (NOT QWT_FOUND) + message(FATAL_ERROR "please install qwt library") + endif () + include_directories ( ${QWT_INCLUDE_DIRS}) + list(APPEND extraLibs ${QWT_LIBRARIES}) + + QT4_WRAP_UI (UIS ${${objectName}_UIS} + ./devices/filereader-widget.ui) + + include_directories ( + ${SDRPLAY_INCLUDES} + ${QT5Widgets_INCLUDES} + ${QT_QTCORE_INCLUDE_DIR} + ${QT_QTGUI_INCLUDE_DIR} + ${FFTW_INCLUDE_DIRS} + ${PORTAUDIO_INCLUDE_DIRS} + ${FAAD_INCLUDE_DIRS} + ${SNDFILES_INCLUDE_DIRS} + ) + + QT4_WRAP_CPP (MOCS ${${objectName}_MOCS}) + + add_executable (${objectName} + ${${objectName}_SRCS} + ${UIS} + ${RSCS} + ${TRS} + ${MOCS} + ) + + target_link_libraries (${objectName} + Qt4::QtGui + Qt4::QtNetwork + ${RTLTCP_lib} + ${FFTW3F_LIBRARIES} + ${extraLibs} + ${FAAD_LIBRARIES} + ${CMAKE_DL_LIBS} + ) + + INSTALL (TARGETS ${objectName} DESTINATION ${CMAKE_INSTALL_PREFIX}) +# INSTALL (TARGETS ${objectName} DESTINATION ./linux-bin) + +######################################################################## +# Create uninstall target +######################################################################## + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) + +add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) diff --git a/CMakeLists.txt-qt5 b/CMakeLists.txt-qt5 new file mode 100644 index 0000000..3814be7 --- /dev/null +++ b/CMakeLists.txt-qt5 @@ -0,0 +1,539 @@ +cmake_minimum_required( VERSION 2.8.11 ) +set (objectName dabradio) +set (CMAKE_CXX_FLAGS "${CMAKE_XCC_FLAGS} -Wall -std=c++11 -flto") +set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto") + +set(CMAKE_AUTORCC ON) +if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set (CMAKE_INSTALL_PREFIX "/usr/local/bin" CACHE PATH "default install path" FORCE ) +endif() +#set (CMAKE_INSTALL_PREFIX /usr/local/bin) + +# modify if you want + +if(MINGW) + add_definitions ( -municode) +endif() + +IF(EXISTS (".git") AND IS_DIRECTORY (".git")) + execute_process ( + COMMAND git rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_COMMIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +endif () + +if(GIT_COMMIT_HASH) + add_definitions("-DGITHASH=\"${GIT_COMMIT_HASH}\"") +else () + add_definitions ("-DGITHASH=\" \"") +endif() + + +######################################################################## +# select the release build type by default to get optimization flags +######################################################################## +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") + message(STATUS "Build type not specified: defaulting to release.") +endif(NOT CMAKE_BUILD_TYPE) +set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") + +### make sure our local CMake Modules path comes first +list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) + +###################################################################### +# +##################################################################### +# +# default value + set(USE_PORTAUDIO true) + +if(DEFINED AIRSPY) + set(AIRSPY true) +endif () + +if(DEFINED SDRPLAY) + set(SDRPLAY true) +endif () + +if(DEFINED RTLSDR) + set(RTLSDR true) +endif () + +if(DEFINED RTLTCP) + set(RTLTCP true) +endif () + + +#add_definitions (-DTHREADED_DECODING) # uncomment for use for an RPI +# +######################################################################## + + find_package (PkgConfig) + find_package (LSBId) + + find_package (Qt5Core REQUIRED) + find_package (Qt5Widgets REQUIRED) + find_package (Qt5Network REQUIRED) + include_directories ( + ${Qt5Network_INCLUDE_DIRS} + ) + + find_package(FFTW3f) + if (NOT FFTW3F_FOUND) + message(FATAL_ERROR "please install FFTW3") + endif () + + find_package(Faad) + if (NOT FAAD_FOUND ) + message(FATAL_ERROR "please install libfaad") + endif () + + find_package(zlib) + if (NOT ZLIB_FOUND) + message(FATAL_ERROR "please install libz") + endif () + list(APPEND extraLibs ${ZLIB_LIBRARY}) + + find_package(LibSndFile) + if (NOT LIBSNDFILE_FOUND) + message(FATAL_ERROR "please install libsndfile") + endif () + list(APPEND extraLibs ${LIBSNDFILE_LIBRARY}) + + find_package(LibSampleRate) + if (NOT LIBSAMPLERATE_FOUND) + message(FATAL_ERROR "please install libsamplerate") + endif () + list(APPEND extraLibs ${LIBSAMPLERATE_LIBRARY}) + + find_library (PTHREADS pthread) + if (NOT(PTHREADS)) + message (FATAL_ERROR "please install libpthread") + else (NOT(PTHREADS)) + set (extraLibs ${extraLibs} ${PTHREADS}) + endif (NOT(PTHREADS)) + +####################################################################### +# +# Here we really start + + include_directories ( + ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} + ${QT5Widgets_INCLUDES} + ${QT_QTCORE_INCLUDE_DIR} + ${QT_QTGUI_INCLUDE_DIR} + . + ./ + ./includes + ./dab-scope + ./includes/ofdm + ./includes/backend + ./includes/backend/viterbi_768 + ./includes/backend/audio + ./includes/backend/data + ./includes/backend/data/journaline + ./includes/various + ./includes/output + ./includes/scopes-qwt6 + ./devices + ./devices/rawfiles + ./devices/wavfiles + /usr/include/ + ) + + set (${objectName}_HDRS + ./dab-processor.h + ./dab-scope/spectrum-handler.h + ./includes/ofdm/sample-reader.h + ./includes/dab-constants.h + ./includes/ofdm/phasereference.h + ./includes/ofdm/phasetable.h + ./includes/ofdm/freq-interleaver.h + ./includes/backend/viterbi_768/viterbi-768.h + ./includes/backend/protection.h + ./includes/backend/uep-protection.h + ./includes/backend/eep-protection.h + ./includes/backend/firecode-checker.h + ./includes/backend/frame-processor.h + ./includes/backend/charsets.h + ./includes/backend/galois.h + ./incluces/backend/reed-solomon.h + ./includes/backend/msc-handler.h + ./includes/backend/virtual-backend.h + ./includes/backend/audio-backend.h + ./includes/backend/data-backend.h + ./includes/backend/audio/faad-decoder.h + ./includes/backend/audio/mp4processor.h + ./includes/backend/audio/mp2processor.h + ./includes/backend/data/mot-databuilder.h + ./includes/backend/data/virtual-datahandler.h + ./includes/backend/data/pad-handler.h + ./includes/backend/data/mot-data.h + ./includes/backend/data/data-processor.h + ./devices/virtual-input.h + ./devices/rawfiles/rawfiles.h + ./devices/wavfiles/wavfiles.h + ./includes/output/fir-filters.h + ./includes/output/audio-base.h + ./includes/output/newconverter.h + ./includes/various/fft-handler.h + ./includes/various/ringbuffer.h + ./includes/various/Xtan2.h + ./includes/various/dab-params.h + ./includes/various/band-handler.h + ./includes/various/text-mapper.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./main.cpp + ./dab-processor.cpp + ./dab-scope/spectrum-handler.cpp + ./src/ofdm/sample-reader.cpp + ./src/ofdm/ofdm-decoder.cpp + ./src/ofdm/phasereference.cpp + ./src/ofdm/phasetable.cpp + ./src/ofdm/freq-interleaver.cpp + ./src/backend/viterbi_768/viterbi-768.cpp + ./src/backend/viterbi_768/spiral-no-sse.c + ./src/backend/fic-handler.cpp + ./src/backend/protection.cpp + ./src/backend/eep-protection.cpp + ./src/backend/uep-protection.cpp + ./src/backend/fib-processor.cpp + ./src/backend/firecode-checker.cpp + ./src/backend/frame-processor.cpp + ./src/backend/protTables.cpp + ./src/backend/charsets.cpp + ./src/backend/galois.cpp + ./src/backend/reed-solomon.cpp + ./src/backend/msc-handler.cpp + ./src/backend/virtual-backend.cpp + ./src/backend/audio-backend.cpp + ./src/backend/data-backend.cpp + ./src/backend/audio/faad-decoder.cpp + ./src/backend/audio/mp4processor.cpp + ./src/backend/audio/mp2processor.cpp + ./src/backend/data/mot-databuilder.cpp + ./src/backend/data/virtual-datahandler.cpp + ./src/backend/data/pad-handler.cpp + ./src/backend/data/mot-data.cpp + ./src/backend/data/data-processor.cpp + ./devices/virtual-input.cpp + ./devices/rawfiles/rawfiles.cpp + ./devices/wavfiles/wavfiles.cpp + ./src/output/audio-base.cpp + ./src/output/newconverter.cpp + ./src/output/fir-filters.cpp + ./src/various/fft-handler.cpp + ./src/various/Xtan2.cpp + ./src/various/dab-params.cpp + ./src/various/band-handler.cpp + ./src/various/text-mapper.cpp + ) + + set (${objectName}_MOCS + ./dab-processor.h + ./includes/output/audio-base.h + ./includes/ofdm/sample-reader.h + ./includes/ofdm/ofdm-decoder.h + ./includes/ofdm/phasereference.h + ./includes/backend/fic-handler.h + ./includes/backend/fib-processor.h + ./includes/backend/data-backend.h + ./includes/backend/audio/faad-decoder.h + ./includes/backend/audio/mp2processor.h + ./includes/backend/audio/mp4processor.h + ./includes/backend/data/virtual-datahandler.h + ./includes/backend/data/pad-handler.h + ./includes/backend/data/mot-data.h + ./includes/backend/data/mot-databuilder.h + ./includes/backend/data/data-processor.h + ./devices/rawfiles/rawfiles.h + ./devices/wavfiles/wavfiles.h + ) + + set (${objectName}_UIS + ${${objectName}_UIS} ./forms/dabradio.ui ./forms/technical_data.ui) + + set (${objectName}_MOCS + ${${objectName}_MOCS} ./radio.h) + + set ($(objectName)_HDRS + ${${objectName}_HDRS} ./radio.h) + + set (${objectName}_SRCS + ${${objectName}_SRCS} ./radio.cpp) + + +########################################################################## +# The devices +# + if (SDRPLAY) +# find_path (SDRPLAYLIB_INCLUDE_DIR +# NAMES mirsdrapi-rsp.h +# PATHS +# /usr/local/include/ +# ) +# include_directories (${SDRPLAYLIB_INCLUDE_DIR}) + set (${objectName}_UIS + ${${objectName}_UIS} + ./devices/sdrplay-handler/sdrplay-widget.ui + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./devices/sdrplay-handler/sdrplay-handler.h + ./devices/sdrplay-handler/sdrplayselect.h + ) + + include_directories ( + ./devices/sdrplay-handler + ) + + set ($(objectName)_HDRS + ${${objectName}_HDRS} + ./devices/sdrplay-handler/sdrplay-handler.h + ./devices/sdrplay-handler/sdrplayselect.h + ./devices/sdrplay-handler/mirsdrapi-rsp.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./devices/sdrplay-handler/sdrplay-handler.cpp + ./devices/sdrplay-handler/sdrplayselect.cpp + ) + + add_definitions (-DHAVE_SDRPLAY) + endif (SDRPLAY) + + if (AIRSPY) +# find_package(LibAIRSPY) +# if (NOT LIBAIRSPY_FOUND) +# message(FATAL_ERROR "please install airspy library") +# endif () +# ## include_directories (${AIRSPYLIB_INCLUDE_DIR}) + + set (${objectName}_UIS + ${${objectName}_UIS} + ./devices/airspy-handler/airspy-widget.ui + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./devices/airspy-handler/airspy-handler.h + ) + + include_directories ( + ./devices/airspy-handler + ./devices/airspy-handler/libairspy + ) + + set ($(objectName)_HDRS + ${${objectName}_HDRS} + ./devices/airspy-handler/airspy-handler.h + ./devices/airspy-handler/airspyfilter.h + ./devices/airspy-handler/libairspy/airspy.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./devices/airspy-handler/airspy-handler.cpp + ./devices/airspy-handler/airspyfilter.cpp + ) + + add_definitions (-DHAVE_AIRSPY) + endif (AIRSPY) + +# + if (RTLSDR) + find_package(LibRTLSDR) + if (NOT LIBRTLSDR_FOUND) + message(FATAL_ERROR "please install librtlsdr") + endif () + ###include_directories (${RTLSDR_INCLUDE_DIR}) + + set (${objectName}_UIS + ${${objectName}_UIS} + ./devices/rtlsdr-handler/rtlsdr-widget.ui + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./devices/rtlsdr-handler/rtl-dongleselect.h + ./devices/rtlsdr-handler/rtlsdr-handler.h + ) + + include_directories ( + ./devices/rtlsdr-handler/ + ) + + set (${objectName}_HDRS + ${${objectName}_HDRS} + ./devices/rtlsdr-handler/rtlsdr-handler.h + ./devices/rtlsdr-handler/rtl-dongleselect.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./devices/rtlsdr-handler/rtlsdr-handler.cpp + ./devices/rtlsdr-handler/rtl-dongleselect.cpp + ) + + add_definitions (-DHAVE_RTLSDR) + endif() +# + if (TCP_STREAMER) + add_definitions (-DTCP_STREAMER) + find_package (Qt5Network REQUIRED) + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./includes/output/tcp-streamer.h + ) + set (${objectName}_HDRS + ${${objectName}_HDRS} + ./includes/output/tcp-streamer.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./src/output/tcp-streamer.cpp + ) + endif (TCP_STREAMER) + + if (QT_AUDIO) + add_definitions (-DQT_AUDIO) + find_package (Qt5Multimedia REQUIRED) + include_directories ( + ${Qt5Multimedia_INCLUDE_DIRS} + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./includes/output/Qt-audio.h + ./includes/output/Qt-audiodevice.h + ) + set (${objectName}_HDRS + ${${objectName}_HDRS} + ./includes/output/Qt-audio.h + ./includes/output/Qt-audiodevice.h + ) + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./src/output/Qt-audio.cpp + ./src/output/Qt-audiodevice.cpp + ) + endif (QT_AUDIO) + + if (RTLTCP) + find_package (Qt5Network REQUIRED) + set (${objectName}_UIS + ${${objectName}_UIS} + ./devices/rtl_tcp/rtl_tcp-widget.ui + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./devices/rtl_tcp/rtl_tcp_client.h + ) + + include_directories ( + ./devices/rtl_tcp + ${Qt5Network_INCLUDE_DIRS} + ) + + set ($(objectName)_HDRS + ${${objectName}_HDRS} + ./devices/rtl_tcp/rtl_tcp_client.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./devices/rtl_tcp/rtl_tcp_client.cpp + ) + + set (RTLTCP_lib Qt5::Network) + add_definitions (-DHAVE_RTL_TCP) + endif (RTLTCP) + + find_package(Qwt) + if (NOT QWT_FOUND) + message(FATAL_ERROR "please install qwt library") + endif () + include_directories ( ${QWT_INCLUDE_DIRS}) + list(APPEND extraLibs ${QWT_LIBRARIES}) + + if (USE_PORTAUDIO) + find_package(Portaudio) + if (NOT PORTAUDIO_FOUND) + message(FATAL_ERROR "please install portaudio V19") + endif () + list(APPEND extraLibs ${PORTAUDIO_LIBRARIES}) + set (${objectName}_HDRS + ${${objectName}_HDRS} + ./includes/output/audiosink.h + ) + + set (${objectName}_MOCS + ${${objectName}_MOCS} + ./includes/output/audiosink.h + ) + + set (${objectName}_SRCS + ${${objectName}_SRCS} + ./src/output/audiosink.cpp + ) + endif (USE_PORTAUDIO) + + QT5_WRAP_UI (UIS ${${objectName}_UIS} + ./devices/filereader-widget.ui) + + include_directories ( + ${SDRPLAY_INCLUDES} + ${QT5Widgets_INCLUDES} + ${QT_QTCORE_INCLUDE_DIR} + ${QT_QTGUI_INCLUDE_DIR} + ${FFTW_INCLUDE_DIRS} + ${PORTAUDIO_INCLUDE_DIRS} + ${FAAD_INCLUDE_DIRS} + ${SNDFILES_INCLUDE_DIRS} + ) + + QT5_WRAP_CPP (MOCS ${${objectName}_MOCS}) + + add_executable (${objectName} + ${${objectName}_SRCS} + ${UIS} + ${RSCS} + ${TRS} + ${MOCS} + resources.qrc + ) + + target_link_libraries (${objectName} + Qt5::Widgets + Qt5::Network + ${RTLTCP_lib} + ${FFTW3F_LIBRARIES} + ${extraLibs} + ${FAAD_LIBRARIES} + ${CMAKE_DL_LIBS} + ) + + INSTALL (TARGETS ${objectName} DESTINATION ${CMAKE_INSTALL_PREFIX}) +# INSTALL (TARGETS ${objectName} DESTINATION ./linux-bin) + +######################################################################## +# Create uninstall target +######################################################################## + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) + +add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..f8f7625 --- /dev/null +++ b/COPYING @@ -0,0 +1,126 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + + + Preamble + + The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. + + When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + + We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + + Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and modification follow. + + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + + 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + + 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + + 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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; either version 2 of the License, or (at your option) any later version. + + 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 for more details. + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. + + You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0904026 --- /dev/null +++ b/LICENSE @@ -0,0 +1,367 @@ + + Copyright (c) 2013 .. 2017 + Jan van Katwijk + Lazy Chair Computing + J.vanKatwijk@gmail.com + +The Qt-DAB software - as well as its predecessors DAB-rpi and sdr-j-dab +and derivatives - are made available under GPL license Version 2. + +Many of the ideas as implemented in Qt-DAB are derived from +other work, made available through the GNU general Public License. +All copyrights of the original authors are acknowledged. + +Qt-DAB is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, version 2, +as published by the Free Software Foundation. + +Qt-DAB 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 for more details. + +Any non-GPL usage of this software or parts of this software is strictly +forbidden. Commercial non-GPL licensing of this software is possible. +For more info contact the author, named above. + +=========================================================================== + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + 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; either version 2 of the License, or + (at your option) any later version. + + 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 for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6ed6cab --- /dev/null +++ b/Makefile @@ -0,0 +1,7636 @@ +############################################################################# +# Makefile for building: linux-bin/dabradio-1.0 +# Generated by qmake (3.1) (Qt 5.9.4) +# Project: dab3.pro +# Template: app +# Command: /usr/bin/qmake-qt5 -o Makefile dab3.pro +############################################################################# + +MAKEFILE = Makefile + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DGITHASH=\"------\" -D__THREADED_BACKEND -DPRESET_NAME -DHAVE_RTLSDR -DHAVE_SDRPLAY -DHAVE_AIRSPY -DSSE_AVAILABLE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB +CFLAGS = -pipe -g -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) +CXXFLAGS = -pipe -std=c++11 -g -isystem /usr/include/qt5 -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) +INCPATH = -I. -I. -I. -Isrc -Idab-scope -Iincludes -Iincludes/ofdm -Iincludes/backend -Iincludes/backend/viterbi_768 -Iincludes/backend/audio -Iincludes/backend/data -Iincludes/output -Iincludes/various -Idevices -Idevices/rawfiles -Idevices/wavfiles -I../../../../local/include -I../../../../local/include -isystem /usr/include/qt4/qwt -I../../../../include/qt5/qwt -isystem /usr/include/qt4/qwt -isystem /usr/include/qwt -I/usr/local/qwt-6.1.4-svn/ -Idevices/rtlsdr-handler -Idevices/sdrplay-handler -Idevices/airspy-handler -Idevices/airspy-handler/libairspy -I../../../../include/qt5 -I../../../../include/qt5/QtWidgets -I../../../../include/qt5/QtGui -I../../../../include/qt5/QtCore -I. -I../../../../include/libdrm -I. -I../../../../lib64/qt5/mkspecs/linux-g++ +QMAKE = /usr/bin/qmake-qt5 +DEL_FILE = rm -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p +COPY = cp -f +COPY_FILE = cp -f +COPY_DIR = cp -f -R +INSTALL_FILE = install -m 644 -p +INSTALL_PROGRAM = install -m 755 -p +INSTALL_DIR = cp -f -R +QINSTALL = /usr/bin/qmake-qt5 -install qinstall +QINSTALL_PROGRAM = /usr/bin/qmake-qt5 -install qinstall -exe +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +TAR = tar -cf +COMPRESS = gzip -9f +DISTNAME = dabradio-1.01.0.0 +DISTDIR = /usr/shared/sdr-j-development/systems/dab3/.tmp/dabradio-1.01.0.0 +LINK = g++ +LFLAGS = -g -Wl,-O1 +LIBS = $(SUBLIBS) -lfftw3f -lusb-1.0 -ldl -lportaudio -lz -lsndfile -lsamplerate -lfaad -lqwt-qt5 -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread +AR = ar cqs +RANLIB = +SED = sed +STRIP = strip + +####### Output directory + +OBJECTS_DIR = ./ + +####### Files + +SOURCES = main.cpp \ + radio.cpp \ + dab-processor.cpp \ + dab-scope/spectrum-handler.cpp \ + src/ofdm/sample-reader.cpp \ + src/ofdm/ofdm-decoder.cpp \ + src/ofdm/phasereference.cpp \ + src/ofdm/phasetable.cpp \ + src/ofdm/freq-interleaver.cpp \ + src/backend/viterbi_768/viterbi-768.cpp \ + src/backend/fic-handler.cpp \ + src/backend/msc-handler.cpp \ + src/backend/protection.cpp \ + src/backend/eep-protection.cpp \ + src/backend/uep-protection.cpp \ + src/backend/fib-processor.cpp \ + src/backend/galois.cpp \ + src/backend/reed-solomon.cpp \ + src/backend/rscodec.cpp \ + src/backend/charsets.cpp \ + src/backend/firecode-checker.cpp \ + src/backend/frame-processor.cpp \ + src/backend/protTables.cpp \ + src/backend/virtual-backend.cpp \ + src/backend/audio-backend.cpp \ + src/backend/data-backend.cpp \ + src/backend/audio/mp2processor.cpp \ + src/backend/audio/mp4processor.cpp \ + src/backend/audio/faad-decoder.cpp \ + src/backend/data/pad-handler.cpp \ + src/backend/data/data-processor.cpp \ + src/backend/data/virtual-datahandler.cpp \ + src/backend/data/mot-databuilder.cpp \ + src/backend/data/mot-data.cpp \ + src/output/audio-base.cpp \ + src/output/newconverter.cpp \ + src/output/audiosink.cpp \ + src/various/fft-handler.cpp \ + src/various/Xtan2.cpp \ + src/various/dab-params.cpp \ + src/various/band-handler.cpp \ + src/various/text-mapper.cpp \ + devices/virtual-input.cpp \ + devices/rawfiles/rawfiles.cpp \ + devices/wavfiles/wavfiles.cpp \ + devices/rtlsdr-handler/rtlsdr-handler.cpp \ + devices/rtlsdr-handler/rtl-dongleselect.cpp \ + devices/sdrplay-handler/sdrplay-handler.cpp \ + devices/sdrplay-handler/sdrplayselect.cpp \ + devices/airspy-handler/airspy-handler.cpp \ + devices/airspy-handler/airspyfilter.cpp \ + src/backend/viterbi_768/spiral-sse.c qrc_resources.cpp \ + moc_radio.cpp \ + moc_dab-processor.cpp \ + moc_sample-reader.cpp \ + moc_ofdm-decoder.cpp \ + moc_phasereference.cpp \ + moc_fic-handler.cpp \ + moc_fib-processor.cpp \ + moc_data-backend.cpp \ + moc_mp2processor.cpp \ + moc_mp4processor.cpp \ + moc_faad-decoder.cpp \ + moc_data-processor.cpp \ + moc_pad-handler.cpp \ + moc_virtual-datahandler.cpp \ + moc_mot-data.cpp \ + moc_audio-base.cpp \ + moc_rtlsdr-handler.cpp \ + moc_rtl-dongleselect.cpp \ + moc_sdrplay-handler.cpp \ + moc_sdrplayselect.cpp \ + moc_airspy-handler.cpp +OBJECTS = main.o \ + radio.o \ + dab-processor.o \ + spectrum-handler.o \ + sample-reader.o \ + ofdm-decoder.o \ + phasereference.o \ + phasetable.o \ + freq-interleaver.o \ + viterbi-768.o \ + fic-handler.o \ + msc-handler.o \ + protection.o \ + eep-protection.o \ + uep-protection.o \ + fib-processor.o \ + galois.o \ + reed-solomon.o \ + rscodec.o \ + charsets.o \ + firecode-checker.o \ + frame-processor.o \ + protTables.o \ + virtual-backend.o \ + audio-backend.o \ + data-backend.o \ + mp2processor.o \ + mp4processor.o \ + faad-decoder.o \ + pad-handler.o \ + data-processor.o \ + virtual-datahandler.o \ + mot-databuilder.o \ + mot-data.o \ + audio-base.o \ + newconverter.o \ + audiosink.o \ + fft-handler.o \ + Xtan2.o \ + dab-params.o \ + band-handler.o \ + text-mapper.o \ + virtual-input.o \ + rawfiles.o \ + wavfiles.o \ + rtlsdr-handler.o \ + rtl-dongleselect.o \ + sdrplay-handler.o \ + sdrplayselect.o \ + airspy-handler.o \ + airspyfilter.o \ + spiral-sse.o \ + qrc_resources.o \ + moc_radio.o \ + moc_dab-processor.o \ + moc_sample-reader.o \ + moc_ofdm-decoder.o \ + moc_phasereference.o \ + moc_fic-handler.o \ + moc_fib-processor.o \ + moc_data-backend.o \ + moc_mp2processor.o \ + moc_mp4processor.o \ + moc_faad-decoder.o \ + moc_data-processor.o \ + moc_pad-handler.o \ + moc_virtual-datahandler.o \ + moc_mot-data.o \ + moc_audio-base.o \ + moc_rtlsdr-handler.o \ + moc_rtl-dongleselect.o \ + moc_sdrplay-handler.o \ + moc_sdrplayselect.o \ + moc_airspy-handler.o +DIST = ../../../../lib64/qt5/mkspecs/features/spec_pre.prf \ + ../../../../lib64/qt5/mkspecs/common/unix.conf \ + ../../../../lib64/qt5/mkspecs/common/linux.conf \ + ../../../../lib64/qt5/mkspecs/common/sanitize.conf \ + ../../../../lib64/qt5/mkspecs/common/gcc-base.conf \ + ../../../../lib64/qt5/mkspecs/common/gcc-base-unix.conf \ + ../../../../lib64/qt5/mkspecs/common/g++-base.conf \ + ../../../../lib64/qt5/mkspecs/common/g++-unix.conf \ + ../../../../lib64/qt5/mkspecs/qconfig.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3danimation.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3danimation_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dcore.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dcore_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dextras.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dextras_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dinput.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dinput_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dlogic.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dlogic_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquick.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquick_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickanimation.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickanimation_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickextras.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickextras_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickinput.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickinput_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickrender.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickrender_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickscene2d.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickscene2d_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3drender.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3drender_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_bluetooth.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_bluetooth_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_charts.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_charts_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_concurrent.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_core.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_core_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_dbus.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_dbus_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_designer.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_designer_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_designercomponents_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_enginio.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_enginio_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_gui.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_gui_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_help.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_help_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_input_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_location.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_location_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_multimedia.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_multimedia_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_multimediawidgets_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_network.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_network_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_nfc.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_nfc_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_opengl.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_opengl_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_openglextensions.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_packetprotocol_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_positioning.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_positioning_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_printsupport.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qml.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qml_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qmldebug_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qmldevtools_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qmltest.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qmltest_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_quick.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_quick_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_quickparticles_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_quickwidgets_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_script.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_script_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_scripttools.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_scripttools_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_sensors.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_sensors_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_serialport.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_serialport_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_service_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_sql.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_sql_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_svg.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_svg_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_testlib.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_testlib_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_uiplugin.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_uitools.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_uitools_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandclient.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandclient_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandcompositor.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandcompositor_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_webchannel.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_webchannel_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_webkit.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_websockets.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_websockets_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_widgets.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_widgets_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_x11extras.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_x11extras_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_xml.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_xml_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_xmlpatterns_private.pri \ + ../../../../lib64/qt5/mkspecs/features/qt_functions.prf \ + ../../../../lib64/qt5/mkspecs/features/qt_config.prf \ + ../../../../lib64/qt5/mkspecs/linux-g++/qmake.conf \ + ../../../../lib64/qt5/mkspecs/features/spec_post.prf \ + .qmake.stash \ + ../../../../lib64/qt5/mkspecs/features/exclusive_builds.prf \ + ../../../../lib64/qt5/mkspecs/features/toolchain.prf \ + ../../../../lib64/qt5/mkspecs/features/default_pre.prf \ + ../../../../lib64/qt5/mkspecs/features/resolve_config.prf \ + ../../../../lib64/qt5/mkspecs/features/default_post.prf \ + ../../../../lib64/qt5/mkspecs/features/warn_on.prf \ + ../../../../lib64/qt5/mkspecs/features/qt.prf \ + ../../../../lib64/qt5/mkspecs/features/resources.prf \ + ../../../../lib64/qt5/mkspecs/features/moc.prf \ + ../../../../lib64/qt5/mkspecs/features/unix/opengl.prf \ + ../../../../lib64/qt5/mkspecs/features/uic.prf \ + ../../../../lib64/qt5/mkspecs/features/unix/thread.prf \ + ../../../../lib64/qt5/mkspecs/features/qmake_use.prf \ + ../../../../lib64/qt5/mkspecs/features/file_copies.prf \ + ../../../../lib64/qt5/mkspecs/features/testcase_targets.prf \ + ../../../../lib64/qt5/mkspecs/features/exceptions.prf \ + ../../../../lib64/qt5/mkspecs/features/yacc.prf \ + ../../../../lib64/qt5/mkspecs/features/lex.prf \ + dab3.pro radio.h \ + dab-processor.h \ + dab-scope/spectrum-handler.h \ + includes/dab-constants.h \ + includes/country-codes.h \ + includes/ofdm/sample-reader.h \ + includes/ofdm/ofdm-decoder.h \ + includes/ofdm/phasereference.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fic-handler.h \ + includes/backend/msc-handler.h \ + includes/backend/fib-processor.h \ + includes/backend/galois.h \ + includes/backend/reed-solomon.h \ + includes/backend/rscodec.h \ + includes/backend/charsets.h \ + includes/backend/firecode-checker.h \ + includes/backend/frame-processor.h \ + includes/backend/virtual-backend.h \ + includes/backend/audio-backend.h \ + includes/backend/data-backend.h \ + includes/backend/audio/mp2processor.h \ + includes/backend/audio/mp4processor.h \ + includes/backend/audio/faad-decoder.h \ + includes/backend/data/data-processor.h \ + includes/backend/data/pad-handler.h \ + includes/backend/data/virtual-datahandler.h \ + includes/backend/data/mot-databuilder.h \ + includes/backend/data/mot-data.h \ + includes/backend/protection.h \ + includes/backend/eep-protection.h \ + includes/backend/uep-protection.h \ + includes/output/audio-base.h \ + includes/output/newconverter.h \ + includes/output/audiosink.h \ + includes/various/fft-handler.h \ + includes/various/ringbuffer.h \ + includes/various/Xtan2.h \ + includes/various/dab-params.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + devices/virtual-input.h \ + devices/rawfiles/rawfiles.h \ + devices/wavfiles/wavfiles.h \ + devices/rtlsdr-handler/rtlsdr-handler.h \ + devices/rtlsdr-handler/rtl-dongleselect.h \ + devices/sdrplay-handler/sdrplay-handler.h \ + devices/sdrplay-handler/sdrplayselect.h \ + devices/airspy-handler/airspy-handler.h \ + devices/airspy-handler/airspyfilter.h \ + devices/airspy-handler/libairspy/airspy.h \ + src/backend/viterbi_768/spiral-sse.h main.cpp \ + radio.cpp \ + dab-processor.cpp \ + dab-scope/spectrum-handler.cpp \ + src/ofdm/sample-reader.cpp \ + src/ofdm/ofdm-decoder.cpp \ + src/ofdm/phasereference.cpp \ + src/ofdm/phasetable.cpp \ + src/ofdm/freq-interleaver.cpp \ + src/backend/viterbi_768/viterbi-768.cpp \ + src/backend/fic-handler.cpp \ + src/backend/msc-handler.cpp \ + src/backend/protection.cpp \ + src/backend/eep-protection.cpp \ + src/backend/uep-protection.cpp \ + src/backend/fib-processor.cpp \ + src/backend/galois.cpp \ + src/backend/reed-solomon.cpp \ + src/backend/rscodec.cpp \ + src/backend/charsets.cpp \ + src/backend/firecode-checker.cpp \ + src/backend/frame-processor.cpp \ + src/backend/protTables.cpp \ + src/backend/virtual-backend.cpp \ + src/backend/audio-backend.cpp \ + src/backend/data-backend.cpp \ + src/backend/audio/mp2processor.cpp \ + src/backend/audio/mp4processor.cpp \ + src/backend/audio/faad-decoder.cpp \ + src/backend/data/pad-handler.cpp \ + src/backend/data/data-processor.cpp \ + src/backend/data/virtual-datahandler.cpp \ + src/backend/data/mot-databuilder.cpp \ + src/backend/data/mot-data.cpp \ + src/output/audio-base.cpp \ + src/output/newconverter.cpp \ + src/output/audiosink.cpp \ + src/various/fft-handler.cpp \ + src/various/Xtan2.cpp \ + src/various/dab-params.cpp \ + src/various/band-handler.cpp \ + src/various/text-mapper.cpp \ + devices/virtual-input.cpp \ + devices/rawfiles/rawfiles.cpp \ + devices/wavfiles/wavfiles.cpp \ + devices/rtlsdr-handler/rtlsdr-handler.cpp \ + devices/rtlsdr-handler/rtl-dongleselect.cpp \ + devices/sdrplay-handler/sdrplay-handler.cpp \ + devices/sdrplay-handler/sdrplayselect.cpp \ + devices/airspy-handler/airspy-handler.cpp \ + devices/airspy-handler/airspyfilter.cpp \ + src/backend/viterbi_768/spiral-sse.c +QMAKE_TARGET = dabradio-1.0 +DESTDIR = linux-bin/ +TARGET = linux-bin/dabradio-1.0 + + +first: all +####### Build rules + +$(TARGET): ui_filereader-widget.h ui_technical_data.h ui_dabradio.h ui_rtlsdr-widget.h ui_sdrplay-widget.h ui_airspy-widget.h $(OBJECTS) + @test -d linux-bin/ || mkdir -p linux-bin/ + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) + +Makefile: dab3.pro ../../../../lib64/qt5/mkspecs/linux-g++/qmake.conf ../../../../lib64/qt5/mkspecs/features/spec_pre.prf \ + ../../../../lib64/qt5/mkspecs/common/unix.conf \ + ../../../../lib64/qt5/mkspecs/common/linux.conf \ + ../../../../lib64/qt5/mkspecs/common/sanitize.conf \ + ../../../../lib64/qt5/mkspecs/common/gcc-base.conf \ + ../../../../lib64/qt5/mkspecs/common/gcc-base-unix.conf \ + ../../../../lib64/qt5/mkspecs/common/g++-base.conf \ + ../../../../lib64/qt5/mkspecs/common/g++-unix.conf \ + ../../../../lib64/qt5/mkspecs/qconfig.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3danimation.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3danimation_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dcore.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dcore_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dextras.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dextras_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dinput.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dinput_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dlogic.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dlogic_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquick.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquick_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickanimation.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickanimation_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickextras.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickextras_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickinput.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickinput_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickrender.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickrender_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickscene2d.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickscene2d_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3drender.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_3drender_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_bluetooth.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_bluetooth_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_charts.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_charts_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_concurrent.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_core.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_core_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_dbus.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_dbus_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_designer.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_designer_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_designercomponents_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_enginio.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_enginio_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_gui.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_gui_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_help.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_help_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_input_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_location.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_location_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_multimedia.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_multimedia_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_multimediawidgets_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_network.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_network_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_nfc.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_nfc_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_opengl.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_opengl_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_openglextensions.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_packetprotocol_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_positioning.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_positioning_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_printsupport.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qml.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qml_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qmldebug_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qmldevtools_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qmltest.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qmltest_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_quick.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_quick_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_quickparticles_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_quickwidgets_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_script.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_script_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_scripttools.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_scripttools_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_sensors.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_sensors_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_serialport.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_serialport_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_service_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_sql.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_sql_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_svg.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_svg_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_testlib.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_testlib_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_uiplugin.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_uitools.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_uitools_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandclient.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandclient_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandcompositor.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandcompositor_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_webchannel.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_webchannel_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_webkit.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_websockets.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_websockets_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_widgets.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_widgets_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_x11extras.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_x11extras_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_xml.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_xml_private.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri \ + ../../../../lib64/qt5/mkspecs/modules/qt_lib_xmlpatterns_private.pri \ + ../../../../lib64/qt5/mkspecs/features/qt_functions.prf \ + ../../../../lib64/qt5/mkspecs/features/qt_config.prf \ + ../../../../lib64/qt5/mkspecs/linux-g++/qmake.conf \ + ../../../../lib64/qt5/mkspecs/features/spec_post.prf \ + .qmake.stash \ + ../../../../lib64/qt5/mkspecs/features/exclusive_builds.prf \ + ../../../../lib64/qt5/mkspecs/features/toolchain.prf \ + ../../../../lib64/qt5/mkspecs/features/default_pre.prf \ + ../../../../lib64/qt5/mkspecs/features/resolve_config.prf \ + ../../../../lib64/qt5/mkspecs/features/default_post.prf \ + ../../../../lib64/qt5/mkspecs/features/warn_on.prf \ + ../../../../lib64/qt5/mkspecs/features/qt.prf \ + ../../../../lib64/qt5/mkspecs/features/resources.prf \ + ../../../../lib64/qt5/mkspecs/features/moc.prf \ + ../../../../lib64/qt5/mkspecs/features/unix/opengl.prf \ + ../../../../lib64/qt5/mkspecs/features/uic.prf \ + ../../../../lib64/qt5/mkspecs/features/unix/thread.prf \ + ../../../../lib64/qt5/mkspecs/features/qmake_use.prf \ + ../../../../lib64/qt5/mkspecs/features/file_copies.prf \ + ../../../../lib64/qt5/mkspecs/features/testcase_targets.prf \ + ../../../../lib64/qt5/mkspecs/features/exceptions.prf \ + ../../../../lib64/qt5/mkspecs/features/yacc.prf \ + ../../../../lib64/qt5/mkspecs/features/lex.prf \ + dab3.pro \ + resources.qrc \ + ../../../../lib64/libQt5Widgets.prl \ + ../../../../lib64/libQt5Gui.prl \ + ../../../../lib64/libQt5Core.prl + $(QMAKE) -o Makefile dab3.pro +../../../../lib64/qt5/mkspecs/features/spec_pre.prf: +../../../../lib64/qt5/mkspecs/common/unix.conf: +../../../../lib64/qt5/mkspecs/common/linux.conf: +../../../../lib64/qt5/mkspecs/common/sanitize.conf: +../../../../lib64/qt5/mkspecs/common/gcc-base.conf: +../../../../lib64/qt5/mkspecs/common/gcc-base-unix.conf: +../../../../lib64/qt5/mkspecs/common/g++-base.conf: +../../../../lib64/qt5/mkspecs/common/g++-unix.conf: +../../../../lib64/qt5/mkspecs/qconfig.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3danimation.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3danimation_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dcore.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dcore_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dextras.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dextras_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dinput.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dinput_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dlogic.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dlogic_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquick.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquick_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickanimation.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickanimation_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickextras.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickextras_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickinput.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickinput_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickrender.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickrender_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickscene2d.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3dquickscene2d_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3drender.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_3drender_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_bluetooth.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_bluetooth_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_charts.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_charts_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_concurrent.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_concurrent_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_core.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_core_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_dbus.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_dbus_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_designer.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_designer_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_designercomponents_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_egl_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_enginio.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_enginio_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_fb_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_glx_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_gui.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_gui_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_help.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_help_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_input_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_kms_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_location.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_location_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_multimedia.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_multimedia_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_multimediawidgets_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_network.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_network_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_nfc.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_nfc_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_opengl.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_opengl_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_openglextensions.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_packetprotocol_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_positioning.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_positioning_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_printsupport.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_printsupport_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_qml.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_qml_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_qmldebug_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_qmldevtools_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_qmltest.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_qmltest_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_quick.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_quick_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_quickparticles_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_quickwidgets.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_quickwidgets_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_script.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_script_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_scripttools.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_scripttools_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_sensors.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_sensors_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_serialport.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_serialport_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_service_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_sql.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_sql_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_svg.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_svg_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_testlib.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_testlib_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_theme_support_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_uiplugin.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_uitools.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_uitools_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandclient.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandclient_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandcompositor.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_waylandcompositor_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_webchannel.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_webchannel_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_webkit.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_websockets.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_websockets_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_widgets.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_widgets_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_x11extras.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_x11extras_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_xml.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_xml_private.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri: +../../../../lib64/qt5/mkspecs/modules/qt_lib_xmlpatterns_private.pri: +../../../../lib64/qt5/mkspecs/features/qt_functions.prf: +../../../../lib64/qt5/mkspecs/features/qt_config.prf: +../../../../lib64/qt5/mkspecs/linux-g++/qmake.conf: +../../../../lib64/qt5/mkspecs/features/spec_post.prf: +.qmake.stash: +../../../../lib64/qt5/mkspecs/features/exclusive_builds.prf: +../../../../lib64/qt5/mkspecs/features/toolchain.prf: +../../../../lib64/qt5/mkspecs/features/default_pre.prf: +../../../../lib64/qt5/mkspecs/features/resolve_config.prf: +../../../../lib64/qt5/mkspecs/features/default_post.prf: +../../../../lib64/qt5/mkspecs/features/warn_on.prf: +../../../../lib64/qt5/mkspecs/features/qt.prf: +../../../../lib64/qt5/mkspecs/features/resources.prf: +../../../../lib64/qt5/mkspecs/features/moc.prf: +../../../../lib64/qt5/mkspecs/features/unix/opengl.prf: +../../../../lib64/qt5/mkspecs/features/uic.prf: +../../../../lib64/qt5/mkspecs/features/unix/thread.prf: +../../../../lib64/qt5/mkspecs/features/qmake_use.prf: +../../../../lib64/qt5/mkspecs/features/file_copies.prf: +../../../../lib64/qt5/mkspecs/features/testcase_targets.prf: +../../../../lib64/qt5/mkspecs/features/exceptions.prf: +../../../../lib64/qt5/mkspecs/features/yacc.prf: +../../../../lib64/qt5/mkspecs/features/lex.prf: +dab3.pro: +resources.qrc: +../../../../lib64/libQt5Widgets.prl: +../../../../lib64/libQt5Gui.prl: +../../../../lib64/libQt5Core.prl: +qmake: FORCE + @$(QMAKE) -o Makefile dab3.pro + +qmake_all: FORCE + + +all: Makefile $(TARGET) + +dist: distdir FORCE + (cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR) + +distdir: FORCE + @test -d $(DISTDIR) || mkdir -p $(DISTDIR) + $(COPY_FILE) --parents $(DIST) $(DISTDIR)/ + $(COPY_FILE) --parents resources.qrc $(DISTDIR)/ + $(COPY_FILE) --parents ../../../../lib64/qt5/mkspecs/features/data/dummy.cpp $(DISTDIR)/ + $(COPY_FILE) --parents radio.h dab-processor.h dab-scope/spectrum-handler.h includes/dab-constants.h includes/country-codes.h includes/ofdm/sample-reader.h includes/ofdm/ofdm-decoder.h includes/ofdm/phasereference.h includes/ofdm/phasetable.h includes/ofdm/freq-interleaver.h includes/backend/viterbi_768/viterbi-768.h includes/backend/fic-handler.h includes/backend/msc-handler.h includes/backend/fib-processor.h includes/backend/galois.h includes/backend/reed-solomon.h includes/backend/rscodec.h includes/backend/charsets.h includes/backend/firecode-checker.h includes/backend/frame-processor.h includes/backend/virtual-backend.h includes/backend/audio-backend.h includes/backend/data-backend.h includes/backend/audio/mp2processor.h includes/backend/audio/mp4processor.h includes/backend/audio/faad-decoder.h includes/backend/data/data-processor.h includes/backend/data/pad-handler.h includes/backend/data/virtual-datahandler.h includes/backend/data/mot-databuilder.h includes/backend/data/mot-data.h includes/backend/protection.h includes/backend/eep-protection.h includes/backend/uep-protection.h includes/output/audio-base.h includes/output/newconverter.h includes/output/audiosink.h includes/various/fft-handler.h includes/various/ringbuffer.h includes/various/Xtan2.h includes/various/dab-params.h includes/various/band-handler.h includes/various/text-mapper.h devices/virtual-input.h devices/rawfiles/rawfiles.h devices/wavfiles/wavfiles.h devices/rtlsdr-handler/rtlsdr-handler.h devices/rtlsdr-handler/rtl-dongleselect.h devices/sdrplay-handler/sdrplay-handler.h devices/sdrplay-handler/sdrplayselect.h devices/airspy-handler/airspy-handler.h devices/airspy-handler/airspyfilter.h devices/airspy-handler/libairspy/airspy.h src/backend/viterbi_768/spiral-sse.h $(DISTDIR)/ + $(COPY_FILE) --parents main.cpp radio.cpp dab-processor.cpp dab-scope/spectrum-handler.cpp src/ofdm/sample-reader.cpp src/ofdm/ofdm-decoder.cpp src/ofdm/phasereference.cpp src/ofdm/phasetable.cpp src/ofdm/freq-interleaver.cpp src/backend/viterbi_768/viterbi-768.cpp src/backend/fic-handler.cpp src/backend/msc-handler.cpp src/backend/protection.cpp src/backend/eep-protection.cpp src/backend/uep-protection.cpp src/backend/fib-processor.cpp src/backend/galois.cpp src/backend/reed-solomon.cpp src/backend/rscodec.cpp src/backend/charsets.cpp src/backend/firecode-checker.cpp src/backend/frame-processor.cpp src/backend/protTables.cpp src/backend/virtual-backend.cpp src/backend/audio-backend.cpp src/backend/data-backend.cpp src/backend/audio/mp2processor.cpp src/backend/audio/mp4processor.cpp src/backend/audio/faad-decoder.cpp src/backend/data/pad-handler.cpp src/backend/data/data-processor.cpp src/backend/data/virtual-datahandler.cpp src/backend/data/mot-databuilder.cpp src/backend/data/mot-data.cpp src/output/audio-base.cpp src/output/newconverter.cpp src/output/audiosink.cpp src/various/fft-handler.cpp src/various/Xtan2.cpp src/various/dab-params.cpp src/various/band-handler.cpp src/various/text-mapper.cpp devices/virtual-input.cpp devices/rawfiles/rawfiles.cpp devices/wavfiles/wavfiles.cpp devices/rtlsdr-handler/rtlsdr-handler.cpp devices/rtlsdr-handler/rtl-dongleselect.cpp devices/sdrplay-handler/sdrplay-handler.cpp devices/sdrplay-handler/sdrplayselect.cpp devices/airspy-handler/airspy-handler.cpp devices/airspy-handler/airspyfilter.cpp src/backend/viterbi_768/spiral-sse.c $(DISTDIR)/ + $(COPY_FILE) --parents devices/filereader-widget.ui forms/technical_data.ui forms/dabradio.ui devices/rtlsdr-handler/rtlsdr-widget.ui devices/sdrplay-handler/sdrplay-widget.ui devices/airspy-handler/airspy-widget.ui $(DISTDIR)/ + $(COPY_FILE) --parents i18n/de_DE.ts i18n/it_IT.ts i18n/hu_HU.ts $(DISTDIR)/ + + +clean: compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) *~ core *.core + + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) .qmake.stash + -$(DEL_FILE) Makefile + + +####### Sub-libraries + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +check: first + +benchmark: first + +compiler_rcc_make_all: qrc_resources.cpp +compiler_rcc_clean: + -$(DEL_FILE) qrc_resources.cpp +qrc_resources.cpp: resources.qrc \ + ../../../../lib64/qt5/bin/rcc \ + dabradio.ico \ + AUTHORS \ + COPYING \ + i18n/hu_HU.qm \ + i18n/it_IT.qm \ + i18n/de_DE.qm + /usr/lib64/qt5/bin/rcc -name resources resources.qrc -o qrc_resources.cpp + +compiler_moc_predefs_make_all: moc_predefs.h +compiler_moc_predefs_clean: + -$(DEL_FILE) moc_predefs.h +moc_predefs.h: ../../../../lib64/qt5/mkspecs/features/data/dummy.cpp + g++ -pipe -std=c++11 -g -isystem /usr/include/qt5 -O2 -Wall -W -dM -E -o moc_predefs.h ../../../../lib64/qt5/mkspecs/features/data/dummy.cpp + +compiler_moc_header_make_all: moc_radio.cpp moc_dab-processor.cpp moc_sample-reader.cpp moc_ofdm-decoder.cpp moc_phasereference.cpp moc_fic-handler.cpp moc_fib-processor.cpp moc_data-backend.cpp moc_mp2processor.cpp moc_mp4processor.cpp moc_faad-decoder.cpp moc_data-processor.cpp moc_pad-handler.cpp moc_virtual-datahandler.cpp moc_mot-data.cpp moc_audio-base.cpp moc_rtlsdr-handler.cpp moc_rtl-dongleselect.cpp moc_sdrplay-handler.cpp moc_sdrplayselect.cpp moc_airspy-handler.cpp +compiler_moc_header_clean: + -$(DEL_FILE) moc_radio.cpp moc_dab-processor.cpp moc_sample-reader.cpp moc_ofdm-decoder.cpp moc_phasereference.cpp moc_fic-handler.cpp moc_fib-processor.cpp moc_data-backend.cpp moc_mp2processor.cpp moc_mp4processor.cpp moc_faad-decoder.cpp moc_data-processor.cpp moc_pad-handler.cpp moc_virtual-datahandler.cpp moc_mot-data.cpp moc_audio-base.cpp moc_rtlsdr-handler.cpp moc_rtl-dongleselect.cpp moc_sdrplay-handler.cpp moc_sdrplayselect.cpp moc_airspy-handler.cpp +moc_radio.cpp: includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h \ + radio.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include radio.h -o moc_radio.cpp + +moc_dab-processor.cpp: includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + dab-processor.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include dab-processor.h -o moc_dab-processor.cpp + +moc_sample-reader.cpp: includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/sample-reader.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/ofdm/sample-reader.h -o moc_sample-reader.cpp + +moc_ofdm-decoder.cpp: includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/freq-interleaver.h \ + includes/ofdm/ofdm-decoder.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/ofdm/ofdm-decoder.h -o moc_ofdm-decoder.cpp + +moc_phasereference.cpp: ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/various/fft-handler.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/ofdm/phasereference.h -o moc_phasereference.cpp + +moc_fic-handler.cpp: includes/backend/viterbi_768/viterbi-768.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + ../../../../include/qt5/QtCore/QMutex \ + includes/various/ringbuffer.h \ + includes/various/dab-params.h \ + includes/backend/fic-handler.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/backend/fic-handler.h -o moc_fic-handler.cpp + +moc_fib-processor.cpp: ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/backend/msc-handler.h \ + ../../../../include/qt5/QtCore/QMutex \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + includes/various/ringbuffer.h \ + includes/various/dab-params.h \ + includes/backend/fib-processor.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/backend/fib-processor.h -o moc_fib-processor.cpp + +moc_data-backend.cpp: ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/various/ringbuffer.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + includes/backend/virtual-backend.h \ + includes/backend/data-backend.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/backend/data-backend.h -o moc_data-backend.cpp + +moc_mp2processor.cpp: includes/backend/frame-processor.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/various/ringbuffer.h \ + includes/backend/data/pad-handler.h \ + includes/backend/audio/mp2processor.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/backend/audio/mp2processor.h -o moc_mp2processor.cpp + +moc_mp4processor.cpp: includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + includes/output/audio-base.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/output/newconverter.h \ + includes/various/ringbuffer.h \ + includes/backend/frame-processor.h \ + includes/backend/audio/faad-decoder.h \ + includes/backend/audio/neaacdec.h \ + includes/backend/firecode-checker.h \ + includes/backend/reed-solomon.h \ + includes/backend/galois.h \ + includes/backend/data/pad-handler.h \ + includes/backend/audio/mp4processor.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/backend/audio/mp4processor.h -o moc_mp4processor.cpp + +moc_faad-decoder.cpp: ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/backend/audio/neaacdec.h \ + includes/various/ringbuffer.h \ + includes/backend/audio/faad-decoder.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/backend/audio/faad-decoder.h -o moc_faad-decoder.cpp + +moc_data-processor.cpp: includes/backend/frame-processor.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/various/ringbuffer.h \ + includes/backend/data/data-processor.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/backend/data/data-processor.h -o moc_data-processor.cpp + +moc_pad-handler.cpp: ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/backend/data/pad-handler.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/backend/data/pad-handler.h -o moc_pad-handler.cpp + +moc_virtual-datahandler.cpp: includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/backend/data/virtual-datahandler.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/backend/data/virtual-datahandler.h -o moc_virtual-datahandler.cpp + +moc_mot-data.cpp: includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtGui/QImage \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtCore/QByteArray \ + includes/backend/data/mot-data.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/backend/data/mot-data.h -o moc_mot-data.cpp + +moc_audio-base.cpp: includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/output/newconverter.h \ + includes/various/ringbuffer.h \ + includes/output/audio-base.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include includes/output/audio-base.h -o moc_audio-base.cpp + +moc_rtlsdr-handler.cpp: ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/QSettings \ + ../../../../include/qt5/QtCore/qsettings.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + ui_rtlsdr-widget.h \ + devices/rtlsdr-handler/rtlsdr-handler.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include devices/rtlsdr-handler/rtlsdr-handler.h -o moc_rtlsdr-handler.cpp + +moc_rtl-dongleselect.cpp: ../../../../include/qt5/QtWidgets/QDialog \ + ../../../../include/qt5/QtWidgets/qdialog.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QListView \ + ../../../../include/qt5/QtWidgets/qlistview.h \ + ../../../../include/qt5/QtWidgets/qabstractitemview.h \ + ../../../../include/qt5/QtWidgets/qabstractscrollarea.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtCore/qitemselectionmodel.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/QStringList \ + devices/rtlsdr-handler/rtl-dongleselect.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include devices/rtlsdr-handler/rtl-dongleselect.h -o moc_rtl-dongleselect.cpp + +moc_sdrplay-handler.cpp: ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtWidgets/QFrame \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtCore/QSettings \ + ../../../../include/qt5/QtCore/qsettings.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + includes/various/ringbuffer.h \ + devices/virtual-input.h \ + ui_sdrplay-widget.h \ + devices/sdrplay-handler/mirsdrapi-rsp.h \ + devices/sdrplay-handler/sdrplay-handler.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include devices/sdrplay-handler/sdrplay-handler.h -o moc_sdrplay-handler.cpp + +moc_sdrplayselect.cpp: ../../../../include/qt5/QtWidgets/QDialog \ + ../../../../include/qt5/QtWidgets/qdialog.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QListView \ + ../../../../include/qt5/QtWidgets/qlistview.h \ + ../../../../include/qt5/QtWidgets/qabstractitemview.h \ + ../../../../include/qt5/QtWidgets/qabstractscrollarea.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtCore/qitemselectionmodel.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/QStringList \ + devices/sdrplay-handler/sdrplayselect.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include devices/sdrplay-handler/sdrplayselect.h -o moc_sdrplayselect.cpp + +moc_airspy-handler.cpp: ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/QSettings \ + ../../../../include/qt5/QtCore/qsettings.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtWidgets/QFrame \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + includes/various/ringbuffer.h \ + devices/virtual-input.h \ + ui_airspy-widget.h \ + devices/airspy-handler/libairspy/airspy.h \ + devices/airspy-handler/libairspy/airspy_commands.h \ + devices/airspy-handler/airspy-handler.h \ + moc_predefs.h \ + ../../../../lib64/qt5/bin/moc + /usr/lib64/qt5/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3 -I/usr/shared/sdr-j-development/systems/dab3/src -I/usr/shared/sdr-j-development/systems/dab3/dab-scope -I/usr/shared/sdr-j-development/systems/dab3/includes -I/usr/shared/sdr-j-development/systems/dab3/includes/ofdm -I/usr/shared/sdr-j-development/systems/dab3/includes/backend -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/viterbi_768 -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/audio -I/usr/shared/sdr-j-development/systems/dab3/includes/backend/data -I/usr/shared/sdr-j-development/systems/dab3/includes/output -I/usr/shared/sdr-j-development/systems/dab3/includes/various -I/usr/shared/sdr-j-development/systems/dab3/devices -I/usr/shared/sdr-j-development/systems/dab3/devices/rawfiles -I/usr/shared/sdr-j-development/systems/dab3/devices/wavfiles -I/usr/local/include -I/usr/local/include -I/usr/include/qt4/qwt -I/usr/include/qt5/qwt -I/usr/include/qt4/qwt -I/usr/include/qwt -I/usr/local/qwt-6.1.4-svn -I/usr/shared/sdr-j-development/systems/dab3/devices/rtlsdr-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/sdrplay-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler -I/usr/shared/sdr-j-development/systems/dab3/devices/airspy-handler/libairspy -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-redhat-linux -I/usr/include/c++/7/backward -I/usr/lib/gcc/x86_64-redhat-linux/7/include -I/usr/local/include -I/usr/include devices/airspy-handler/airspy-handler.h -o moc_airspy-handler.cpp + +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: ui_filereader-widget.h ui_technical_data.h ui_dabradio.h ui_rtlsdr-widget.h ui_sdrplay-widget.h ui_airspy-widget.h +compiler_uic_clean: + -$(DEL_FILE) ui_filereader-widget.h ui_technical_data.h ui_dabradio.h ui_rtlsdr-widget.h ui_sdrplay-widget.h ui_airspy-widget.h +ui_filereader-widget.h: devices/filereader-widget.ui \ + ../../../../lib64/qt5/bin/uic + /usr/lib64/qt5/bin/uic devices/filereader-widget.ui -o ui_filereader-widget.h + +ui_technical_data.h: forms/technical_data.ui \ + ../../../../lib64/qt5/bin/uic + /usr/lib64/qt5/bin/uic forms/technical_data.ui -o ui_technical_data.h + +ui_dabradio.h: forms/dabradio.ui \ + ../../../../lib64/qt5/bin/uic \ + ../../../../include/qt5/qwt/qwt_plot.h \ + ../../../../include/qt5/qwt/qwt_global.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/qwt/qwt_text.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/qwt/qwt_plot_dict.h \ + ../../../../include/qt5/qwt/qwt_plot_item.h \ + ../../../../include/qt5/qwt/qwt_legend_data.h \ + ../../../../include/qt5/qwt/qwt_graphic.h \ + ../../../../include/qt5/qwt/qwt_null_paintdevice.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpaintengine.h \ + ../../../../include/qt5/QtGui/qpainter.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qtextoption.h \ + ../../../../include/qt5/QtGui/qpen.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/qwt/qwt_scale_map.h \ + ../../../../include/qt5/qwt/qwt_transform.h \ + ../../../../include/qt5/qwt/qwt_interval.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h + /usr/lib64/qt5/bin/uic forms/dabradio.ui -o ui_dabradio.h + +ui_rtlsdr-widget.h: devices/rtlsdr-handler/rtlsdr-widget.ui \ + ../../../../lib64/qt5/bin/uic + /usr/lib64/qt5/bin/uic devices/rtlsdr-handler/rtlsdr-widget.ui -o ui_rtlsdr-widget.h + +ui_sdrplay-widget.h: devices/sdrplay-handler/sdrplay-widget.ui \ + ../../../../lib64/qt5/bin/uic + /usr/lib64/qt5/bin/uic devices/sdrplay-handler/sdrplay-widget.ui -o ui_sdrplay-widget.h + +ui_airspy-widget.h: devices/airspy-handler/airspy-widget.ui \ + ../../../../lib64/qt5/bin/uic + /usr/lib64/qt5/bin/uic devices/airspy-handler/airspy-widget.ui -o ui_airspy-widget.h + +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_rcc_clean compiler_moc_predefs_clean compiler_moc_header_clean compiler_uic_clean + +####### Compile + +main.o: main.cpp ../../../../include/qt5/QtWidgets/QApplication \ + ../../../../include/qt5/QtWidgets/qapplication.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtCore/qcoreapplication.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/qeventloop.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtWidgets/qdesktopwidget.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtGui/qguiapplication.h \ + ../../../../include/qt5/QtGui/qinputmethod.h \ + ../../../../include/qt5/QtCore/QSettings \ + ../../../../include/qt5/QtCore/qsettings.h \ + ../../../../include/qt5/QtCore/QTranslator \ + ../../../../include/qt5/QtCore/qtranslator.h \ + ../../../../include/qt5/QtCore/QDir \ + ../../../../include/qt5/QtCore/qdir.h \ + ../../../../include/qt5/QtCore/qfileinfo.h \ + ../../../../include/qt5/QtCore/QDebug \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp + +radio.o: radio.cpp ../../../../include/qt5/QtCore/QSettings \ + ../../../../include/qt5/QtCore/qsettings.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtWidgets/QMessageBox \ + ../../../../include/qt5/QtWidgets/qmessagebox.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qdialog.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/QFileDialog \ + ../../../../include/qt5/QtWidgets/qfiledialog.h \ + ../../../../include/qt5/QtCore/qdir.h \ + ../../../../include/qt5/QtCore/qfileinfo.h \ + ../../../../include/qt5/QtCore/QDebug \ + ../../../../include/qt5/QtCore/QDateTime \ + ../../../../include/qt5/QtCore/qdatetime.h \ + ../../../../include/qt5/QtCore/QFile \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtCore/QDir \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h \ + devices/wavfiles/wavfiles.h \ + ../../../../include/qt5/QtWidgets/QFrame \ + ui_filereader-widget.h \ + devices/rawfiles/rawfiles.h \ + includes/output/audiosink.h \ + includes/output/audio-base.h \ + includes/output/newconverter.h \ + dab-scope/spectrum-handler.h \ + ../../../../include/qt5/qwt/qwt.h \ + ../../../../include/qt5/qwt/qwt_global.h \ + ../../../../include/qt5/qwt/qwt_plot.h \ + ../../../../include/qt5/qwt/qwt_text.h \ + ../../../../include/qt5/qwt/qwt_plot_dict.h \ + ../../../../include/qt5/qwt/qwt_plot_item.h \ + ../../../../include/qt5/qwt/qwt_legend_data.h \ + ../../../../include/qt5/qwt/qwt_graphic.h \ + ../../../../include/qt5/qwt/qwt_null_paintdevice.h \ + ../../../../include/qt5/QtGui/qpaintengine.h \ + ../../../../include/qt5/QtGui/qpainter.h \ + ../../../../include/qt5/QtGui/qtextoption.h \ + ../../../../include/qt5/QtGui/qpen.h \ + ../../../../include/qt5/qwt/qwt_scale_map.h \ + ../../../../include/qt5/qwt/qwt_transform.h \ + ../../../../include/qt5/qwt/qwt_interval.h \ + ../../../../include/qt5/qwt/qwt_plot_marker.h \ + ../../../../include/qt5/qwt/qwt_plot_grid.h \ + ../../../../include/qt5/qwt/qwt_scale_div.h \ + ../../../../include/qt5/qwt/qwt_plot_curve.h \ + ../../../../include/qt5/qwt/qwt_plot_seriesitem.h \ + ../../../../include/qt5/qwt/qwt_series_data.h \ + ../../../../include/qt5/qwt/qwt_samples.h \ + ../../../../include/qt5/qwt/qwt_point_3d.h \ + ../../../../include/qt5/qwt/qwt_point_polar.h \ + ../../../../include/qt5/qwt/qwt_math.h \ + ../../../../include/qt5/QtCore/qmath.h \ + ../../../../include/qt5/qwt/qwt_series_store.h \ + devices/rtlsdr-handler/rtlsdr-handler.h \ + ui_rtlsdr-widget.h \ + devices/sdrplay-handler/sdrplay-handler.h \ + ui_sdrplay-widget.h \ + devices/sdrplay-handler/mirsdrapi-rsp.h \ + devices/airspy-handler/airspy-handler.h \ + ui_airspy-widget.h \ + devices/airspy-handler/libairspy/airspy.h \ + devices/airspy-handler/libairspy/airspy_commands.h \ + ../../../../include/qt5/QtGui/QCloseEvent + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o radio.o radio.cpp + +dab-processor.o: dab-processor.cpp dab-processor.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o dab-processor.o dab-processor.cpp + +spectrum-handler.o: dab-scope/spectrum-handler.cpp dab-scope/spectrum-handler.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/various/ringbuffer.h \ + ../../../../include/qt5/qwt/qwt.h \ + ../../../../include/qt5/qwt/qwt_global.h \ + ../../../../include/qt5/qwt/qwt_plot.h \ + ../../../../include/qt5/qwt/qwt_text.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/qwt/qwt_plot_dict.h \ + ../../../../include/qt5/qwt/qwt_plot_item.h \ + ../../../../include/qt5/qwt/qwt_legend_data.h \ + ../../../../include/qt5/qwt/qwt_graphic.h \ + ../../../../include/qt5/qwt/qwt_null_paintdevice.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpaintengine.h \ + ../../../../include/qt5/QtGui/qpainter.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qtextoption.h \ + ../../../../include/qt5/QtGui/qpen.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/qwt/qwt_scale_map.h \ + ../../../../include/qt5/qwt/qwt_transform.h \ + ../../../../include/qt5/qwt/qwt_interval.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/qwt/qwt_plot_marker.h \ + ../../../../include/qt5/qwt/qwt_plot_grid.h \ + ../../../../include/qt5/qwt/qwt_scale_div.h \ + ../../../../include/qt5/qwt/qwt_plot_curve.h \ + ../../../../include/qt5/qwt/qwt_plot_seriesitem.h \ + ../../../../include/qt5/qwt/qwt_series_data.h \ + ../../../../include/qt5/qwt/qwt_samples.h \ + ../../../../include/qt5/qwt/qwt_point_3d.h \ + ../../../../include/qt5/qwt/qwt_point_polar.h \ + ../../../../include/qt5/qwt/qwt_math.h \ + ../../../../include/qt5/QtCore/qmath.h \ + ../../../../include/qt5/qwt/qwt_series_store.h \ + ../../../../include/qt5/QtGui/QColor + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o spectrum-handler.o dab-scope/spectrum-handler.cpp + +sample-reader.o: src/ofdm/sample-reader.cpp includes/ofdm/sample-reader.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sample-reader.o src/ofdm/sample-reader.cpp + +ofdm-decoder.o: src/ofdm/ofdm-decoder.cpp includes/ofdm/ofdm-decoder.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/freq-interleaver.h \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/ofdm/phasereference.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ofdm-decoder.o src/ofdm/ofdm-decoder.cpp + +phasereference.o: src/ofdm/phasereference.cpp includes/ofdm/phasereference.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/various/fft-handler.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/various/ringbuffer.h \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o phasereference.o src/ofdm/phasereference.cpp + +phasetable.o: src/ofdm/phasetable.cpp includes/ofdm/phasetable.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o phasetable.o src/ofdm/phasetable.cpp + +freq-interleaver.o: src/ofdm/freq-interleaver.cpp includes/ofdm/freq-interleaver.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + includes/various/dab-params.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o freq-interleaver.o src/ofdm/freq-interleaver.cpp + +viterbi-768.o: src/backend/viterbi_768/viterbi-768.cpp includes/backend/mm_malloc.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o viterbi-768.o src/backend/viterbi_768/viterbi-768.cpp + +fic-handler.o: src/backend/fic-handler.cpp includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + ../../../../include/qt5/QtCore/QMutex \ + includes/various/ringbuffer.h \ + includes/various/dab-params.h \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h \ + includes/backend/protTables.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o fic-handler.o src/backend/fic-handler.cpp + +msc-handler.o: src/backend/msc-handler.cpp includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h \ + includes/backend/virtual-backend.h \ + includes/backend/audio-backend.h \ + includes/backend/data-backend.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o msc-handler.o src/backend/msc-handler.cpp + +protection.o: src/backend/protection.cpp includes/backend/protection.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o protection.o src/backend/protection.cpp + +eep-protection.o: src/backend/eep-protection.cpp includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + includes/backend/eep-protection.h \ + includes/backend/protection.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/protTables.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o eep-protection.o src/backend/eep-protection.cpp + +uep-protection.o: src/backend/uep-protection.cpp includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + includes/backend/uep-protection.h \ + includes/backend/protection.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/protTables.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o uep-protection.o src/backend/uep-protection.cpp + +fib-processor.o: src/backend/fib-processor.cpp includes/backend/fib-processor.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/backend/msc-handler.h \ + ../../../../include/qt5/QtCore/QMutex \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + includes/various/ringbuffer.h \ + includes/various/dab-params.h \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h \ + includes/backend/charsets.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o fib-processor.o src/backend/fib-processor.cpp + +galois.o: src/backend/galois.cpp includes/backend/galois.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o galois.o src/backend/galois.cpp + +reed-solomon.o: src/backend/reed-solomon.cpp includes/backend/reed-solomon.h \ + includes/backend/galois.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o reed-solomon.o src/backend/reed-solomon.cpp + +rscodec.o: src/backend/rscodec.cpp includes/backend/rscodec.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o rscodec.o src/backend/rscodec.cpp + +charsets.o: src/backend/charsets.cpp includes/backend/charsets.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o charsets.o src/backend/charsets.cpp + +firecode-checker.o: src/backend/firecode-checker.cpp includes/backend/firecode-checker.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o firecode-checker.o src/backend/firecode-checker.cpp + +frame-processor.o: src/backend/frame-processor.cpp includes/backend/frame-processor.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o frame-processor.o src/backend/frame-processor.cpp + +protTables.o: src/backend/protTables.cpp includes/backend/protTables.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o protTables.o src/backend/protTables.cpp + +virtual-backend.o: src/backend/virtual-backend.cpp includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + includes/backend/virtual-backend.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o virtual-backend.o src/backend/virtual-backend.cpp + +audio-backend.o: src/backend/audio-backend.cpp includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + includes/backend/audio-backend.h \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/backend/virtual-backend.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/various/ringbuffer.h \ + includes/backend/audio/mp2processor.h \ + includes/backend/frame-processor.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/backend/data/pad-handler.h \ + includes/backend/audio/mp4processor.h \ + includes/output/audio-base.h \ + ../../../../include/qt5/QtCore/QMutex \ + includes/output/newconverter.h \ + includes/backend/audio/faad-decoder.h \ + includes/backend/audio/neaacdec.h \ + includes/backend/firecode-checker.h \ + includes/backend/reed-solomon.h \ + includes/backend/galois.h \ + includes/backend/eep-protection.h \ + includes/backend/protection.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/uep-protection.h \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o audio-backend.o src/backend/audio-backend.cpp + +data-backend.o: src/backend/data-backend.cpp includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h \ + includes/backend/frame-processor.h \ + includes/backend/data-backend.h \ + includes/backend/virtual-backend.h \ + includes/backend/eep-protection.h \ + includes/backend/protection.h \ + includes/backend/uep-protection.h \ + includes/backend/data/data-processor.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o data-backend.o src/backend/data-backend.cpp + +mp2processor.o: src/backend/audio/mp2processor.cpp includes/backend/audio/mp2processor.h \ + includes/backend/frame-processor.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/various/ringbuffer.h \ + includes/backend/data/pad-handler.h \ + radio.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mp2processor.o src/backend/audio/mp2processor.cpp + +mp4processor.o: src/backend/audio/mp4processor.cpp includes/backend/audio/mp4processor.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + includes/output/audio-base.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/output/newconverter.h \ + includes/various/ringbuffer.h \ + includes/backend/frame-processor.h \ + includes/backend/audio/faad-decoder.h \ + includes/backend/audio/neaacdec.h \ + includes/backend/firecode-checker.h \ + includes/backend/reed-solomon.h \ + includes/backend/galois.h \ + includes/backend/data/pad-handler.h \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h \ + includes/backend/charsets.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mp4processor.o src/backend/audio/mp4processor.cpp + +faad-decoder.o: src/backend/audio/faad-decoder.cpp includes/backend/audio/faad-decoder.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/backend/audio/neaacdec.h \ + includes/various/ringbuffer.h \ + radio.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o faad-decoder.o src/backend/audio/faad-decoder.cpp + +pad-handler.o: src/backend/data/pad-handler.cpp includes/backend/data/pad-handler.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + radio.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h \ + includes/backend/charsets.h \ + includes/backend/data/mot-data.h \ + ../../../../include/qt5/QtGui/QImage \ + ../../../../include/qt5/QtCore/QByteArray + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pad-handler.o src/backend/data/pad-handler.cpp + +data-processor.o: src/backend/data/data-processor.cpp includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h \ + includes/backend/data/data-processor.h \ + includes/backend/frame-processor.h \ + includes/backend/data/virtual-datahandler.h \ + includes/backend/data/mot-databuilder.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o data-processor.o src/backend/data/data-processor.cpp + +virtual-datahandler.o: src/backend/data/virtual-datahandler.cpp includes/backend/data/virtual-datahandler.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o virtual-datahandler.o src/backend/data/virtual-datahandler.cpp + +mot-databuilder.o: src/backend/data/mot-databuilder.cpp includes/backend/data/mot-databuilder.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + includes/backend/data/virtual-datahandler.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/backend/data/mot-data.h \ + ../../../../include/qt5/QtGui/QImage \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtCore/QByteArray \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mot-databuilder.o src/backend/data/mot-databuilder.cpp + +mot-data.o: src/backend/data/mot-data.cpp includes/backend/data/mot-data.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtGui/QImage \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtCore/QByteArray \ + radio.h \ + ../../../../include/qt5/QtWidgets/QMainWindow \ + ../../../../include/qt5/QtWidgets/qmainwindow.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtCore/QTimer \ + ../../../../include/qt5/QtCore/qtimer.h \ + ../../../../include/qt5/QtCore/qbasictimer.h \ + ui_dabradio.h \ + dab-processor.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + includes/ofdm/sample-reader.h \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + includes/ofdm/phasereference.h \ + includes/various/fft-handler.h \ + includes/various/dab-params.h \ + includes/ofdm/phasetable.h \ + includes/ofdm/ofdm-decoder.h \ + ../../../../include/qt5/QtCore/QWaitCondition \ + ../../../../include/qt5/QtCore/qwaitcondition.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QSemaphore \ + ../../../../include/qt5/QtCore/qsemaphore.h \ + includes/ofdm/freq-interleaver.h \ + includes/backend/fic-handler.h \ + includes/backend/viterbi_768/viterbi-768.h \ + includes/backend/fib-processor.h \ + includes/backend/msc-handler.h \ + includes/various/band-handler.h \ + includes/various/text-mapper.h \ + ui_technical_data.h \ + ../../../../include/qt5/QtCore/QDir \ + ../../../../include/qt5/QtCore/qdir.h \ + ../../../../include/qt5/QtCore/qfileinfo.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mot-data.o src/backend/data/mot-data.cpp + +audio-base.o: src/output/audio-base.cpp includes/output/audio-base.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/output/newconverter.h \ + includes/various/ringbuffer.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o audio-base.o src/output/audio-base.cpp + +newconverter.o: src/output/newconverter.cpp includes/output/newconverter.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o newconverter.o src/output/newconverter.cpp + +audiosink.o: src/output/audiosink.cpp includes/output/audiosink.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + includes/dab-constants.h \ + includes/output/audio-base.h \ + ../../../../include/qt5/QtCore/QMutex \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + includes/output/newconverter.h \ + includes/various/ringbuffer.h \ + ../../../../include/qt5/QtCore/QDebug \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtWidgets/QMessageBox \ + ../../../../include/qt5/QtWidgets/qmessagebox.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qdialog.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o audiosink.o src/output/audiosink.cpp + +fft-handler.o: src/various/fft-handler.cpp includes/various/fft-handler.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + includes/various/dab-params.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o fft-handler.o src/various/fft-handler.cpp + +Xtan2.o: src/various/Xtan2.cpp includes/various/Xtan2.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o Xtan2.o src/various/Xtan2.cpp + +dab-params.o: src/various/dab-params.cpp includes/various/dab-params.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o dab-params.o src/various/dab-params.cpp + +band-handler.o: src/various/band-handler.cpp includes/various/band-handler.h \ + ../../../../include/qt5/QtWidgets/QComboBox \ + ../../../../include/qt5/QtWidgets/qcombobox.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtCore/QString \ + includes/dab-constants.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o band-handler.o src/various/band-handler.cpp + +text-mapper.o: src/various/text-mapper.cpp includes/various/text-mapper.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o text-mapper.o src/various/text-mapper.cpp + +virtual-input.o: devices/virtual-input.cpp devices/virtual-input.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o virtual-input.o devices/virtual-input.cpp + +rawfiles.o: devices/rawfiles/rawfiles.cpp devices/rawfiles/rawfiles.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtWidgets/QFrame \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + includes/dab-constants.h \ + devices/virtual-input.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/various/ringbuffer.h \ + ui_filereader-widget.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o rawfiles.o devices/rawfiles/rawfiles.cpp + +wavfiles.o: devices/wavfiles/wavfiles.cpp ../../../../include/qt5/QtCore/QString \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + devices/wavfiles/wavfiles.h \ + ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtWidgets/QFrame \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + includes/dab-constants.h \ + devices/virtual-input.h \ + ../../../../include/qt5/QtCore/QObject \ + includes/various/ringbuffer.h \ + ui_filereader-widget.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o wavfiles.o devices/wavfiles/wavfiles.cpp + +rtlsdr-handler.o: devices/rtlsdr-handler/rtlsdr-handler.cpp ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtWidgets/QFileDialog \ + ../../../../include/qt5/QtWidgets/qfiledialog.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtCore/qdir.h \ + ../../../../include/qt5/QtCore/qfileinfo.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtWidgets/qdialog.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtCore/QDir \ + devices/rtlsdr-handler/rtlsdr-handler.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/QSettings \ + ../../../../include/qt5/QtCore/qsettings.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + devices/virtual-input.h \ + includes/various/ringbuffer.h \ + ui_rtlsdr-widget.h \ + devices/rtlsdr-handler/rtl-dongleselect.h \ + ../../../../include/qt5/QtWidgets/QDialog \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QListView \ + ../../../../include/qt5/QtWidgets/qlistview.h \ + ../../../../include/qt5/QtWidgets/qabstractitemview.h \ + ../../../../include/qt5/QtWidgets/qabstractscrollarea.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtCore/qitemselectionmodel.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/QStringList \ + devices/rtlsdr-handler/rtl-sdr.h \ + devices/rtlsdr-handler/rtl-sdr_export.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o rtlsdr-handler.o devices/rtlsdr-handler/rtlsdr-handler.cpp + +rtl-dongleselect.o: devices/rtlsdr-handler/rtl-dongleselect.cpp devices/rtlsdr-handler/rtl-dongleselect.h \ + ../../../../include/qt5/QtWidgets/QDialog \ + ../../../../include/qt5/QtWidgets/qdialog.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QListView \ + ../../../../include/qt5/QtWidgets/qlistview.h \ + ../../../../include/qt5/QtWidgets/qabstractitemview.h \ + ../../../../include/qt5/QtWidgets/qabstractscrollarea.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtCore/qitemselectionmodel.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/QStringList \ + ../../../../include/qt5/QtWidgets/QVBoxLayout \ + ../../../../include/qt5/QtWidgets/qboxlayout.h \ + ../../../../include/qt5/QtWidgets/qlayout.h \ + ../../../../include/qt5/QtWidgets/qlayoutitem.h \ + ../../../../include/qt5/QtWidgets/qgridlayout.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o rtl-dongleselect.o devices/rtlsdr-handler/rtl-dongleselect.cpp + +sdrplay-handler.o: devices/sdrplay-handler/sdrplay-handler.cpp ../../../../include/qt5/QtCore/QThread \ + ../../../../include/qt5/QtCore/qthread.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/QSettings \ + ../../../../include/qt5/QtCore/qsettings.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtWidgets/QHBoxLayout \ + ../../../../include/qt5/QtWidgets/qboxlayout.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qlayout.h \ + ../../../../include/qt5/QtWidgets/qlayoutitem.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtWidgets/qgridlayout.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + devices/sdrplay-handler/sdrplay-handler.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtWidgets/QFrame \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + includes/various/ringbuffer.h \ + devices/virtual-input.h \ + ui_sdrplay-widget.h \ + devices/sdrplay-handler/mirsdrapi-rsp.h \ + devices/sdrplay-handler/sdrplayselect.h \ + ../../../../include/qt5/QtWidgets/QDialog \ + ../../../../include/qt5/QtWidgets/qdialog.h \ + ../../../../include/qt5/QtWidgets/QListView \ + ../../../../include/qt5/QtWidgets/qlistview.h \ + ../../../../include/qt5/QtWidgets/qabstractitemview.h \ + ../../../../include/qt5/QtWidgets/qabstractscrollarea.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtCore/qitemselectionmodel.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/QStringList + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sdrplay-handler.o devices/sdrplay-handler/sdrplay-handler.cpp + +sdrplayselect.o: devices/sdrplay-handler/sdrplayselect.cpp ../../../../include/qt5/QtWidgets/QVBoxLayout \ + ../../../../include/qt5/QtWidgets/qboxlayout.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qlayout.h \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtWidgets/qlayoutitem.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtWidgets/qgridlayout.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + devices/sdrplay-handler/sdrplayselect.h \ + ../../../../include/qt5/QtWidgets/QDialog \ + ../../../../include/qt5/QtWidgets/qdialog.h \ + ../../../../include/qt5/QtWidgets/QLabel \ + ../../../../include/qt5/QtWidgets/qlabel.h \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/QListView \ + ../../../../include/qt5/QtWidgets/qlistview.h \ + ../../../../include/qt5/QtWidgets/qabstractitemview.h \ + ../../../../include/qt5/QtWidgets/qabstractscrollarea.h \ + ../../../../include/qt5/QtCore/qabstractitemmodel.h \ + ../../../../include/qt5/QtCore/qitemselectionmodel.h \ + ../../../../include/qt5/QtWidgets/qabstractitemdelegate.h \ + ../../../../include/qt5/QtWidgets/qstyleoption.h \ + ../../../../include/qt5/QtWidgets/qabstractspinbox.h \ + ../../../../include/qt5/QtGui/qvalidator.h \ + ../../../../include/qt5/QtCore/qregularexpression.h \ + ../../../../include/qt5/QtGui/qicon.h \ + ../../../../include/qt5/QtWidgets/qslider.h \ + ../../../../include/qt5/QtWidgets/qabstractslider.h \ + ../../../../include/qt5/QtWidgets/qstyle.h \ + ../../../../include/qt5/QtWidgets/qtabbar.h \ + ../../../../include/qt5/QtWidgets/qtabwidget.h \ + ../../../../include/qt5/QtWidgets/qrubberband.h \ + ../../../../include/qt5/QtCore/QStringListModel \ + ../../../../include/qt5/QtCore/qstringlistmodel.h \ + ../../../../include/qt5/QtCore/QStringList + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sdrplayselect.o devices/sdrplay-handler/sdrplayselect.cpp + +airspy-handler.o: devices/airspy-handler/airspy-handler.cpp devices/airspy-handler/airspy-handler.h \ + ../../../../include/qt5/QtCore/QObject \ + ../../../../include/qt5/QtCore/qobject.h \ + ../../../../include/qt5/QtCore/qobjectdefs.h \ + ../../../../include/qt5/QtCore/qnamespace.h \ + ../../../../include/qt5/QtCore/qglobal.h \ + ../../../../include/qt5/QtCore/qconfig-bootstrapped.h \ + ../../../../include/qt5/QtCore/qconfig.h \ + ../../../../include/qt5/QtCore/qconfig-64.h \ + ../../../../include/qt5/QtCore/qtcore-config.h \ + ../../../../include/qt5/QtCore/qsystemdetection.h \ + ../../../../include/qt5/QtCore/qprocessordetection.h \ + ../../../../include/qt5/QtCore/qcompilerdetection.h \ + ../../../../include/qt5/QtCore/qtypeinfo.h \ + ../../../../include/qt5/QtCore/qsysinfo.h \ + ../../../../include/qt5/QtCore/qlogging.h \ + ../../../../include/qt5/QtCore/qflags.h \ + ../../../../include/qt5/QtCore/qatomic.h \ + ../../../../include/qt5/QtCore/qbasicatomic.h \ + ../../../../include/qt5/QtCore/qatomic_bootstrap.h \ + ../../../../include/qt5/QtCore/qgenericatomic.h \ + ../../../../include/qt5/QtCore/qatomic_cxx11.h \ + ../../../../include/qt5/QtCore/qatomic_msvc.h \ + ../../../../include/qt5/QtCore/qglobalstatic.h \ + ../../../../include/qt5/QtCore/qmutex.h \ + ../../../../include/qt5/QtCore/qnumeric.h \ + ../../../../include/qt5/QtCore/qversiontagging.h \ + ../../../../include/qt5/QtCore/qobjectdefs_impl.h \ + ../../../../include/qt5/QtCore/qstring.h \ + ../../../../include/qt5/QtCore/qchar.h \ + ../../../../include/qt5/QtCore/qbytearray.h \ + ../../../../include/qt5/QtCore/qrefcount.h \ + ../../../../include/qt5/QtCore/qarraydata.h \ + ../../../../include/qt5/QtCore/qstringbuilder.h \ + ../../../../include/qt5/QtCore/qlist.h \ + ../../../../include/qt5/QtCore/qalgorithms.h \ + ../../../../include/qt5/QtCore/qiterator.h \ + ../../../../include/qt5/QtCore/qhashfunctions.h \ + ../../../../include/qt5/QtCore/qpair.h \ + ../../../../include/qt5/QtCore/qbytearraylist.h \ + ../../../../include/qt5/QtCore/qstringlist.h \ + ../../../../include/qt5/QtCore/qregexp.h \ + ../../../../include/qt5/QtCore/qstringmatcher.h \ + ../../../../include/qt5/QtCore/qcoreevent.h \ + ../../../../include/qt5/QtCore/qscopedpointer.h \ + ../../../../include/qt5/QtCore/qmetatype.h \ + ../../../../include/qt5/QtCore/qvarlengtharray.h \ + ../../../../include/qt5/QtCore/qcontainerfwd.h \ + ../../../../include/qt5/QtCore/qobject_impl.h \ + ../../../../include/qt5/QtCore/QSettings \ + ../../../../include/qt5/QtCore/qsettings.h \ + ../../../../include/qt5/QtCore/qvariant.h \ + ../../../../include/qt5/QtCore/qmap.h \ + ../../../../include/qt5/QtCore/qdebug.h \ + ../../../../include/qt5/QtCore/qhash.h \ + ../../../../include/qt5/QtCore/qtextstream.h \ + ../../../../include/qt5/QtCore/qiodevice.h \ + ../../../../include/qt5/QtCore/qlocale.h \ + ../../../../include/qt5/QtCore/qshareddata.h \ + ../../../../include/qt5/QtCore/qvector.h \ + ../../../../include/qt5/QtCore/qpoint.h \ + ../../../../include/qt5/QtCore/qset.h \ + ../../../../include/qt5/QtCore/qcontiguouscache.h \ + ../../../../include/qt5/QtCore/qsharedpointer.h \ + ../../../../include/qt5/QtCore/qsharedpointer_impl.h \ + ../../../../include/qt5/QtWidgets/QFrame \ + ../../../../include/qt5/QtWidgets/qframe.h \ + ../../../../include/qt5/QtWidgets/qtwidgetsglobal.h \ + ../../../../include/qt5/QtGui/qtguiglobal.h \ + ../../../../include/qt5/QtGui/qtgui-config.h \ + ../../../../include/qt5/QtWidgets/qtwidgets-config.h \ + ../../../../include/qt5/QtWidgets/qwidget.h \ + ../../../../include/qt5/QtGui/qwindowdefs.h \ + ../../../../include/qt5/QtGui/qwindowdefs_win.h \ + ../../../../include/qt5/QtCore/qmargins.h \ + ../../../../include/qt5/QtGui/qpaintdevice.h \ + ../../../../include/qt5/QtCore/qrect.h \ + ../../../../include/qt5/QtCore/qsize.h \ + ../../../../include/qt5/QtGui/qpalette.h \ + ../../../../include/qt5/QtGui/qcolor.h \ + ../../../../include/qt5/QtGui/qrgb.h \ + ../../../../include/qt5/QtGui/qrgba64.h \ + ../../../../include/qt5/QtGui/qbrush.h \ + ../../../../include/qt5/QtGui/qmatrix.h \ + ../../../../include/qt5/QtGui/qpolygon.h \ + ../../../../include/qt5/QtGui/qregion.h \ + ../../../../include/qt5/QtCore/qdatastream.h \ + ../../../../include/qt5/QtCore/qline.h \ + ../../../../include/qt5/QtGui/qtransform.h \ + ../../../../include/qt5/QtGui/qpainterpath.h \ + ../../../../include/qt5/QtGui/qimage.h \ + ../../../../include/qt5/QtGui/qpixelformat.h \ + ../../../../include/qt5/QtGui/qpixmap.h \ + ../../../../include/qt5/QtGui/qfont.h \ + ../../../../include/qt5/QtGui/qfontmetrics.h \ + ../../../../include/qt5/QtGui/qfontinfo.h \ + ../../../../include/qt5/QtWidgets/qsizepolicy.h \ + ../../../../include/qt5/QtGui/qcursor.h \ + ../../../../include/qt5/QtGui/qkeysequence.h \ + ../../../../include/qt5/QtGui/qevent.h \ + ../../../../include/qt5/QtCore/qurl.h \ + ../../../../include/qt5/QtCore/qurlquery.h \ + ../../../../include/qt5/QtCore/qfile.h \ + ../../../../include/qt5/QtCore/qfiledevice.h \ + ../../../../include/qt5/QtGui/qvector2d.h \ + ../../../../include/qt5/QtGui/qtouchdevice.h \ + includes/dab-constants.h \ + ../../../../include/qt5/QtCore/QString \ + includes/various/ringbuffer.h \ + devices/virtual-input.h \ + ui_airspy-widget.h \ + devices/airspy-handler/libairspy/airspy.h \ + devices/airspy-handler/libairspy/airspy_commands.h \ + devices/airspy-handler/airspyfilter.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o airspy-handler.o devices/airspy-handler/airspy-handler.cpp + +airspyfilter.o: devices/airspy-handler/airspyfilter.cpp devices/airspy-handler/airspyfilter.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o airspyfilter.o devices/airspy-handler/airspyfilter.cpp + +spiral-sse.o: src/backend/viterbi_768/spiral-sse.c src/backend/viterbi_768/spiral-sse.h + $(CC) -c $(CFLAGS) $(INCPATH) -o spiral-sse.o src/backend/viterbi_768/spiral-sse.c + +qrc_resources.o: qrc_resources.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_resources.o qrc_resources.cpp + +moc_radio.o: moc_radio.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_radio.o moc_radio.cpp + +moc_dab-processor.o: moc_dab-processor.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_dab-processor.o moc_dab-processor.cpp + +moc_sample-reader.o: moc_sample-reader.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_sample-reader.o moc_sample-reader.cpp + +moc_ofdm-decoder.o: moc_ofdm-decoder.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_ofdm-decoder.o moc_ofdm-decoder.cpp + +moc_phasereference.o: moc_phasereference.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_phasereference.o moc_phasereference.cpp + +moc_fic-handler.o: moc_fic-handler.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_fic-handler.o moc_fic-handler.cpp + +moc_fib-processor.o: moc_fib-processor.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_fib-processor.o moc_fib-processor.cpp + +moc_data-backend.o: moc_data-backend.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_data-backend.o moc_data-backend.cpp + +moc_mp2processor.o: moc_mp2processor.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mp2processor.o moc_mp2processor.cpp + +moc_mp4processor.o: moc_mp4processor.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mp4processor.o moc_mp4processor.cpp + +moc_faad-decoder.o: moc_faad-decoder.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_faad-decoder.o moc_faad-decoder.cpp + +moc_data-processor.o: moc_data-processor.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_data-processor.o moc_data-processor.cpp + +moc_pad-handler.o: moc_pad-handler.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_pad-handler.o moc_pad-handler.cpp + +moc_virtual-datahandler.o: moc_virtual-datahandler.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_virtual-datahandler.o moc_virtual-datahandler.cpp + +moc_mot-data.o: moc_mot-data.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mot-data.o moc_mot-data.cpp + +moc_audio-base.o: moc_audio-base.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_audio-base.o moc_audio-base.cpp + +moc_rtlsdr-handler.o: moc_rtlsdr-handler.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_rtlsdr-handler.o moc_rtlsdr-handler.cpp + +moc_rtl-dongleselect.o: moc_rtl-dongleselect.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_rtl-dongleselect.o moc_rtl-dongleselect.cpp + +moc_sdrplay-handler.o: moc_sdrplay-handler.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_sdrplay-handler.o moc_sdrplay-handler.cpp + +moc_sdrplayselect.o: moc_sdrplayselect.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_sdrplayselect.o moc_sdrplayselect.cpp + +moc_airspy-handler.o: moc_airspy-handler.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_airspy-handler.o moc_airspy-handler.cpp + +####### Install + +install: FORCE + +uninstall: FORCE + +FORCE: + diff --git a/README.md b/README.md new file mode 100644 index 0000000..81e4547 --- /dev/null +++ b/README.md @@ -0,0 +1,340 @@ +# dabradio [![Build Status](https://travis-ci.org/JvanKatwijk/qt-dab.svg?branch=master)](https://travis-ci.org/JvanKatwijk/dabradio) + +dabradio is a Software for Windows, Linux and Raspberry Pi for listening to terrestrial Digital Audio Broadcasting (DAB and DAB+). It is the smaller brother of Qt-DAB, the successor of both DAB-rpi and sdr-j-DAB, two former programs by the same author. + +------------------------------------------------------------------ +Table of Contents +------------------------------------------------------------------ + +* [Introduction](#introduction) +* [Features](#features) +* [Installation](#features) + * [Windows](#windows) + * [Ubuntu Linux](#ubuntu-linux) + - [Configuring using the dabradio.pro file](#configuring-using-the-dabradio-file) + - [Configuring using CMake](#configuring-using-cmake) + - [Qt](#qt) + * [Raspberry PI](#raspberry-pi) + * [appImage for x64 Linux systems](#appimage-for-x64-linux-systems) + * [Comment on some settings](#comment-on-some-settings) + * [A note on intermittent sound](#a-note-on-intermittent-sound) +* [Copyright](#copyright) + +------------------------------------------------------------------ +Features +------------------------------------------------------------------ + + * DAB (mp2) and DAB+ (HE-AAC v1, HE-AAC v2 and LC-AAC) decoding + * MOT SlideShow (SLS) + * Dynamic Label (DLS) + * Both DAB bands supported: + * VHF Band III + * L-Band (only used in Czech Republic and Vatican) + * Scanning function (scanning over all channels in a given band and collecting +all services) + * Detailed information for selected service (SNR, bitrate, frequency, ensemble name, ensemble ID, subchannel ID, used CUs, protection level, CPU usage, program type, language, 4 quality bars) + * Supports various inputs from + - SDRplay (both RSP I and RSP II), + - Airspy, including Airspy mini, + - SDR DAB sticks (RTL2838U or similar), and + - prerecorded dump (*.sdr, and *.iq) + +Not implemented: + + * DMB (Audio and Video) + * TPEG; + * EPG; + * Journaline; + * Other bands than used for terrestrial broadcasting in Europe (like DAB over cable) + * HackRF + + +------------------------------------------------------------------ +Introduction +------------------------------------------------------------------ + +![dabradio with input](/screenshot_dabradio.png?raw=true) + +**dabradio** is the little brother of Qt-DAB. The latter is kind of a research vehicle, with lost of options, used by only a few. The need arose to have +a smaller brother, just for listening to DAB services. + +dabradio and Qt-DAB share a lot of functionality, obviously, nevertheless +to avoid even more "ifdef"s in the code, it was decided to +maintain a GitHub repository for both of them. + +The Qt-free version, the "command line only" version, is named dab-cmdline, and is built around a library that does the DAB decoding. It has its own repository on Github. + +Next to these C++ based versions, a version in Java is being developed, it has its own repository on Github. + +dabradio dynamically selects the input device. If an input device (one of +SDRplay, AIRspy or RTLSDR stick) is attached, the software will find and +use that device (if more than one device is connected, the software +will select one of them). If no external device is selected, the software +will present a menu to select a file for file input. + +For further information please visit http://www.sdr-j.tk + +Some settings are preserved between program invocations, they are stored in a file `.dabradio.ini`, to be found in the home directory. See [Comment on some settings](#comment-on-some-settings) for more details. + +------------------------------------------------------------------ +Windows +------------------------------------------------------------------ + +Windows releases can be found at https://github.com/JvanKatwijk/dabradio/releases . Please copy them into the same directory you've unzipped http://www.sdr-j.tk/windows-bin.zip as it uses the same libraries. + +If you want to compile it by yourself, please install Qt through its online installer, see https://www.qt.io/ + +------------------------------------------------------------------ +Ubuntu Linux +------------------------------------------------------------------ + +If you are not familar with compiling then please continue reading by jumping to chapter [appImage](#appimage-for-x64-linux-systems) which is much easier for Linux beginners. + +Ubuntu 16.04 (and on) have good support for Qt5 and qwt (compiled for Qt5). +For generating an executable under Ubuntu (16.04 or newer), you can put the following commands into a script. +(For Ubuntu 14.04 look into the package manager for Qt4 packages) + +1. Fetch the required components + ``` + sudo apt-get update + sudo apt-get install qt5-qmake build-essential g++ + sudo apt-get install libsndfile1-dev qt5-default libfftw3-dev portaudio19-dev + sudo apt-get install libfaad-dev zlib1g-dev rtl-sdr libusb-1.0-0-dev mesa-common-dev + sudo apt-get install libgl1-mesa-dev libqt5opengl5-dev libsamplerate0-dev libqwt-qt5-dev + sudo apt-get install qtbase5-dev + + ``` + +2. Fetch the required libraries + + a) Assuming you want to use a dabstick (also known as rtlsdr) as device, fetch a version of the library for the dabstick + ``` + wget http://sm5bsz.com/linuxdsp/hware/rtlsdr/rtl-sdr-linrad4.tbz + tar xvfj rtl-sdr-linrad4.tbz + cd rtl-sdr-linrad4 + sudo autoconf + sudo autoreconf -i + ./configure --enable-driver-detach + make + sudo make install + sudo ldconfig + cd + ``` + + b) Assuming you want to use an Airspy as device, fetch a version of the library for the Airspy + ``` + sudo apt-get install build-essential cmake libusb-1.0-0-dev pkg-config + wget https://github.com/airspy/host/archive/master.zip + unzip master.zip + cd airspyone_host-master + mkdir build + cd build + cmake ../ -DINSTALL_UDEV_RULES=ON + make + sudo make install + sudo ldconfig + ``` + + Clean CMake temporary files/dirs: + ``` + cd host-master/build + rm -rf * + ``` + +3. Get a copy of the dabradio sources + ``` + git clone https://github.com/JvanKatwijk/dabradio.git + cd dabradio + ``` + +4. Edit the `dabradio.pro` file for configuring the supported devices and other options. Comment the respective lines out if you don't own an Airspy (mini) or an SDRplay. + +5. If DAB spectrum and the constellation diagram should be displayed, check the installation path to qwt. If you were downloading it from http://qwt.sourceforge.net/qwtinstall.html please mention the correct path in `dabradio.pro` file (for other installation change it accordingly): + ``` + INCLUDEPATH += /usr/local/include /usr/local/qwt-6.1.3 + ``` + +6. Build and make + ``` + qmake dabradio.pro + make + ``` + + You could also use QtCreator, load the `dabradio.pro` file and build the executable. + + Remark: The executable file can be found in the sub-directory linux-bin. A make install command is not implemented. + + +------------------------------------------------------------------ +Configuring using the dabradio.pro file +------------------------------------------------------------------ + +Options in the configuration are: + + a) select or unselect devices + +Adding or removing from the configuration is in all cases by commenting or uncommenting a line in the configuration file. + +Comment the lines out by prefixing the line with a `#` in the `qt-dab.pro` file (section "unix") for the device(s) you want to exclude in the configuration. In the example below, rtl_tcp (i.e. the connection to the rtlsdr server) won't be used. +``` +CONFIG += dabstick +CONFIG += sdrplay +#CONFIG += rtl_tcp +CONFIG += airspy +``` + +Remark: Input from pre-recorded files (8 bit unsigned `*.raw` and `*.iq' as well as 16-bit "wav" `*.sdr` files) is configured by default. + +Audio samples are - by default - sent to an audio device using the portaudio +library. + + +------------------------------------------------------------------ +Configuring using CMake +------------------------------------------------------------------ + +The `CMakeLists.txt` file has all devices and the spectrum switched off as default. You can select a device (or more devices) without altering the `CMakeLists.txt` file, but by passing on definitions to the command line. + +An example: +``` +cmake .. -DSDRPLAY=ON -DRTLTCP=ON -DSPECTRUM=ON +``` + +will generate a makefile with support for a) the SDRplay device, b) for the remote dabstick (using the rtl_tcp connection) and c) for the spectrum in the configuration. + +Other devices that can be selected (beside dabstick and rtl_tcp) are sdrplay and airspy. Use `-DRTLSDR=ON`, or `-DAIRSPY=ON` after the `cmake` command if you want to configure them. + +The default location for installation depends on your system, mostly `/usr/local/bin` or something like that. Set your own location by adding +``` +-DCMAKE_INSTALL_PREFIX=your installation prefix +``` + +For other options, see the `CMakeLists.txt` file. + +Important: Note that CMakeLists.txt file expects the appropriate Qt version (and - if configured - the qwt library) to be installed. + +----------------------------------------------------------------- +SDRplay +----------------------------------------------------------------- + +The current set of sources provides support for the RSP-I and the RSP-II and +the new RSP-1a, it is assumed that at least library version 2.09 is installed. + +------------------------------------------------------------------ +Qt +------------------------------------------------------------------ + +The software uses the Qt library and - for the spectrum and the constellation diagram - the qwt library. + +The `CMakeLists.txt` assumes Qt5, if you want to use Qt4, and you want to have the spectrum in the configuration, be aware of the binding of the qwt library (i.e. Qt4 and a qwt that uses Qt5 does not work well). + +----------------------------------------------------------------- +Raspberry PI +------------------------------------------------------------------ + +The dabradio software runs pretty well on the author's RPI-2. The average load on the 4 cores is somewhere between 50 and 60 percent. + +One remark: getting "sound" is not always easy. Be certain that you have installed the alsa-utils, and that you are - as non-root user - able to see devices with `aplay -L` + +In arch, it was essential to add the username to the group "audio". + +The most recent distribution of Raspbian Stretch (i.e. august 2017) supports both Qt5 and a qwt compiled against Qt5. + +IMPORTANT NOTE: +Since I was studying the (potential) difference in behaviour between a version with and a version without concurrency in the front end, there is a setting in the ".pro" file for selecting this. +Use for the dabradio the concurrency option. + +For the ".pro" file uncomment + + #DEFINES += __THREADED_DECODING. + +For the CMakeLists.txt file, uncomment + + #add_definitions (-D__THREADED_DECODING) #uncomment for the RPI + + +--------------------------------------------------------------------------- +appImage for x64 Linux systems +--------------------------------------------------------------------------- + +https://github.com/JvanKatwijk/dabradio/releases contains a generated appImage which is created on Ubuntu 14.04 (Trusty), and uses Qt4 (so it basically should run on any x-64 based linux system that isn't too old.). It assumes that you have installed a device, either a dabstick (i.e. rtlsdr), an Airspy or a SDRplay. All further dependencies are included. There is only one file which you have to make executable in order to run. + +Note that on start up the appImage will try to set the udev settings for the airspy and dabstick right. Libraries for the dabstick (i.e. rtlsdr) and airspy are part of the appImage. Note that while the SDRplay is selectable, the library for the device should be installed from the supplier, i.e. "www.sdrplay.com". + +All further dependencies are included + +For more information see http://appimage.org/ + +-------------------------------------------------------------------------------- +Comment on some settings +------------------------------------------------------------------------------- + +Some values of settings are maintained between program invocations. This is done in the (hidden) file `.dabradio.ini` in the user's home directory. + +Some settings are not influenced by buttons or sliders of the GUI, they will only change by editing the .ini file. + +Typical examples are + +`saveSlides=1` +when set to 0 the slides that are attached to audio programs will not be saved. If set to 1 the slides will be saved in a directory `/tmp/qt-pictures` (Linux) or in `%tmp%\qt-pictures` (Windows). + +`picturesPath` +defines the directory where the slides (MOT slideshow) should be stored. Default is the home directory. + +`showSlides=1` +when set to 0 the slides will not be shown. + +`has-presetName=1` +when set the name of the selected service - that is selected when closing down the program - is kept and at the next invocation of the program, an attempt is made to start that particular service. The name of the service is kept as `presetname=xxxx` + +The background colors of the spectrum can be changed by setting +``` +displaycolor=blue +gridcolor=red +``` + +The Qt-DAB program now searches - if available - for TII (transmitter identification information) data in the FIC. If TII data is available, the small label at the bottom of the Technical Details widget will color green, and the main ID if the transmitters is shown. Also the list of geographical positions of the transmitters of the FSN is printed on the terminal. If the identification of the transmitter received can be decoded, it will be shown at the bottom line of the Technical Data Widget. + +The periodicity of the search for the data defining the position of the transmitter received can be set by adding a line to the `.qt-dab.ini` file + +``` +tii_delay=xxx +``` + +where xxx is the number of seconds. Default of the delay is 20 seconds. + +-------------------------------------------------------------------------------- +A note on intermittent sound +------------------------------------------------------------------------------- + +In some cases, in some periods of listening, the sound is (or at least seems) +interrupted. There are two different causes for this + +First of all the incoming signal is weak and audio packages do not pass the +many controls that are executed. This shows in the widget +"technical data", not all the colored bars at the bottom are 100 percent green. +An audio package represents 24 milliseconds of audio, loss of a few packages +leads to an interruption of the sound. + +A second reason has to do with system parameters. Too small a buffersize +in the audio driver causes too high a frequency of calls to a callback +function. In Linux this shows by an underrun reported by the alsa sound system. +The buffer size can be set (in multiples of 256 audio samples) +by the value of "latency" in the ".ini" file. The default value is 1. + +On my RPI 2 - with Stretch - latency=2 works best. + +# Copyright + + + Copyright (C) 2013, 2014, 2015, 2016, 2017 + Jan van Katwijk (J.vanKatwijk@gmail.com) + Lazy Chair Computing + + The Qt-DAB software is made available under the GPL-2.0. + The SDR-J software, of which the Qt-DAB software is a part, + 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 for more details. + diff --git a/appimage/AppRun b/appimage/AppRun new file mode 100644 index 0000000..5a26b1b --- /dev/null +++ b/appimage/AppRun @@ -0,0 +1,7 @@ +#!/bin/bash +HERE="$(dirname "$(readlink -f "${0}")")" +cp "${HERE}/udev-rules-helper" /tmp/ +# Try to run using sudo, if this does not work ask the user for password +sudo -n -E -- "/tmp/udev-rules-helper" || pkexec "/tmp/udev-rules-helper" +rm "/tmp/udev-rules-helper" +exec "${HERE}/usr/bin/dabradio" "$@" diff --git a/appimage/udev-rules-helper b/appimage/udev-rules-helper new file mode 100644 index 0000000..929eaba --- /dev/null +++ b/appimage/udev-rules-helper @@ -0,0 +1,27 @@ +#!/bin/bash + +HERE="$(dirname "$(readlink -f "${0}")")" + +rmmod dvb_usb_rtl28xxu || true + +cat > /tmp/10-rtl-sdr.rules <<\EOF +SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE="0666", SYMLINK+="rtl_sdr" +EOF + +mv /tmp/10-rtl-sdr.rules /etc/udev/rules.d/10-rtl-sdr.rules + +cat > /tmp/52-airspy.rules <<\EOF +ATTR{idVendor}=="1d50", ATTR{idProduct}=="60a1", SYMLINK+="airspy-%k", MODE="660", GROUP="plugdev" +EOF + +mv /tmp/52-airspy.rules /etc/udev/rules.d/52-airspy.rules + +cat > /tmp/66-mirics.rules <<\EOF +SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="2500",MODE:="0666" +SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3010",MODE:="0666" +EOF + +mv /tmp/66-mirics.rules /etc/udev/rules.d/66-mirics.rules + +udevadm control --reload-rules +udevadm trigger --attr-match=subsystem=usb diff --git a/cmake/Modules/FindFFTW3f.cmake b/cmake/Modules/FindFFTW3f.cmake new file mode 100644 index 0000000..0ee7e46 --- /dev/null +++ b/cmake/Modules/FindFFTW3f.cmake @@ -0,0 +1,41 @@ +# http://tim.klingt.org/code/projects/supernova/repository/revisions/d336dd6f400e381bcfd720e96139656de0c53b6a/entry/cmake_modules/FindFFTW3f.cmake +# Modified to use pkg config and use standard var names + +# Find single-precision (float) version of FFTW3 + +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(PC_FFTW3F "fftw3f >= 3.0") + +FIND_PATH( + FFTW3F_INCLUDE_DIRS + NAMES fftw3.h + HINTS $ENV{FFTW3_DIR}/include + ${PC_FFTW3F_INCLUDE_DIR} + PATHS /usr/local/include + /usr/include +) + +FIND_LIBRARY( + FFTW3F_LIBRARIES + NAMES fftw3f libfftw3f + HINTS $ENV{FFTW3_DIR}/lib + ${PC_FFTW3F_LIBDIR} + PATHS /usr/local/lib + /usr/lib + /usr/lib64 +) + +FIND_LIBRARY( + FFTW3F_THREADS_LIBRARIES + NAMES fftw3f_threads libfftw3f_threads + HINTS $ENV{FFTW3_DIR}/lib + ${PC_FFTW3F_LIBDIR} + PATHS /usr/local/lib + /usr/lib + /usr/lib64 +) + + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW3F DEFAULT_MSG FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS) +MARK_AS_ADVANCED(FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS FFTW3F_THREADS_LIBRARIES) \ No newline at end of file diff --git a/cmake/Modules/FindFaad.cmake b/cmake/Modules/FindFaad.cmake new file mode 100644 index 0000000..541861a --- /dev/null +++ b/cmake/Modules/FindFaad.cmake @@ -0,0 +1,34 @@ +# Try to find FAAD library and include path. +# Once done this will define +# +# FAAD_INCLUDE_DIRS - where to find faad.h, etc. +# FAAD_LIBRARIES - List of libraries when using libfaad. +# FAAD_FOUND - True if libfaad found. + +find_path(FAAD_INCLUDE_DIR faad.h DOC "The directory where faad.h resides") +find_library(FAAD_LIBRARY NAMES faad DOC "The libfaad library") + +if(FAAD_INCLUDE_DIR AND FAAD_LIBRARY) + set(FAAD_FOUND 1) + set(FAAD_LIBRARIES ${FAAD_LIBRARY}) + set(FAAD_INCLUDE_DIRS ${FAAD_INCLUDE_DIR}) +else(FAAD_INCLUDE_DIR AND FAAD_LIBRARY) + set(FAAD_FOUND 0) + set(FAAD_LIBRARIES) + set(FAAD_INCLUDE_DIRS) +endif(FAAD_INCLUDE_DIR AND FAAD_LIBRARY) + +mark_as_advanced(FAAD_INCLUDE_DIR) +mark_as_advanced(FAAD_LIBRARY) +mark_as_advanced(FAAD_FOUND) + +if(NOT FAAD_FOUND) + set(FAAD_DIR_MESSAGE "libfaad was not found. Make sure FAAD_LIBRARY and FAAD_INCLUDE_DIR are set.") + if(NOT FAAD_FIND_QUIETLY) + message(STATUS "${FAAD_DIR_MESSAGE}") + else(NOT FAAD_FIND_QUIETLY) + if(FAAD_FIND_REQUIRED) + message(FATAL_ERROR "${FAAD_DIR_MESSAGE}") + endif(FAAD_FIND_REQUIRED) + endif(NOT FAAD_FIND_QUIETLY) +endif(NOT FAAD_FOUND) diff --git a/cmake/Modules/FindLSBId.cmake b/cmake/Modules/FindLSBId.cmake new file mode 100644 index 0000000..da9f87d --- /dev/null +++ b/cmake/Modules/FindLSBId.cmake @@ -0,0 +1,16 @@ +# Set a variable to determine which Linux distribution is being used. +# Debian packages things differently to Fedora (which is standard). +# +# This module sets the variable: +# +# LSB_ID_SHORT – the short name of the Linux distribution or unknown. + +set(LSB_ID_SHORT "unknown") + +find_program(LSB_RELEASE lsb_release) +if(LSB_RELEASE) + execute_process(COMMAND ${LSB_RELEASE} -is + OUTPUT_VARIABLE LSB_ID_SHORT + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +endif() diff --git a/cmake/Modules/FindLibAIRSPY.cmake b/cmake/Modules/FindLibAIRSPY.cmake new file mode 100644 index 0000000..2402f2f --- /dev/null +++ b/cmake/Modules/FindLibAIRSPY.cmake @@ -0,0 +1,28 @@ +if(NOT LIBAIRSPY_FOUND) + + pkg_check_modules (LIBAIRSPY_PKG libairspy) + find_path(LIBAIRSPY_INCLUDE_DIR NAMES libairspy/airspy.h + PATHS + ${LIBAIRSPY_PKG_INCLUDE_DIRS} + /usr/include + /usr/local/include + ) + + find_library(LIBAIRSPY_LIBRARIES NAMES airspy + PATHS + ${LIBAIRSPY_PKG_LIBRARY_DIRS} + /usr/lib + /usr/local/lib + ) + + if(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES) + set(LIBAIRSPY_FOUND TRUE CACHE INTERNAL "libairspy found") + message(STATUS "Found libairspy: ${LIBAIRSPY_INCLUDE_DIR}, ${LIBAIRSPY_LIBRARIES}") + else(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES) + set(LIBAIRSPY_FOUND FALSE CACHE INTERNAL "libairspy found") + message(STATUS "libairspy not found.") + endif(LIBAIRSPY_INCLUDE_DIR AND LIBAIRSPY_LIBRARIES) + + mark_as_advanced(LIBAIRSPY_INCLUDE_DIR LIBAIRSPY_LIBRARIES) + +endif(NOT LIBAIRSPY_FOUND) diff --git a/cmake/Modules/FindLibRTLSDR.cmake b/cmake/Modules/FindLibRTLSDR.cmake new file mode 100644 index 0000000..25a1d05 --- /dev/null +++ b/cmake/Modules/FindLibRTLSDR.cmake @@ -0,0 +1,28 @@ +if(NOT LIBRTLSDR_FOUND) + + pkg_check_modules (LIBRTLSDR_PKG librtlsdr) + find_path(LIBRTLSDR_INCLUDE_DIR NAMES rtl-sdr.h + PATHS + ${LIBRTLSDR_PKG_INCLUDE_DIRS} + /usr/include + /usr/local/include + ) + + find_library(LIBRTLSDR_LIBRARIES NAMES rtlsdr + PATHS + ${LIBRTLSDR_PKG_LIBRARY_DIRS} + /usr/lib + /usr/local/lib + ) + + if(LIBRTLSDR_INCLUDE_DIR AND LIBRTLSDR_LIBRARIES) + set(LIBRTLSDR_FOUND TRUE CACHE INTERNAL "librtlsdr found") + message(STATUS "Found librtlsdr: ${LIBRTLSDR_INCLUDE_DIR}, ${LIBRTLSDR_LIBRARIES}") + else(LIBRTLSDR_INCLUDE_DIR AND LIBRTLSDR_LIBRARIES) + set(LIBRTLSDR_FOUND FALSE CACHE INTERNAL "librtlsdr found") + message(STATUS "librtlsdr not found.") + endif(LIBRTLSDR_INCLUDE_DIR AND LIBRTLSDR_LIBRARIES) + + mark_as_advanced(LIBRTLSDR_INCLUDE_DIR LIBRTLSDR_LIBRARIES) + +endif(NOT LIBRTLSDR_FOUND) diff --git a/cmake/Modules/FindLibSampleRate.cmake b/cmake/Modules/FindLibSampleRate.cmake new file mode 100644 index 0000000..2f83745 --- /dev/null +++ b/cmake/Modules/FindLibSampleRate.cmake @@ -0,0 +1,20 @@ +# Find libsamplerate + +FIND_PATH(LIBSAMPLERATE_INCLUDE_DIR samplerate.h) + +SET(LIBSAMPLERATE_NAMES ${LIBSAMPLERATE_NAMES} samplerate libsamplerate) +FIND_LIBRARY(LIBSAMPLERATE_LIBRARY NAMES ${LIBSAMPLERATE_NAMES} PATH) + +IF (LIBSAMPLERATE_INCLUDE_DIR AND LIBSAMPLERATE_LIBRARY) + SET(LIBSAMPLERATE_FOUND TRUE) +ENDIF (LIBSAMPLERATE_INCLUDE_DIR AND LIBSAMPLERATE_LIBRARY) + +IF (LIBSAMPLERATE_FOUND) + IF (NOT LibSampleRate_FIND_QUIETLY) + MESSAGE (STATUS "Found LibSampleRate: ${LIBSNDFILE_LIBRARY}") + ENDIF (NOT LibSampleRate_FIND_QUIETLY) +ELSE (LIBSAMPLERATE_FOUND) + IF (LibSampleRate_FIND_REQUIRED) + MESSAGE (FATAL_ERROR "Could not find samplerate") + ENDIF (LibSampleRate_FIND_REQUIRED) +ENDIF (LIBSAMPLERATE_FOUND) diff --git a/cmake/Modules/FindLibSndFile.cmake b/cmake/Modules/FindLibSndFile.cmake new file mode 100644 index 0000000..cd28788 --- /dev/null +++ b/cmake/Modules/FindLibSndFile.cmake @@ -0,0 +1,20 @@ +# Find libsndfile + +FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h) + +SET(LIBSNDFILE_NAMES ${LIBSNDFILE_NAMES} sndfile libsndfile) +FIND_LIBRARY(LIBSNDFILE_LIBRARY NAMES ${LIBSNDFILE_NAMES} PATH) + +IF (LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY) + SET(LIBSNDFILE_FOUND TRUE) +ENDIF (LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY) + +IF (LIBSNDFILE_FOUND) + IF (NOT LibSndFile_FIND_QUIETLY) + MESSAGE (STATUS "Found LibSndFile: ${LIBSNDFILE_LIBRARY}") + ENDIF (NOT LibSndFile_FIND_QUIETLY) +ELSE (LIBSNDFILE_FOUND) + IF (LibSndFile_FIND_REQUIRED) + MESSAGE (FATAL_ERROR "Could not find sndfile") + ENDIF (LibSndFile_FIND_REQUIRED) +ENDIF (LIBSNDFILE_FOUND) diff --git a/cmake/Modules/FindPortaudio.cmake b/cmake/Modules/FindPortaudio.cmake new file mode 100644 index 0000000..8aa17d4 --- /dev/null +++ b/cmake/Modules/FindPortaudio.cmake @@ -0,0 +1,52 @@ +# - Try to find Portaudio +# Once done this will define +# +# PORTAUDIO_FOUND - system has Portaudio +# PORTAUDIO_INCLUDE_DIRS - the Portaudio include directory +# PORTAUDIO_LIBRARIES - Link these to use Portaudio + +include(FindPkgConfig) +pkg_check_modules(PC_PORTAUDIO portaudio-2.0) + +find_path(PORTAUDIO_INCLUDE_DIRS + NAMES + portaudio.h + PATHS + /usr/local/include + /usr/include + HINTS + ${PC_PORTAUDIO_INCLUDEDIR} +) + +find_library(PORTAUDIO_LIBRARIES + NAMES + portaudio + PATHS + /usr/local/lib + /usr/lib + /usr/lib64 + HINTS + ${PC_PORTAUDIO_LIBDIR} +) + +mark_as_advanced(PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES) + +# Found PORTAUDIO, but it may be version 18 which is not acceptable. +if(EXISTS ${PORTAUDIO_INCLUDE_DIRS}/portaudio.h) + include(CheckCXXSourceCompiles) + set(CMAKE_REQUIRED_INCLUDES_SAVED ${CMAKE_REQUIRED_INCLUDES}) + set(CMAKE_REQUIRED_INCLUDES ${PORTAUDIO_INCLUDE_DIRS}) + CHECK_CXX_SOURCE_COMPILES( + "#include \nPaDeviceIndex pa_find_device_by_name(const char *name); int main () {return 0;}" + PORTAUDIO2_FOUND) + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVED}) + unset(CMAKE_REQUIRED_INCLUDES_SAVED) + if(PORTAUDIO2_FOUND) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(PORTAUDIO DEFAULT_MSG PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES) + else(PORTAUDIO2_FOUND) + message(STATUS + " portaudio.h not compatible (requires API 2.0)") + set(PORTAUDIO_FOUND FALSE) + endif(PORTAUDIO2_FOUND) +endif() diff --git a/cmake/Modules/FindQWT.cmake b/cmake/Modules/FindQWT.cmake new file mode 100644 index 0000000..aa29e5d --- /dev/null +++ b/cmake/Modules/FindQWT.cmake @@ -0,0 +1,65 @@ +# - try to find Qwt libraries and include files +# QWT_INCLUDE_DIR where to find qwt_global.h, etc. +# QWT_LIBRARIES libraries to link against +# QWT_FOUND If false, do not try to use Qwt +# qwt_global.h holds a string with the QWT version; +# test to make sure it's at least 5.2 + +find_path(QWT_INCLUDE_DIRS + NAMES qwt_global.h + HINTS + ${CMAKE_INSTALL_PREFIX}/include/qwt + PATHS + /usr/local/include/qwt-qt4 + /usr/local/include/qwt + /usr/include/qwt6 + /usr/include/qwt-qt4 + /usr/include/qwt-qt4 + /usr/include/qwt + /usr/include/qwt5 + /usr/include/qwt6-qt5 + /usr/include/qt5/qwt + /opt/local/include/qwt + /sw/include/qwt + /usr/local/lib/qwt.framework/Headers +) + +find_library (QWT_LIBRARIES + NAMES qwt6 qwt6-qt5 qwt-qt5 qwt6-qt4 qwt qwt-qt4 + HINTS + ${CMAKE_INSTALL_PREFIX}/lib + ${CMAKE_INSTALL_PREFIX}/lib64 + PATHS + /usr/local/lib + /usr/lib + /opt/local/lib + /sw/lib + /usr/local/lib/qwt.framework +) + +set(QWT_FOUND FALSE) +if(QWT_INCLUDE_DIRS) + file(STRINGS "${QWT_INCLUDE_DIRS}/qwt_global.h" + QWT_STRING_VERSION REGEX "QWT_VERSION_STR") + set(QWT_WRONG_VERSION True) + set(QWT_VERSION "No Version") + string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" QWT_VERSION ${QWT_STRING_VERSION}) + string(COMPARE LESS ${QWT_VERSION} "5.2.0" QWT_WRONG_VERSION) + string(COMPARE GREATER ${QWT_VERSION} "6.2.0" QWT_WRONG_VERSION) + + message(STATUS "QWT Version: ${QWT_VERSION}") + if(NOT QWT_WRONG_VERSION) + set(QWT_FOUND TRUE) + else(NOT QWT_WRONG_VERSION) + message(STATUS "QWT Version must be >= 5.2 and <= 6.2.0, Found ${QWT_VERSION}") + endif(NOT QWT_WRONG_VERSION) + +endif(QWT_INCLUDE_DIRS) + +if(QWT_FOUND) + # handle the QUIETLY and REQUIRED arguments and set QWT_FOUND to TRUE if + # all listed variables are TRUE + include ( FindPackageHandleStandardArgs ) + find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARIES QWT_INCLUDE_DIRS ) + MARK_AS_ADVANCED(QWT_LIBRARIES QWT_INCLUDE_DIRS) +endif(QWT_FOUND) diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake new file mode 100644 index 0000000..aa29e5d --- /dev/null +++ b/cmake/Modules/FindQwt.cmake @@ -0,0 +1,65 @@ +# - try to find Qwt libraries and include files +# QWT_INCLUDE_DIR where to find qwt_global.h, etc. +# QWT_LIBRARIES libraries to link against +# QWT_FOUND If false, do not try to use Qwt +# qwt_global.h holds a string with the QWT version; +# test to make sure it's at least 5.2 + +find_path(QWT_INCLUDE_DIRS + NAMES qwt_global.h + HINTS + ${CMAKE_INSTALL_PREFIX}/include/qwt + PATHS + /usr/local/include/qwt-qt4 + /usr/local/include/qwt + /usr/include/qwt6 + /usr/include/qwt-qt4 + /usr/include/qwt-qt4 + /usr/include/qwt + /usr/include/qwt5 + /usr/include/qwt6-qt5 + /usr/include/qt5/qwt + /opt/local/include/qwt + /sw/include/qwt + /usr/local/lib/qwt.framework/Headers +) + +find_library (QWT_LIBRARIES + NAMES qwt6 qwt6-qt5 qwt-qt5 qwt6-qt4 qwt qwt-qt4 + HINTS + ${CMAKE_INSTALL_PREFIX}/lib + ${CMAKE_INSTALL_PREFIX}/lib64 + PATHS + /usr/local/lib + /usr/lib + /opt/local/lib + /sw/lib + /usr/local/lib/qwt.framework +) + +set(QWT_FOUND FALSE) +if(QWT_INCLUDE_DIRS) + file(STRINGS "${QWT_INCLUDE_DIRS}/qwt_global.h" + QWT_STRING_VERSION REGEX "QWT_VERSION_STR") + set(QWT_WRONG_VERSION True) + set(QWT_VERSION "No Version") + string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" QWT_VERSION ${QWT_STRING_VERSION}) + string(COMPARE LESS ${QWT_VERSION} "5.2.0" QWT_WRONG_VERSION) + string(COMPARE GREATER ${QWT_VERSION} "6.2.0" QWT_WRONG_VERSION) + + message(STATUS "QWT Version: ${QWT_VERSION}") + if(NOT QWT_WRONG_VERSION) + set(QWT_FOUND TRUE) + else(NOT QWT_WRONG_VERSION) + message(STATUS "QWT Version must be >= 5.2 and <= 6.2.0, Found ${QWT_VERSION}") + endif(NOT QWT_WRONG_VERSION) + +endif(QWT_INCLUDE_DIRS) + +if(QWT_FOUND) + # handle the QUIETLY and REQUIRED arguments and set QWT_FOUND to TRUE if + # all listed variables are TRUE + include ( FindPackageHandleStandardArgs ) + find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARIES QWT_INCLUDE_DIRS ) + MARK_AS_ADVANCED(QWT_LIBRARIES QWT_INCLUDE_DIRS) +endif(QWT_FOUND) diff --git a/cmake/Modules/Findzlib.cmake b/cmake/Modules/Findzlib.cmake new file mode 100644 index 0000000..b55fa6a --- /dev/null +++ b/cmake/Modules/Findzlib.cmake @@ -0,0 +1,20 @@ +# Find zlib + +FIND_PATH(ZLIB_INCLUDE_DIR zlib.h) + +SET(ZLIB_NAMES ${ZLIB_NAMES} libz z) +FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} PATH) + +IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY) + SET(ZLIB_FOUND TRUE) +ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY) + +IF (ZLIB_FOUND) + IF (NOT zlib_FIND_QUIETLY) + MESSAGE (STATUS "Found zlib: ${ZLIBFILE_LIBRARY}") + ENDIF (NOT zlib_FIND_QUIETLY) +ELSE (ZLIB_FOUND) + IF (zlib_FIND_REQUIRED) + MESSAGE (FATAL_ERROR "Could not find zlib") + ENDIF (zlib_FIND_REQUIRED) +ENDIF (ZLIB_FOUND) diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in new file mode 100644 index 0000000..2037e36 --- /dev/null +++ b/cmake/cmake_uninstall.cmake.in @@ -0,0 +1,21 @@ +if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + +file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +string(REGEX REPLACE "\n" ";" files "${files}") +foreach(file ${files}) + message(STATUS "Uninstalling $ENV{DESTDIR}${file}") + if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + exec_program( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + if(NOT "${rm_retval}" STREQUAL 0) + message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") + endif(NOT "${rm_retval}" STREQUAL 0) + else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + message(STATUS "File $ENV{DESTDIR}${file} does not exist.") + endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") +endforeach(file) diff --git a/dab-processor.cpp b/dab-processor.cpp new file mode 100644 index 0000000..06dc9d1 --- /dev/null +++ b/dab-processor.cpp @@ -0,0 +1,433 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "dab-processor.h" +#include "fic-handler.h" +#include "msc-handler.h" +#include "radio.h" +#include "dab-params.h" +// +/** + * \brief dabProcessor + * The dabProcessor class is the driver of the processing + * of the samplestream. + * It is the main interface to the qt-dab program, + * local are classes ofdmDecoder, ficHandler and mschandler. + */ + +#define C_LEVEL_SIZE 50 + dabProcessor::dabProcessor (RadioInterface *mr, + virtualInput *theRig, + uint8_t dabMode, + int16_t threshold, + int16_t diff_length, + QString picturesPath, + RingBuffer> *spectrumBuffer + ): + params (dabMode), + myReader (mr, + theRig, + spectrumBuffer + ), + my_ficHandler (mr, dabMode), + my_mscHandler (mr, dabMode, + picturesPath), + phaseSynchronizer (mr, + dabMode, + threshold, + diff_length), + my_ofdmDecoder (mr, + dabMode, + theRig -> bitDepth (), + &my_ficHandler, + &my_mscHandler) { +int32_t i; + + this -> myRadioInterface = mr; + this -> theRig = theRig; + this -> T_null = params. get_T_null (); + this -> T_s = params. get_T_s (); + this -> T_u = params. get_T_u (); + this -> T_F = params. get_T_F (); + this -> nrBlocks = params. get_L (); + this -> carriers = params. get_carriers (); + this -> carrierDiff = params. get_carrierDiff (); + + + ofdmBuffer. resize (2 * T_s); + ofdmBufferIndex = 0; + ofdmSymbolCount = 0; + tokenCount = 0; + fineCorrector = 0; + f2Correction = true; + attempts = 0; + scanMode = false; + connect (this, SIGNAL (setSynced (char)), + myRadioInterface, SLOT (setSynced (char))); + connect (this, SIGNAL (No_Signal_Found (void)), + myRadioInterface, SLOT (No_Signal_Found(void))); + connect (this, SIGNAL (setSyncLost (void)), + myRadioInterface, SLOT (setSyncLost (void))); + + myReader. setRunning (false); +// the thread will be started from somewhere else +} + + dabProcessor::~dabProcessor (void) { + if (isRunning ()) { + myReader. setRunning (false); + // exception to be raised + // through the getSample(s) functions. + msleep (100); + while (isRunning ()) { + usleep (100); + } + } +} + +/*** + * \brief run + * The main thread, reading samples, + * time synchronization and frequency synchronization + * Identifying blocks in the DAB frame + * and sending them to the ofdmDecoder who will transfer the results + * Finally, estimating the small freqency error + */ +void dabProcessor::run (void) { +int32_t startIndex; +int32_t i; +std::complex FreqCorr; +int32_t counter; +float cLevel; +int32_t syncBufferIndex = 0; +const +int32_t syncBufferSize = 32768; +const +int32_t syncBufferMask = syncBufferSize - 1; +float envBuffer [syncBufferSize]; + + fineCorrector = 0; + f2Correction = true; + syncBufferIndex = 0; + attempts = 0; + theRig -> resetBuffer (); + coarseOffset = theRig -> getOffset (); + myReader. setRunning (true); + my_ofdmDecoder. start (); +// +// to get some idea of the signal strength + try { + for (i = 0; i < T_F / 5; i ++) { + myReader. getSample (0); + } +Initing: +notSynced: + syncBufferIndex = 0; + cLevel = 0; + + for (i = 0; i < C_LEVEL_SIZE; i ++) { + std::complex sample = myReader. getSample (0); + envBuffer [syncBufferIndex] = jan_abs (sample); + cLevel += envBuffer [syncBufferIndex]; + syncBufferIndex ++; + } +/** + * We now have initial values for cLevel (i.e. the sum + * over the last C_LEVEL_SIZE samples) and sLevel, the long term average. + */ +SyncOnNull: +/** + * here we start looking for the null level, i.e. a dip + */ + counter = 0; + setSynced (false); + while (cLevel / C_LEVEL_SIZE > 0.40 * myReader. get_sLevel ()) { + std::complex sample = + myReader. getSample (coarseOffset + fineCorrector); + envBuffer [syncBufferIndex] = jan_abs (sample); +// update the levels + cLevel += envBuffer [syncBufferIndex] - + envBuffer [(syncBufferIndex - C_LEVEL_SIZE) & syncBufferMask]; + syncBufferIndex = (syncBufferIndex + 1) & syncBufferMask; + counter ++; + if (counter > T_F) { // hopeless + if (scanMode && (++ attempts >= 5)) { + emit (No_Signal_Found ()); + attempts = 0; + } + + goto notSynced; + } + } +/** + * It seemed we found a dip that started app 65/100 * 50 samples earlier. + * We now start looking for the end of the null period. + */ + counter = 0; +SyncOnEndNull: + while (cLevel / C_LEVEL_SIZE < 0.75 * myReader. get_sLevel ()) { + std::complex sample = + myReader. getSample (coarseOffset + fineCorrector); + envBuffer [syncBufferIndex] = jan_abs (sample); +// update the levels + cLevel += envBuffer [syncBufferIndex] - + envBuffer [(syncBufferIndex - C_LEVEL_SIZE) & syncBufferMask]; + syncBufferIndex = (syncBufferIndex + 1) & syncBufferMask; + counter ++; +// + if (counter > T_null + 50) { // hopeless + goto notSynced; + } + } +/** + * The end of the null period is identified, the actual end + * is probably about 40 samples earlier. + */ +SyncOnPhase: +/** + * We now have to find the exact first sample of the non-null period. + * We use a correlation that will find the first sample after the + * cyclic prefix. + * When in "sync", i.e. pretty sure that we know were we are, + * we skip the "dip" identification and come here right away. + * + * now read in Tu samples. The precise number is not really important + * as long as we can be sure that the first sample to be identified + * is part of the samples read. + */ + myReader. getSamples (ofdmBuffer. data (), + T_u, coarseOffset + fineCorrector); +// +// and then, call upon the phase synchronizer to verify/compute +// the real "first" sample + startIndex = phaseSynchronizer. findIndex (ofdmBuffer); + if (startIndex < 0) { // no sync, try again + if (!f2Correction) { + setSyncLost (); + } + goto notSynced; + } +/** + * Once here, we are synchronized, we need to copy the data we + * used for synchronization for block 0 + */ + memmove (ofdmBuffer. data (), + &((ofdmBuffer. data ()) [startIndex]), + (T_u - startIndex) * sizeof (std::complex)); + ofdmBufferIndex = T_u - startIndex; + +Block_0: +/** + * Block 0 is special in that it is used for fine time synchronization, + * for coarse frequency synchronization + * and its content is used as a reference for decoding the + * first datablock. + * We read the missing samples in the ofdm buffer + */ + setSynced (true); + myReader. getSamples (&((ofdmBuffer. data ()) [ofdmBufferIndex]), + T_u - ofdmBufferIndex, + coarseOffset + fineCorrector); + my_ofdmDecoder. processBlock_0 (ofdmBuffer); + +// Here we look only at the block_0 when we need a coarse +// frequency synchronization. + f2Correction = !my_ficHandler. syncReached (); + if (f2Correction) { + int correction = + phaseSynchronizer. estimate_CarrierOffset (ofdmBuffer); + if (correction != 100) { + coarseOffset += correction * carrierDiff; + if (abs (coarseOffset) > Khz (35)) + coarseOffset = 0; + } + } +/** + * after block 0, we will just read in the other (params -> L - 1) blocks + */ +Data_blocks: +/** + * The first ones are the FIC blocks. We immediately + * start with building up an average of the phase difference + * between the samples in the cyclic prefix and the + * corresponding samples in the datapart. + */ + FreqCorr = std::complex (0, 0); + for (ofdmSymbolCount = 1; + ofdmSymbolCount < 4; ofdmSymbolCount ++) { + myReader. getSamples (ofdmBuffer. data (), + T_s, coarseOffset + fineCorrector); + for (i = (int)T_u; i < (int)T_s; i ++) + FreqCorr += ofdmBuffer [i] * conj (ofdmBuffer [i - T_u]); + + my_ofdmDecoder. decodeFICblock (ofdmBuffer, ofdmSymbolCount); + } + +/// and similar for the (params -> L - 4) MSC blocks + for (ofdmSymbolCount = 4; + ofdmSymbolCount < (uint16_t)nrBlocks; + ofdmSymbolCount ++) { + myReader. getSamples (ofdmBuffer. data (), + T_s, coarseOffset + fineCorrector); + for (i = (int32_t)T_u; i < (int32_t)T_s; i ++) + FreqCorr += ofdmBuffer [i] * conj (ofdmBuffer [i - T_u]); + + my_ofdmDecoder. decodeMscblock (ofdmBuffer, ofdmSymbolCount); + } + +NewOffset: +/// we integrate the newly found frequency error with the +/// existing frequency error. + fineCorrector += 0.1 * arg (FreqCorr) / (2 * M_PI) * carrierDiff; +// +/** + * OK, here we are at the end of the frame + * Assume everything went well and skip T_null samples + */ + syncBufferIndex = 0; + cLevel = 0; + myReader. getSamples (ofdmBuffer. data (), + T_null, coarseOffset); +/** + * The first sample to be found for the next frame should be T_g + * samples ahead. Before going for the next frame, we + * we just check the fineCorrector + */ + if (fineCorrector > carrierDiff / 2) { + coarseOffset += carrierDiff; + fineCorrector -= carrierDiff; + } + else + if (fineCorrector < -carrierDiff / 2) { + coarseOffset -= carrierDiff; + fineCorrector += carrierDiff; + } +ReadyForNewFrame: +/// and off we go, up to the next frame + counter = 0; + goto SyncOnPhase; + } + catch (int e) { + fprintf (stderr, "dabProcessor is stopping\n"); + ; + } + my_ofdmDecoder. stop (); + my_mscHandler. stop (); + my_ficHandler. stop (); +} + +void dabProcessor:: reset (void) { + myReader. setRunning (false); + while (isRunning ()) + wait (); + usleep (10000); + my_ofdmDecoder. stop (); + my_mscHandler. reset (); + my_ficHandler. reset (); + start (); +} + +void dabProcessor::stop (void) { + myReader. setRunning (false); + while (isRunning ()) + wait (); + usleep (10000); + my_ofdmDecoder. stop (); + my_mscHandler. reset (); + my_ficHandler. reset (); +} + +void dabProcessor::coarseCorrectorOn (void) { + f2Correction = true; + coarseOffset = 0; +} + +void dabProcessor::coarseCorrectorOff (void) { + f2Correction = false; + theRig -> setOffset (coarseOffset); +} + +void dabProcessor::set_scanMode (bool b) { + scanMode = b; + attempts = 0; +} + +// we could have derive the dab processor from fic and msc handlers, +// however, from a logical point of view they are more delegates than +// parents. +uint8_t dabProcessor::kindofService (QString &s) { + return my_ficHandler. kindofService (s); +} + +void dabProcessor::dataforAudioService (int16_t c, audiodata *dd) { + my_ficHandler. dataforAudioService (c, dd); +} + +void dabProcessor::dataforAudioService (QString &s,audiodata *dd) { + my_ficHandler. dataforAudioService (s, dd, 0); +} + +void dabProcessor::dataforAudioService (QString &s, + audiodata *d, int16_t c) { + my_ficHandler. dataforAudioService (s, d, c); +} + +void dabProcessor::dataforDataService (int16_t c, packetdata *dd) { + my_ficHandler. dataforDataService (c, dd); +} + +void dabProcessor::dataforDataService (QString &s, packetdata *dd) { + my_ficHandler. dataforDataService (s, dd, 0); +} + +void dabProcessor::dataforDataService (QString &s, + packetdata *d, int16_t c) { + my_ficHandler. dataforDataService (s, d, c); +} + + +void dabProcessor::reset_msc (void) { + my_mscHandler. reset (); +} + +void dabProcessor::set_audioChannel (audiodata *d, + RingBuffer *b) { + my_mscHandler. set_audioChannel (d, b); +} + +void dabProcessor::set_dataChannel (packetdata *d, + RingBuffer *b) { + my_mscHandler. set_dataChannel (d, b); +} + +int32_t dabProcessor::get_ensembleId (void) { + return my_ficHandler. get_ensembleId (); +} + +QString dabProcessor::get_ensembleName (void) { + return my_ficHandler. get_ensembleName (); +} + +void dabProcessor::clearEnsemble (void) { + my_ficHandler. clearEnsemble (); +} + + diff --git a/dab-processor.h b/dab-processor.h new file mode 100644 index 0000000..d9cdb6f --- /dev/null +++ b/dab-processor.h @@ -0,0 +1,127 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __DAB_PROCESSOR__ +#define __DAB_PROCESSOR__ +/* + * dabProcessor is the embodying of all functionality related + * to the actal DAB processing. + */ +#include "dab-constants.h" +#include +#include +#include +#include "stdint.h" +#include +#include "sample-reader.h" +#include "phasereference.h" +#include "ofdm-decoder.h" +#include "fic-handler.h" +#include "msc-handler.h" +#include "virtual-input.h" +#include "ringbuffer.h" +// + +class RadioInterface; +class dabParams; + +class dabProcessor: public QThread { +Q_OBJECT +public: + dabProcessor (RadioInterface *, + virtualInput *, + uint8_t, + int16_t, + int16_t, + QString, + RingBuffer> *); + ~dabProcessor (void); + void reset (void); + void stop (void); + void setOffset (int32_t); + void coarseCorrectorOn (void); + void coarseCorrectorOff (void); + void startDumping (SNDFILE *); + void stopDumping (void); + void set_scanMode (bool); +// +// inheriting from our delegates + void setSelectedService (QString &); + uint8_t kindofService (QString &); + void dataforAudioService (int16_t, audiodata *); + void dataforAudioService (QString &, audiodata *); + void dataforAudioService (QString &, + audiodata *, int16_t); + void dataforDataService (int16_t, packetdata *); + void dataforDataService (QString &, packetdata *); + void dataforDataService (QString &, + packetdata *, int16_t); + void reset_msc (void); + void set_audioChannel (audiodata *, + RingBuffer *); + void set_dataChannel (packetdata *, + RingBuffer *); + int32_t get_ensembleId (void); + QString get_ensembleName (void); + void clearEnsemble (void); +private: + virtualInput *theRig; + dabParams params; + sampleReader myReader; + RadioInterface *myRadioInterface; + ficHandler my_ficHandler; + mscHandler my_mscHandler; + + int16_t attempts; + bool scanMode; + int32_t T_null; + int32_t T_u; + int32_t T_s; + int32_t T_g; + int32_t T_F; + int32_t nrBlocks; + int32_t carriers; + int32_t carrierDiff; + std::vector > dataBuffer; + int16_t fineCorrector; + int32_t coarseOffset; + + bool f2Correction; + int32_t tokenCount; + std::vector >ofdmBuffer; + uint32_t ofdmBufferIndex; + uint32_t ofdmSymbolCount; + phaseReference phaseSynchronizer; + ofdmDecoder my_ofdmDecoder; + bool wasSecond (int16_t, dabParams *); +virtual void run (void); + bool isReset; +signals: + void setSynced (char); + void No_Signal_Found (void); + void setSyncLost (void); + void showCoordinates (int, int); +// void showCoordinates (float, float); + void show_Spectrum (int); +}; +#endif + diff --git a/dab-scope/scopewidget.ui b/dab-scope/scopewidget.ui new file mode 100644 index 0000000..755168e --- /dev/null +++ b/dab-scope/scopewidget.ui @@ -0,0 +1,113 @@ + + + scopeWidget + + + + 0 + 0 + 713 + 208 + + + + DAB signal + + + + + 50 + 20 + 461 + 161 + + + + <html><head/><body><p>Spectrum display, shows the frequency spectrum from the channel currently being received.</p></body></html> + + + + + + 10 + 10 + 20 + 171 + + + + <html><head/><body><p>Zoom in/out</p></body></html> + + + 50 + + + Qt::Vertical + + + + + + 510 + 20 + 181 + 111 + + + + <html><head/><body><p>Constellation diagram, obtained from the first data block in a DAB frame. What is shown are the constellations of the carriers in the decoded OFDM symbol. </p><p>In DAB the bits are encoded as (1, 1), (1, -1), (-1, -1) and (1,1), so ideally there are 4 points, one in each corner. The quality of the signal is inverse to the clouds that are visible. The number indicated below this &quot;cloud picture&quot; shows the standard deviation of the dots on the cloud(s).</p><p>Hint: Lots of clouds mean poor signal.</p></body></html> + + + + + + 530 + 140 + 171 + 24 + + + + <html><head/><body><p>Zoom in/out</p></body></html> + + + 20 + + + Qt::Horizontal + + + + + + 620 + 170 + 81 + 23 + + + + <html><head/><body><p>Quality indicator (experimental). The number shows the standard phase deviation of the decoded signal.</p></body></html> + + + QFrame::NoFrame + + + 7 + + + QLCDNumber::Flat + + + + + + QwtPlot + QFrame +
qwt_plot.h
+ 1 +
+
+ + +
diff --git a/dab-scope/spectrum-handler.cpp b/dab-scope/spectrum-handler.cpp new file mode 100644 index 0000000..45a686c --- /dev/null +++ b/dab-scope/spectrum-handler.cpp @@ -0,0 +1,198 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of dabradio + * dabradio 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; either version 2 of the License, or + * (at your option) any later version. + * + * dabradio 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with dabradio; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "spectrum-handler.h" +#include + + spectrumhandler::spectrumhandler (QwtPlot *dabScope, + int32_t displaySize, + RingBuffer> *sbuffer) { +int16_t i; +QString colorString = "black"; +QColor displayColor; +QColor gridColor; +QColor curveColor; + + this -> plotgrid = dabScope; + this -> displaySize = displaySize; + this -> scopeBuffer = sbuffer; + + colorString = "black"; + displayColor = QColor (colorString); + colorString = "white"; + curveColor = QColor (colorString); + + displayBuffer. resize (displaySize); + memset (displayBuffer. data (), 0, displaySize * sizeof (double)); + this -> spectrumSize = 4 * displaySize; + spectrum = (std::complex *)fftwf_malloc (sizeof (fftwf_complex) * spectrumSize); + plan = fftwf_plan_dft_1d (spectrumSize, + reinterpret_cast (spectrum), + reinterpret_cast (spectrum), + FFTW_FORWARD, FFTW_ESTIMATE); + + plotgrid -> setCanvasBackground (displayColor); + grid = new QwtPlotGrid; +#if defined QWT_VERSION && ((QWT_VERSION >> 8) < 0x0601) + grid -> setMajPen (QPen(gridColor, 0, Qt::DotLine)); +#else + grid -> setMajorPen (QPen(gridColor, 0, Qt::DotLine)); +#endif + grid -> enableXMin (true); + grid -> enableYMin (true); +#if defined QWT_VERSION && ((QWT_VERSION >> 8) < 0x0601) + grid -> setMinPen (QPen(gridColor, 0, Qt::DotLine)); +#else + grid -> setMinorPen (QPen(gridColor, 0, Qt::DotLine)); +#endif + grid -> attach (plotgrid); + + spectrumCurve = new QwtPlotCurve (""); + spectrumCurve -> setPen (QPen(Qt::white)); + spectrumCurve -> setOrientation (Qt::Horizontal); + spectrumCurve -> setBaseline (get_db (0)); + ourBrush = new QBrush (Qt::white); + ourBrush -> setStyle (Qt::Dense3Pattern); + spectrumCurve -> setBrush (*ourBrush); + spectrumCurve -> attach (plotgrid); + + Marker = new QwtPlotMarker (); + Marker -> setLineStyle (QwtPlotMarker::VLine); + Marker -> setLinePen (QPen (Qt::red)); + Marker -> attach (plotgrid); + plotgrid -> enableAxis (QwtPlot::yLeft); + + Window. resize (spectrumSize); + for (i = 0; i < spectrumSize; i ++) + Window [i] = + 0.42 - 0.5 * cos ((2.0 * M_PI * i) / (spectrumSize - 1)) + + 0.08 * cos ((4.0 * M_PI * i) / (spectrumSize - 1)); + setBitDepth (12); +} + + spectrumhandler::~spectrumhandler (void) { + fftwf_destroy_plan (plan); + fftwf_free (spectrum); + delete Marker; + delete ourBrush; + delete spectrumCurve; + delete grid; +} + +void spectrumhandler::showSpectrum (int32_t amount, int32_t vfoFrequency) { +double X_axis [displaySize]; +double Y_values [displaySize]; +int16_t i, j; +double temp = (double)INPUT_RATE / 2 / displaySize; +int16_t averageCount = 5; + + (void)amount; + if (scopeBuffer -> GetRingBufferReadAvailable () < spectrumSize) + return; + +// first X axis labels + for (i = 0; i < displaySize; i ++) + X_axis [i] = + ((double)vfoFrequency - (double)(INPUT_RATE / 2) + + (double)((i) * (double) 2 * temp)) / ((double)1000000); +// +// get the buffer data + scopeBuffer -> getDataFromBuffer (spectrum, spectrumSize); + scopeBuffer -> FlushRingBuffer (); +// and window it + for (i = 0; i < spectrumSize; i ++) + spectrum [i] = cmul (spectrum [i], Window [i]); + + fftwf_execute (plan); +// +// and map the spectrumSize values onto displaySize elements + for (i = 0; i < displaySize / 2; i ++) { + double f = 0; + for (j = 0; j < spectrumSize / displaySize; j ++) + f += abs (spectrum [spectrumSize / displaySize * i + j]); + + Y_values [displaySize / 2 + i] = + f / (spectrumSize / displaySize); + f = 0; + for (j = 0; j < spectrumSize / displaySize; j ++) + f += abs (spectrum [spectrumSize / 2 + + spectrumSize / displaySize * i + j]); + Y_values [i] = f / (spectrumSize / displaySize); + } +// +// average the image a little. + for (i = 0; i < displaySize; i ++) { + if (std::isnan (Y_values [i]) || std::isinf (Y_values [i])) + continue; + displayBuffer [i] = + (double)(averageCount - 1) /averageCount * displayBuffer [i] + + 1.0f / averageCount * Y_values [i]; + } + + memcpy (Y_values, + displayBuffer. data (), displaySize * sizeof (double)); + ViewSpectrum (X_axis, Y_values, + 50, + vfoFrequency / 1000); +} + +void spectrumhandler::ViewSpectrum (double *X_axis, + double *Y1_value, + double amp, + int32_t marker) { +uint16_t i; + + amp = amp / 50.0 * (-get_db (0)); + plotgrid -> setAxisScale (QwtPlot::xBottom, + (double)X_axis [0], + X_axis [displaySize - 1]); + plotgrid -> enableAxis (QwtPlot::xBottom); + plotgrid -> setAxisScale (QwtPlot::yLeft, + get_db (0), get_db (0) + amp); +// get_db (0), 0); + + for (i = 0; i < displaySize; i ++) + Y1_value [i] = get_db (amp * Y1_value [i]); + + spectrumCurve -> setBaseline (get_db (0)); + Y1_value [0] = get_db (0); + Y1_value [displaySize - 1] = get_db (0); + + spectrumCurve -> setSamples (X_axis, Y1_value, displaySize); + Marker -> setXValue (marker); + plotgrid -> replot(); +} + +float spectrumhandler::get_db (float x) { + return 20 * log10 ((x + 1) / (float)(normalizer)); +} + +void spectrumhandler::setBitDepth (int16_t d) { + + if (d < 0 || d > 32) + d = 24; + + normalizer = 1; + while (-- d > 0) + normalizer <<= 1; +} + diff --git a/dab-scope/spectrum-handler.h b/dab-scope/spectrum-handler.h new file mode 100644 index 0000000..b211cb3 --- /dev/null +++ b/dab-scope/spectrum-handler.h @@ -0,0 +1,68 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +// +// +#ifndef __SPECTRUM_HANDLER__ +#define __SPECTRUM_HANDLER__ + +#include "dab-constants.h" +#include +#include +#include "ringbuffer.h" +#include +#include +#include +#include +#include +#include + + +class spectrumhandler { +public: + spectrumhandler (QwtPlot *, + int32_t , + RingBuffer> *); + ~spectrumhandler (void); + void showSpectrum (int32_t, int32_t); + void setBitDepth (int16_t); +private: + RingBuffer> *scopeBuffer; + int16_t displaySize; + int16_t spectrumSize; + std::complex *spectrum; + std::vector displayBuffer; + std::vector Window; + fftwf_plan plan; + QwtPlotMarker *Marker; + QwtPlot *plotgrid; + QwtPlotGrid *grid; + QwtPlotCurve *spectrumCurve; + QBrush *ourBrush; + int32_t indexforMarker; + void ViewSpectrum (double *, double *, double, int); + float get_db (float); + int32_t normalizer; +}; + +#endif + diff --git a/dabradio.desktop b/dabradio.desktop new file mode 100644 index 0000000..119eff9 --- /dev/null +++ b/dabradio.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=dabradio +Exec=dabradio +Icon=dabradio +Type=Application +Categories=AudioVideo; +Comment=A DAB/DAB+ decoder using Qt and C++ diff --git a/dabradio.ico b/dabradio.ico new file mode 100644 index 0000000..ea192a9 Binary files /dev/null and b/dabradio.ico differ diff --git a/dabradio.png b/dabradio.png new file mode 100644 index 0000000..fcebaac Binary files /dev/null and b/dabradio.png differ diff --git a/dabradio.pro b/dabradio.pro new file mode 100644 index 0000000..8afa825 --- /dev/null +++ b/dabradio.pro @@ -0,0 +1,354 @@ +###################################################################### +# Automatically generated by qmake (2.01a) Tue Oct 6 19:48:14 2009 +# but modified by me to accomodate for the includes for qwt, hamlib and +# portaudio +###################################################################### + +TEMPLATE = app +TARGET = dabradio-1.0 + +QT += widgets +CONFIG += console +QMAKE_CXXFLAGS += -std=c++11 +#QMAKE_CFLAGS += -flto -ffast-math +#QMAKE_CXXFLAGS += -flto -ffast-math +#QMAKE_LFLAGS += -flto +QMAKE_CFLAGS += -g +QMAKE_CXXFLAGS += -g +QMAKE_LFLAGS += -g +QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS] +RC_ICONS = qt-dab.ico +RESOURCES += resources.qrc + +TRANSLATIONS = i18n/de_DE.ts i18n/it_IT.ts i18n/hu_HU.ts + +DEPENDPATH += . \ + ./src \ + ./dab-scope \ + ./includes \ + ./src/ofdm \ + ./src/backend \ + ./src/backend/viterbi_768 \ + ./src/backend/audio \ + ./src/backend/data \ + ./src/output \ + ./src/various \ + ./devices \ + ./devices/rawfiles \ + ./devices/wavfiles \ + ./includes/ofdm \ + ./includes/backend \ + ./includes/backend/audio \ + ./includes/backend/data \ + ./includes/output \ + ./includes/various + +INCLUDEPATH += . \ + ./ \ + ./src \ + ./dab-scope \ + ./includes \ + ./includes/ofdm \ + ./includes/backend \ + ./includes/backend/viterbi_768 \ + ./includes/backend/audio \ + ./includes/backend/data \ + ./includes/output \ + ./includes/various \ + ./devices \ + ./devices/rawfiles \ + ./devices/wavfiles + +# Input +HEADERS += ./radio.h \ + ./dab-processor.h \ + ./dab-scope/spectrum-handler.h \ + ./includes/dab-constants.h \ + ./includes/country-codes.h \ + ./includes/ofdm/sample-reader.h \ + ./includes/ofdm/ofdm-decoder.h \ + ./includes/ofdm/phasereference.h \ + ./includes/ofdm/phasetable.h \ + ./includes/ofdm/freq-interleaver.h \ +# ./includes/backend/viterbi.h \ + ./includes/backend/viterbi_768/viterbi-768.h \ + ./includes/backend/fic-handler.h \ + ./includes/backend/msc-handler.h \ + ./includes/backend/fib-processor.h \ + ./includes/backend/galois.h \ + ./includes/backend/reed-solomon.h \ + ./includes/backend/rscodec.h \ + ./includes/backend/charsets.h \ + ./includes/backend/firecode-checker.h \ + ./includes/backend/frame-processor.h \ + ./includes/backend/virtual-backend.h \ + ./includes/backend/audio-backend.h \ + ./includes/backend/data-backend.h \ + ./includes/backend/audio/mp2processor.h \ + ./includes/backend/audio/mp4processor.h \ + ./includes/backend/audio/faad-decoder.h \ + ./includes/backend/data/data-processor.h \ + ./includes/backend/data/pad-handler.h \ + ./includes/backend/data/virtual-datahandler.h \ + ./includes/backend/data/mot-databuilder.h \ + ./includes/backend/data/mot-data.h \ + ./includes/backend/protection.h \ + ./includes/backend/eep-protection.h \ + ./includes/backend/uep-protection.h \ +# ./includes/output/fir-filters.h \ + ./includes/output/audio-base.h \ + ./includes/output/newconverter.h \ + ./includes/output/audiosink.h \ + ./includes/various/fft-handler.h \ + ./includes/various/ringbuffer.h \ + ./includes/various/Xtan2.h \ + ./includes/various/dab-params.h \ + ./includes/various/band-handler.h \ + ./includes/various/text-mapper.h \ + ./devices/virtual-input.h \ + ./devices/rawfiles/rawfiles.h \ + ./devices/wavfiles/wavfiles.h + +FORMS += ./devices/filereader-widget.ui +FORMS += ./forms/technical_data.ui + +SOURCES += ./main.cpp \ + ./radio.cpp \ + ./dab-processor.cpp \ + ./dab-scope/spectrum-handler.cpp \ + ./src/ofdm/sample-reader.cpp \ + ./src/ofdm/ofdm-decoder.cpp \ + ./src/ofdm/phasereference.cpp \ + ./src/ofdm/phasetable.cpp \ + ./src/ofdm/freq-interleaver.cpp \ +# ./src/backend/viterbi.cpp \ + ./src/backend/viterbi_768/viterbi-768.cpp \ + ./src/backend/fic-handler.cpp \ + ./src/backend/msc-handler.cpp \ + ./src/backend/protection.cpp \ + ./src/backend/eep-protection.cpp \ + ./src/backend/uep-protection.cpp \ + ./src/backend/fib-processor.cpp \ + ./src/backend/galois.cpp \ + ./src/backend/reed-solomon.cpp \ + ./src/backend/rscodec.cpp \ + ./src/backend/charsets.cpp \ + ./src/backend/firecode-checker.cpp \ + ./src/backend/frame-processor.cpp \ + ./src/backend/protTables.cpp \ + ./src/backend/virtual-backend.cpp \ + ./src/backend/audio-backend.cpp \ + ./src/backend/data-backend.cpp \ + ./src/backend/audio/mp2processor.cpp \ + ./src/backend/audio/mp4processor.cpp \ + ./src/backend/audio/faad-decoder.cpp \ + ./src/backend/data/pad-handler.cpp \ + ./src/backend/data/data-processor.cpp \ + ./src/backend/data/virtual-datahandler.cpp \ + ./src/backend/data/mot-databuilder.cpp \ + ./src/backend/data/mot-data.cpp \ +# ./src/output/fir-filters.cpp \ + ./src/output/audio-base.cpp \ + ./src/output/newconverter.cpp \ + ./src/output/audiosink.cpp \ + ./src/various/fft-handler.cpp \ + ./src/various/Xtan2.cpp \ + ./src/various/dab-params.cpp \ + ./src/various/band-handler.cpp \ + ./src/various/text-mapper.cpp \ + ./devices/virtual-input.cpp \ + ./devices/rawfiles/rawfiles.cpp \ + ./devices/wavfiles/wavfiles.cpp +# +# for unix systems this is about it. Adapt when needed for naming +# and locating libraries. If you do not need a device as +# listed, just comment the line out. +# +unix { +DESTDIR = ./linux-bin +exists ("./.git") { + GITHASHSTRING = $$system(git rev-parse --short HEAD) + !isEmpty(GITHASHSTRING) { + message("Current git hash = $$GITHASHSTRING") + DEFINES += GITHASH=\\\"$$GITHASHSTRING\\\" + } +} +isEmpty(GITHASHSTRING) { + DEFINES += GITHASH=\\\"------\\\" +} + +FORMS += ./forms/dabradio.ui +INCLUDEPATH += /usr/local/include +INCLUDEPATH += /usr/local/include /usr/include/qt4/qwt /usr/include/qt5/qwt /usr/include/qt4/qwt /usr/include/qwt /usr/local/qwt-6.1.4-svn/ + +LIBS += -lfftw3f -lusb-1.0 -ldl # +LIBS += -lportaudio +LIBS += -lz +LIBS += -lsndfile +LIBS += -lsamplerate +LIBS += -lfaad +LIBS += -lqwt-qt5 + +# +# comment or uncomment for the devices you want to have support for +# (you obviously have libraries installed for the selected ones) +CONFIG += dabstick +CONFIG += sdrplay +CONFIG += airspy + +#if you want to listen remote, uncomment +#CONFIG += tcp-streamer # use for remote listening +#otherwise, if you want to use the default qt way of soud out +#CONFIG += qt-audio +#comment both out if you just want to use the "normal" way + +#for the raspberry you definitely want this one +#when this one is enabled, load is spread over different threads +DEFINES += __THREADED_BACKEND +#DEFINES += __THREADED_DECODING + +#and this one is experimental +DEFINES += PRESET_NAME + +#and these one is just experimental, +#CONFIG += NEON +CONFIG += SSE +} +# +# an attempt to have it run under W32 through cross compilation +win32 { +#DESTDIR = ../../../dab-win +DESTDIR = ../../windows-bin +# includes in mingw differ from the includes in fedora linux + +exists ("./.git") { + GITHASHSTRING = $$system(git rev-parse --short HEAD) + !isEmpty(GITHASHSTRING) { + message("Current git hash = $$GITHASHSTRING") + DEFINES += GITHASH=\\\"$$GITHASHSTRING\\\" + } +} +isEmpty(GITHASHSTRING) { + DEFINES += GITHASH=\\\"------\\\" +} + +INCLUDEPATH += /usr/i686-w64-mingw32/sys-root/mingw/include +INCLUDEPATH += /mingw32/include +INCLUDEPATH += /mingw32/include/qwt +LIBS += -L/usr/i686-w64-mingw32/sys-root/mingw/lib +LIBS += -lfftw3f +LIBS += -lportaudio +LIBS += -lsndfile +LIBS += -lsamplerate +LIBS += -lole32 +LIBS += -lwinpthread +LIBS += -lwinmm +LIBS += -lstdc++ +LIBS += -lws2_32 +LIBS += -lfaad +LIBS += -lusb-1.0 +LIBS += -lz +FORMS += ./forms/dabradio.ui +FORMS += ./forms/technical_data.ui + +CONFIG += extio +CONFIG += airspy +CONFIG += rtl_tcp +CONFIG += dabstick +CONFIG += sdrplay + +CONFIG += NO_SSE + + +#for the raspberry you definitely want this one +#when this one is enabled, load is spread over different threads +DEFINES += __THREADED_BACKEND +#DEFINES += __THREADED_DECODING + + +#and this one is experimental +DEFINES += PRESET_NAME + +} + +# devices +# +# dabstick +dabstick { + DEFINES += HAVE_RTLSDR + DEPENDPATH += ./devices/rtlsdr-handler + INCLUDEPATH += ./devices/rtlsdr-handler + HEADERS += ./devices/rtlsdr-handler/rtlsdr-handler.h \ + ./devices/rtlsdr-handler/rtl-dongleselect.h + SOURCES += ./devices/rtlsdr-handler/rtlsdr-handler.cpp \ + ./devices/rtlsdr-handler/rtl-dongleselect.cpp + FORMS += ./devices/rtlsdr-handler/rtlsdr-widget.ui +} +# +# the SDRplay +# +sdrplay { + DEFINES += HAVE_SDRPLAY + DEPENDPATH += ./devices/sdrplay-handler + INCLUDEPATH += ./devices/sdrplay-handler + HEADERS += ./devices/sdrplay-handler/sdrplay-handler.h \ + ./devices/sdrplay-handler/sdrplayselect.h + SOURCES += ./devices/sdrplay-handler/sdrplay-handler.cpp \ + ./devices/sdrplay-handler/sdrplayselect.cpp + FORMS += ./devices/sdrplay-handler/sdrplay-widget.ui +} +# +# +# airspy support +# +airspy { + DEFINES += HAVE_AIRSPY + DEPENDPATH += ./devices/airspy + INCLUDEPATH += ./devices/airspy-handler \ + ./devices/airspy-handler/libairspy + HEADERS += ./devices/airspy-handler/airspy-handler.h \ + ./devices/airspy-handler/airspyfilter.h \ + ./devices/airspy-handler/libairspy/airspy.h + SOURCES += ./devices/airspy-handler/airspy-handler.cpp \ + ./devices/airspy-handler/airspyfilter.cpp + FORMS += ./devices/airspy-handler/airspy-widget.ui +} + +# +rtl_tcp { + DEFINES += HAVE_RTL_TCP + QT += network + INCLUDEPATH += ./devices/rtl_tcp + HEADERS += ./devices/rtl_tcp/rtl_tcp_client.h + SOURCES += ./devices/rtl_tcp/rtl_tcp_client.cpp + FORMS += ./devices/rtl_tcp/rtl_tcp-widget.ui +} + +qt-audio { + DEFINES += QT_AUDIO + QT += multimedia + HEADERS += ./includes/output/Qt-audio.h \ + ./includes/output/Qt-audiodevice.h + SOURCES += ./src/output/Qt-audio.cpp \ + ./src/output/Qt-audiodevice.cpp +} + +NEON { + DEFINES += NEON_AVAILABLE + QMAKE_CFLAGS += -mfpu=neon-vfpv4 + QMAKE_CXXFLAGS += -mfpu=neon-vfpv4 + HEADERS += ./src/backend/viterbi_768/spiral-neon.h + SOURCES += ./src/backend/viterbi_768/spiral-neon.c +} + +SSE { + DEFINES += SSE_AVAILABLE + HEADERS += ./src/backend/viterbi_768/spiral-sse.h + SOURCES += ./src/backend/viterbi_768/spiral-sse.c +} + +NO_SSE { + HEADERS += ./src/backend/viterbi_768/spiral-no-sse.h + SOURCES += ./src/backend/viterbi_768/spiral-no-sse.c +} + diff --git a/devices/airspy-handler/airspy-handler.cpp b/devices/airspy-handler/airspy-handler.cpp new file mode 100644 index 0000000..0f31e18 --- /dev/null +++ b/devices/airspy-handler/airspy-handler.cpp @@ -0,0 +1,766 @@ + +/** + * IW0HDV Extio + * + * Copyright 2015 by Andrea Montefusco IW0HDV + * + * Licensed under GNU General Public License 3.0 or later. + * Some rights reserved. See COPYING, AUTHORS. + * + * @license GPL-3.0+ + * + * recoding, taking parts and extending for the airspyHandler interface + * for the Qt-DAB program + * jan van Katwijk + * Lazy Chair Computing + */ + +#ifdef __MINGW32__ +#define GETPROCADDRESS GetProcAddress +#else +#define GETPROCADDRESS dlsym +#endif + +#include "airspy-handler.h" +#include "airspyfilter.h" + +static +const int EXTIO_NS = 8192; +static +const int EXTIO_BASE_TYPE_SIZE = sizeof (float); + + airspyHandler::airspyHandler (QSettings *s) { +int result, i; +int distance = 10000000; +std::vector sampleRates; +uint32_t samplerateCount; + + this -> airspySettings = s; + this -> myFrame = new QFrame (NULL); + setupUi (this -> myFrame); + this -> myFrame -> show (); + + filter = NULL; + airspySettings -> beginGroup ("airspyHandler"); + int16_t temp = airspySettings -> value ("linearity", 10). + toInt (); + linearitySlider -> setValue (temp); + linearityDisplay -> display (temp); + temp = airspySettings -> value ("sensitivity", 10). + toInt (); + sensitivitySlider -> setValue (temp); + sensitivityDisplay -> display (temp); + + vgaGain = airspySettings -> value ("vga", 5).toInt (); + vgaSlider -> setValue (vgaGain); + vgaDisplay -> display (vgaGain); + mixerGain = airspySettings -> value ("mixer", 10). toInt (); + mixerSlider -> setValue (mixerGain); + mixerDisplay -> display (mixerGain); + mixer_agc = false; + lnaGain = airspySettings -> value ("lna", 5). toInt (); + lnaSlider -> setValue (lnaGain); + lnaDisplay -> display (lnaGain); + mixer_agc = false; + lna_agc = false; + rf_bias = false; + coarseOffset = airspySettings -> value ("airspyOffset", 0). toInt (); + airspySettings -> endGroup (); + + device = 0; + serialNumber = 0; + theBuffer = NULL; +#ifdef __MINGW32__ + const char *libraryString = "airspy.dll"; + Handle = LoadLibrary ((wchar_t *)L"airspy.dll"); +#else + const char *libraryString = "libairspy.so"; + Handle = dlopen ("libairspy.so", RTLD_LAZY); +#endif + + if (Handle == NULL) { + fprintf (stderr, "failed to open %s\n", libraryString); +#ifndef __MINGW32__ + fprintf (stderr, "Error = %s\n", dlerror ()); +#endif + delete myFrame; + throw (20); + } + + libraryLoaded = true; + + if (!load_airspyFunctions ()) { + fprintf (stderr, "problem in loading functions\n"); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); + +#endif + delete myFrame; + } +// + strcpy (serial,""); + result = this -> my_airspy_init (); + if (result != AIRSPY_SUCCESS) { + printf ("my_airspy_init () failed: %s (%d)\n", + my_airspy_error_name((airspy_error)result), result); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + delete myFrame; + throw (21); + } + + result = my_airspy_open (&device); + if (result != AIRSPY_SUCCESS) { + printf ("my_airpsy_open () failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + delete myFrame; + throw (22); + } + + (void) my_airspy_set_sample_type (device, AIRSPY_SAMPLE_INT16_IQ); + (void) my_airspy_get_samplerates (device, &samplerateCount, 0); + fprintf (stderr, "%d samplerates are supported\n", samplerateCount); + sampleRates. resize (samplerateCount); + my_airspy_get_samplerates (device, + sampleRates. data (), samplerateCount); + + selectedRate = 0; + for (i = 0; i < (int)samplerateCount; i ++) { + fprintf (stderr, "%d \n", sampleRates [i]); + if (abs ((int)sampleRates [i] - 2048000) < distance) { + distance = abs ((int)sampleRates [i] - 2048000); + selectedRate = sampleRates [i]; + } + } + + if (selectedRate == 0) { + fprintf (stderr, "Sorry. cannot help you\n"); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + delete myFrame; + throw (23); + } + else + fprintf (stderr, "selected samplerate = %d\n", selectedRate); + + result = my_airspy_set_samplerate (device, selectedRate); + if (result != AIRSPY_SUCCESS) { + printf("airspy_set_samplerate() failed: %s (%d)\n", + my_airspy_error_name ((enum airspy_error)result), result); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + delete myFrame; + throw (24); + } + + airspySettings -> beginGroup ("airspyHandler"); + filtering = airspySettings -> value ("filtering", 0). toInt (); + int filterDegree = airspySettings -> value ("filterdegree", 9). toInt (); + filterDegree = (filterDegree & ~01) + 1; +// +// if we apply filtering it is using a symmetric lowpass filter + filter = new airspyFilter (filterDegree, + 1024000, selectedRate); + airspySettings -> endGroup (); + +// The sizes of the mapTables follow from the input and output rate +// (selectedRate / 1000) vs (2048000 / 1000) +// so we end up with buffers with 1 msec content + convBufferSize = selectedRate / 1000; + for (i = 0; i < 2048; i ++) { + float inVal = float (selectedRate / 1000); + mapTable_int [i] = int (floor (i * (inVal / 2048.0))); + mapTable_float [i] = i * (inVal / 2048.0) - mapTable_int [i]; + } + convIndex = 0; + convBuffer. resize (convBufferSize + 1); + + theBuffer = new RingBuffer> + (256 * 1024); + tabWidget -> setCurrentIndex (0); + connect (linearitySlider, SIGNAL (valueChanged (int)), + this, SLOT (set_linearity (int))); + connect (sensitivitySlider, SIGNAL (valueChanged (int)), + this, SLOT (set_sensitivity (int))); + connect (lnaSlider, SIGNAL (valueChanged (int)), + this, SLOT (set_lna_gain (int))); + connect (vgaSlider, SIGNAL (valueChanged (int)), + this, SLOT (set_vga_gain (int))); + connect (mixerSlider, SIGNAL (valueChanged (int)), + this, SLOT (set_mixer_gain (int))); + connect (lnaButton, SIGNAL (clicked (void)), + this, SLOT (set_lna_agc (void))); + connect (mixerButton, SIGNAL (clicked (void)), + this, SLOT (set_mixer_agc (void))); + connect (biasButton, SIGNAL (clicked (void)), + this, SLOT (set_rf_bias (void))); + connect (tabWidget, SIGNAL (currentChanged (int)), + this, SLOT (show_tab (int))); + displaySerial -> setText (getSerial ()); + running. store (false); + show_tab (0); // will set currentTab +} + + airspyHandler::~airspyHandler (void) { + airspySettings -> beginGroup ("airspyHandler"); + airspySettings -> setValue ("linearity", linearitySlider -> value ()); + airspySettings -> setValue ("sensitivity", sensitivitySlider -> value ()); + airspySettings -> setValue ("vga", vgaGain); + airspySettings -> setValue ("mixer", mixerGain); + airspySettings -> setValue ("lna", lnaGain); + airspySettings -> setValue ("airspyOffset", coarseOffset); + airspySettings -> endGroup (); + if (device != NULL) { + int result = my_airspy_stop_rx (device); + if (result != AIRSPY_SUCCESS) { + printf ("my_airspy_stop_rx () failed: %s (%d)\n", + my_airspy_error_name((airspy_error)result), result); + } + + result = my_airspy_close (device); + if (result != AIRSPY_SUCCESS) { + printf ("airspy_close () failed: %s (%d)\n", + my_airspy_error_name((airspy_error)result), result); + } + } + if (filter != NULL) + delete filter; + delete myFrame; + if (Handle == NULL) { + return; // nothing achieved earlier + } + my_airspy_exit (); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif +err: + if (theBuffer != NULL) + delete theBuffer; +} + +void airspyHandler::setVFOFrequency (int32_t nf) { +int result = my_airspy_set_freq (device, lastFrequency = nf); + + if (result != AIRSPY_SUCCESS) { + printf ("my_airspy_set_freq() failed: %s (%d)\n", + my_airspy_error_name((airspy_error)result), result); + } +} + +int32_t airspyHandler::getVFOFrequency (void) { + return lastFrequency; +} + +int32_t airspyHandler::defaultFrequency (void) { + return Khz (94700); +} + +bool airspyHandler::restartReader (void) { +int result; +int32_t bufSize = EXTIO_NS * EXTIO_BASE_TYPE_SIZE * 2; + if (running. load ()) + return true; + + theBuffer -> FlushRingBuffer (); + result = my_airspy_set_sample_type (device, AIRSPY_SAMPLE_INT16_IQ); +// result = my_airspy_set_sample_type (device, AIRSPY_SAMPLE_FLOAT32_IQ); + if (result != AIRSPY_SUCCESS) { + printf ("my_airspy_set_sample_type () failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); + return false; + } + + if (currentTab == 0) + set_sensitivity (sensitivitySlider -> value ()); + else + if (currentTab == 1) + set_linearity (linearitySlider -> value ()); + else { + set_vga_gain (vgaGain); + set_mixer_gain (mixerGain); + set_lna_gain (lnaGain); + } + + result = my_airspy_start_rx (device, + (airspy_sample_block_cb_fn)callback, this); + if (result != AIRSPY_SUCCESS) { + printf ("my_airspy_start_rx () failed: %s (%d)\n", + my_airspy_error_name((airspy_error)result), result); + return false; + } +// + running. store (true); + return true; +} + +void airspyHandler::stopReader (void) { +int result; + + if (!running. load ()) + return; + result = my_airspy_stop_rx (device); + + if (result != AIRSPY_SUCCESS ) + printf ("my_airspy_stop_rx() failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); + + running. store (false); +} +// +// Directly copied from the airspy extio dll from Andrea Montefusco +int airspyHandler::callback (airspy_transfer* transfer) { +airspyHandler *p; + + if (!transfer) + return 0; // should not happen + p = static_cast (transfer -> ctx); + +// we read AIRSPY_SAMPLE_INT16_IQ: + int32_t bytes_to_write = transfer -> sample_count * sizeof (int16_t) * 2; + uint8_t *pt_rx_buffer = (uint8_t *)transfer->samples; + p -> data_available (pt_rx_buffer, bytes_to_write); + return 0; +} + +// called from AIRSPY data callback +// 2*2 = 4 bytes for sample, as per AirSpy USB data stream format +// we do the rate conversion here, read in groups of 2 * xxx samples +// and transform them into groups of 2 * 512 samples +int airspyHandler::data_available (void *buf, int buf_size) { +int16_t *sbuf = (int16_t *)buf; +int nSamples = buf_size / (sizeof (int16_t) * 2); +std::complex temp [2048]; +int32_t i, j; + + if (filtering) { + for (i = 0; i < nSamples; i ++) { + convBuffer [convIndex ++] = filter -> Pass ( + sbuf [2 * i] / (float)2048, + sbuf [2 * i + 1] / (float)2048); + if (convIndex > convBufferSize) { + for (j = 0; j < 2048; j ++) { + int16_t inpBase = mapTable_int [j]; + float inpRatio = mapTable_float [j]; + temp [j] = cmul (convBuffer [inpBase + 1], inpRatio) + + cmul (convBuffer [inpBase], 1 - inpRatio); + } + + theBuffer -> putDataIntoBuffer (temp, 2048); +// +// shift the sample at the end to the beginning, it is needed +// as the starting sample for the next time + convBuffer [0] = convBuffer [convBufferSize]; + convIndex = 1; + } + } + } + else + for (i = 0; i < nSamples; i ++) { + convBuffer [convIndex ++] = std::complex ( + sbuf [2 * i] / (float)2048, + sbuf [2 * i + 1] / (float)2048); + if (convIndex > convBufferSize) { + for (j = 0; j < 2048; j ++) { + int16_t inpBase = mapTable_int [j]; + float inpRatio = mapTable_float [j]; + temp [j] = cmul (convBuffer [inpBase + 1], inpRatio) + + cmul (convBuffer [inpBase], 1 - inpRatio); + } + + theBuffer -> putDataIntoBuffer (temp, 2048); +// +// shift the sample at the end to the beginning, it is needed +// as the starting sample for the next time + convBuffer [0] = convBuffer [convBufferSize]; + convIndex = 1; + } + } + return 0; +} +// +const char *airspyHandler::getSerial (void) { +airspy_read_partid_serialno_t read_partid_serialno; +int result = my_airspy_board_partid_serialno_read (device, + &read_partid_serialno); + if (result != AIRSPY_SUCCESS) { + printf ("failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); + return "UNKNOWN"; + } else { + snprintf (serial, sizeof(serial), "%08X%08X", + read_partid_serialno. serial_no [2], + read_partid_serialno. serial_no [3]); + } + return serial; +} +// +// not used here +int airspyHandler::open (void) { +int result = my_airspy_open (&device); + + if (result != AIRSPY_SUCCESS) { + printf ("airspy_open() failed: %s (%d)\n", + my_airspy_error_name((airspy_error)result), result); + return -1; + } else { + return 0; + } +} + +// +// These functions are added for the SDR-J interface +void airspyHandler::resetBuffer (void) { + theBuffer -> FlushRingBuffer (); +} + +int16_t airspyHandler::bitDepth (void) { + return 13; +} + +int32_t airspyHandler::getSamples (std::complex *v, int32_t size) { + + return theBuffer -> getDataFromBuffer (v, size); +} + +int32_t airspyHandler::Samples (void) { + return theBuffer -> GetRingBufferReadAvailable (); +} +// +#define GAIN_COUNT (22) + +uint8_t airspy_linearity_vga_gains[GAIN_COUNT] = { 13, 12, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 8, 7, 6, 5, 4 }; +uint8_t airspy_linearity_mixer_gains[GAIN_COUNT] = { 12, 12, 11, 9, 8, 7, 6, 6, 5, 0, 0, 1, 0, 0, 2, 2, 1, 1, 1, 1, 0, 0 }; +uint8_t airspy_linearity_lna_gains[GAIN_COUNT] = { 14, 14, 14, 13, 12, 10, 9, 9, 8, 9, 8, 6, 5, 3, 1, 0, 0, 0, 0, 0, 0, 0 }; +uint8_t airspy_sensitivity_vga_gains[GAIN_COUNT] = { 13, 12, 11, 10, 9, 8, 7, 6, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4 }; +uint8_t airspy_sensitivity_mixer_gains[GAIN_COUNT] = { 12, 12, 12, 12, 11, 10, 10, 9, 9, 8, 7, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0 }; +uint8_t airspy_sensitivity_lna_gains[GAIN_COUNT] = { 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 12, 12, 9, 9, 8, 7, 6, 5, 3, 2, 1, 0 }; + +void airspyHandler::set_linearity (int value) { +int result = my_airspy_set_linearity_gain (device, value); +int temp; + if (result != AIRSPY_SUCCESS) { + printf ("airspy_set_lna_gain () failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); + return; + } + linearityDisplay -> display (value); + temp = airspy_linearity_lna_gains [GAIN_COUNT - 1 - value]; + linearity_lnaDisplay -> display (temp); + temp = airspy_linearity_mixer_gains [GAIN_COUNT - 1 - value]; + linearity_mixerDisplay -> display (temp); + temp = airspy_linearity_vga_gains [GAIN_COUNT - 1 - value]; + linearity_vgaDisplay -> display (temp); +} + +void airspyHandler::set_sensitivity (int value) { +int result = my_airspy_set_sensitivity_gain (device, value); +int temp; + if (result != AIRSPY_SUCCESS) { + printf ("airspy_set_mixer_gain() failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); + return; + } + sensitivityDisplay -> display (value); + temp = airspy_sensitivity_lna_gains [GAIN_COUNT - 1 - value]; + sensitivity_lnaDisplay -> display (temp); + temp = airspy_sensitivity_mixer_gains [GAIN_COUNT - 1 - value]; + sensitivity_mixerDisplay -> display (temp); + temp = airspy_sensitivity_vga_gains [GAIN_COUNT - 1 - value]; + sensitivity_vgaDisplay -> display (temp); +} + +// + +// Original functions from the airspy extio dll +/* Parameter value shall be between 0 and 15 */ +void airspyHandler::set_lna_gain (int value) { +int result = my_airspy_set_lna_gain (device, lnaGain = value); + + if (result != AIRSPY_SUCCESS) { + printf ("airspy_set_lna_gain () failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); + } + else + lnaDisplay -> display (value); +} + +/* Parameter value shall be between 0 and 15 */ +void airspyHandler::set_mixer_gain (int value) { +int result = my_airspy_set_mixer_gain (device, mixerGain = value); + + if (result != AIRSPY_SUCCESS) { + printf ("airspy_set_mixer_gain() failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); + } + else + mixerDisplay -> display (value); +} + +/* Parameter value shall be between 0 and 15 */ +void airspyHandler::set_vga_gain (int value) { +int result = my_airspy_set_vga_gain (device, vgaGain = value); + + if (result != AIRSPY_SUCCESS) { + printf ("airspy_set_vga_gain () failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); + } + else + vgaDisplay -> display (value); +} +// +// agc's +/* Parameter value: + 0=Disable LNA Automatic Gain Control + 1=Enable LNA Automatic Gain Control +*/ +void airspyHandler::set_lna_agc (void) { + lna_agc = !lna_agc; +int result = my_airspy_set_lna_agc (device, lna_agc ? 1 : 0); + + if (result != AIRSPY_SUCCESS) { + printf ("airspy_set_lna_agc() failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); + } + if (lna_agc) + lnaButton -> setText ("lna agc on"); + else + lnaButton -> setText ("lna agc"); +} + +/* Parameter value: + 0=Disable MIXER Automatic Gain Control + 1=Enable MIXER Automatic Gain Control +*/ +void airspyHandler::set_mixer_agc (void) { + mixer_agc = !mixer_agc; + +int result = my_airspy_set_mixer_agc (device, mixer_agc ? 1 : 0); + + if (result != AIRSPY_SUCCESS) { + printf ("airspy_set_mixer_agc () failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); + } + if (mixer_agc) + mixerButton -> setText ("mixer agc on"); + else + mixerButton -> setText ("mixer agc"); +} + + +/* Parameter value shall be 0=Disable BiasT or 1=Enable BiasT */ +void airspyHandler::set_rf_bias (void) { + rf_bias = !rf_bias; +int result = my_airspy_set_rf_bias (device, rf_bias ? 1 : 0); + + if (result != AIRSPY_SUCCESS) { + printf("airspy_set_rf_bias() failed: %s (%d)\n", + my_airspy_error_name ((airspy_error)result), result); + } +} + + +const char* airspyHandler::board_id_name (void) { +uint8_t bid; + + if (my_airspy_board_id_read (device, &bid) == AIRSPY_SUCCESS) + return my_airspy_board_id_name ((airspy_board_id)bid); + else + return "UNKNOWN"; +} +// +// +bool airspyHandler::load_airspyFunctions (void) { +// +// link the required procedures + my_airspy_init = (pfn_airspy_init) + GETPROCADDRESS (Handle, "airspy_init"); + if (my_airspy_init == NULL) { + fprintf (stderr, "Could not find airspy_init\n"); + return false; + } + + my_airspy_exit = (pfn_airspy_exit) + GETPROCADDRESS (Handle, "airspy_exit"); + if (my_airspy_exit == NULL) { + fprintf (stderr, "Could not find airspy_exit\n"); + return false; + } + + my_airspy_open = (pfn_airspy_open) + GETPROCADDRESS (Handle, "airspy_open"); + if (my_airspy_open == NULL) { + fprintf (stderr, "Could not find airspy_open\n"); + return false; + } + + my_airspy_close = (pfn_airspy_close) + GETPROCADDRESS (Handle, "airspy_close"); + if (my_airspy_close == NULL) { + fprintf (stderr, "Could not find airspy_close\n"); + return false; + } + + my_airspy_get_samplerates = (pfn_airspy_get_samplerates) + GETPROCADDRESS (Handle, "airspy_get_samplerates"); + if (my_airspy_get_samplerates == NULL) { + fprintf (stderr, "Could not find airspy_get_samplerates\n"); + return false; + } + + my_airspy_set_samplerate = (pfn_airspy_set_samplerate) + GETPROCADDRESS (Handle, "airspy_set_samplerate"); + if (my_airspy_set_samplerate == NULL) { + fprintf (stderr, "Could not find airspy_set_samplerate\n"); + return false; + } + + my_airspy_start_rx = (pfn_airspy_start_rx) + GETPROCADDRESS (Handle, "airspy_start_rx"); + if (my_airspy_start_rx == NULL) { + fprintf (stderr, "Could not find airspy_start_rx\n"); + return false; + } + + my_airspy_stop_rx = (pfn_airspy_stop_rx) + GETPROCADDRESS (Handle, "airspy_stop_rx"); + if (my_airspy_stop_rx == NULL) { + fprintf (stderr, "Could not find airspy_stop_rx\n"); + return false; + } + + my_airspy_set_sample_type = (pfn_airspy_set_sample_type) + GETPROCADDRESS (Handle, "airspy_set_sample_type"); + if (my_airspy_set_sample_type == NULL) { + fprintf (stderr, "Could not find airspy_set_sample_type\n"); + return false; + } + + my_airspy_set_freq = (pfn_airspy_set_freq) + GETPROCADDRESS (Handle, "airspy_set_freq"); + if (my_airspy_set_freq == NULL) { + fprintf (stderr, "Could not find airspy_set_freq\n"); + return false; + } + + my_airspy_set_lna_gain = (pfn_airspy_set_lna_gain) + GETPROCADDRESS (Handle, "airspy_set_lna_gain"); + if (my_airspy_set_lna_gain == NULL) { + fprintf (stderr, "Could not find airspy_set_lna_gain\n"); + return false; + } + + my_airspy_set_mixer_gain = (pfn_airspy_set_mixer_gain) + GETPROCADDRESS (Handle, "airspy_set_mixer_gain"); + if (my_airspy_set_mixer_gain == NULL) { + fprintf (stderr, "Could not find airspy_set_mixer_gain\n"); + return false; + } + + my_airspy_set_vga_gain = (pfn_airspy_set_vga_gain) + GETPROCADDRESS (Handle, "airspy_set_vga_gain"); + if (my_airspy_set_vga_gain == NULL) { + fprintf (stderr, "Could not find airspy_set_vga_gain\n"); + return false; + } + + my_airspy_set_linearity_gain = (pfn_airspy_set_linearity_gain) + GETPROCADDRESS (Handle, "airspy_set_linearity_gain"); + if (my_airspy_set_linearity_gain == NULL) { + fprintf (stderr, "Could not find airspy_set_linearity_gain\n"); + fprintf (stderr, "You probably did install an old library\n"); + return false; + } + + my_airspy_set_sensitivity_gain = (pfn_airspy_set_sensitivity_gain) + GETPROCADDRESS (Handle, "airspy_set_sensitivity_gain"); + if (my_airspy_set_sensitivity_gain == NULL) { + fprintf (stderr, "Could not find airspy_set_sensitivity_gain\n"); + fprintf (stderr, "You probably did install an old library\n"); + return false; + } + + my_airspy_set_lna_agc = (pfn_airspy_set_lna_agc) + GETPROCADDRESS (Handle, "airspy_set_lna_agc"); + if (my_airspy_set_lna_agc == NULL) { + fprintf (stderr, "Could not find airspy_set_lna_agc\n"); + return false; + } + + my_airspy_set_mixer_agc = (pfn_airspy_set_mixer_agc) + GETPROCADDRESS (Handle, "airspy_set_mixer_agc"); + if (my_airspy_set_mixer_agc == NULL) { + fprintf (stderr, "Could not find airspy_set_mixer_agc\n"); + return false; + } + + my_airspy_set_rf_bias = (pfn_airspy_set_rf_bias) + GETPROCADDRESS (Handle, "airspy_set_rf_bias"); + if (my_airspy_set_rf_bias == NULL) { + fprintf (stderr, "Could not find airspy_set_rf_bias\n"); + return false; + } + + my_airspy_error_name = (pfn_airspy_error_name) + GETPROCADDRESS (Handle, "airspy_error_name"); + if (my_airspy_error_name == NULL) { + fprintf (stderr, "Could not find airspy_error_name\n"); + return false; + } + + my_airspy_board_id_read = (pfn_airspy_board_id_read) + GETPROCADDRESS (Handle, "airspy_board_id_read"); + if (my_airspy_board_id_read == NULL) { + fprintf (stderr, "Could not find airspy_board_id_read\n"); + return false; + } + + my_airspy_board_id_name = (pfn_airspy_board_id_name) + GETPROCADDRESS (Handle, "airspy_board_id_name"); + if (my_airspy_board_id_name == NULL) { + fprintf (stderr, "Could not find airspy_board_id_name\n"); + return false; + } + + my_airspy_board_partid_serialno_read = + (pfn_airspy_board_partid_serialno_read) + GETPROCADDRESS (Handle, "airspy_board_partid_serialno_read"); + if (my_airspy_board_partid_serialno_read == NULL) { + fprintf (stderr, "Could not find airspy_board_partid_serialno_read\n"); + return false; + } + + return true; +} + +void airspyHandler::show_tab (int t) { + if (t == 0) // sensitivity + set_sensitivity (sensitivitySlider -> value ()); + else + if (t == 1) // linearity + set_linearity (linearitySlider -> value ()); + else { // classic view + set_vga_gain (vgaGain); + set_mixer_gain (mixerGain); + set_lna_gain (lnaGain); + } + currentTab = t; +} + diff --git a/devices/airspy-handler/airspy-handler.h b/devices/airspy-handler/airspy-handler.h new file mode 100644 index 0000000..84aa50a --- /dev/null +++ b/devices/airspy-handler/airspy-handler.h @@ -0,0 +1,172 @@ + +/** + * IW0HDV Extio + * + * Copyright 2015 by Andrea Montefusco IW0HDV + * + * Licensed under GNU General Public License 3.0 or later. + * Some rights reserved. See COPYING, AUTHORS. + * + * @license GPL-3.0+ + * + * recoding and taking parts for the airspyRadio interface + * for the Qt-DAB program + * jan van Katwijk + * Lazy Chair Computing + */ +#ifndef __AIRSPY_HANDLER__ +#define __AIRSPY_HANDLER__ + +#include +#include +#include +#include +#include +#include "dab-constants.h" +#include "ringbuffer.h" +#include "virtual-input.h" +#include "ui_airspy-widget.h" +#ifndef __MINGW32__ +#include "libairspy/airspy.h" +#else +#include "libairspy/airspy.h" +#endif + +class airspyFilter; + +extern "C" { +typedef int (*pfn_airspy_init) (void); +typedef int (*pfn_airspy_exit) (void); +typedef int (*pfn_airspy_open) (struct airspy_device**); +typedef int (*pfn_airspy_close) (struct airspy_device*); +typedef int (*pfn_airspy_get_samplerates) (struct airspy_device* device, + uint32_t* buffer, + const uint32_t len); +typedef int (*pfn_airspy_set_samplerate) (struct airspy_device* device, + uint32_t samplerate); +typedef int (*pfn_airspy_start_rx) (struct airspy_device* device, + airspy_sample_block_cb_fn callback, + void* rx_ctx); +typedef int (*pfn_airspy_stop_rx) (struct airspy_device* device); + +typedef int (*pfn_airspy_set_sample_type) (struct airspy_device *, + airspy_sample_type); +typedef int (*pfn_airspy_set_freq) (struct airspy_device* device, + const uint32_t freq_hz); + +typedef int (*pfn_airspy_set_lna_gain) (struct airspy_device* device, + uint8_t value); + +typedef int (*pfn_airspy_set_mixer_gain) (struct airspy_device* device, + uint8_t value); + +typedef int (*pfn_airspy_set_vga_gain) (struct airspy_device* + device, uint8_t + value); +typedef int (*pfn_airspy_set_lna_agc) (struct airspy_device* device, + uint8_t value); +typedef int (*pfn_airspy_set_mixer_agc) (struct airspy_device* device, + uint8_t value); + +typedef int (*pfn_airspy_set_rf_bias) (struct airspy_device* dev, + uint8_t value); + +typedef const char* (*pfn_airspy_error_name) (enum airspy_error errcode); +typedef int (*pfn_airspy_board_id_read) (struct airspy_device *, + uint8_t *); +typedef const char* (*pfn_airspy_board_id_name) (enum airspy_board_id board_id); +typedef int (*pfn_airspy_board_partid_serialno_read)(struct airspy_device* device, airspy_read_partid_serialno_t* read_partid_serialno); + +typedef int (*pfn_airspy_set_linearity_gain) (struct airspy_device* device, uint8_t value); +typedef int (*pfn_airspy_set_sensitivity_gain)(struct airspy_device* device, uint8_t value); +} + +class airspyHandler: public virtualInput, public Ui_airspyWidget { +Q_OBJECT +public: + airspyHandler (QSettings *); + ~airspyHandler (void); + void setVFOFrequency (int32_t nf); + int32_t getVFOFrequency (void); + int32_t defaultFrequency (void); + bool restartReader (void); + void stopReader (void); + int32_t getSamples (std::complex *v, + int32_t size); + int32_t Samples (void); + void resetBuffer (void); + int16_t bitDepth (void); + int16_t currentTab; +private slots: + void set_linearity (int value); + void set_sensitivity (int value); + void set_lna_gain (int value); + void set_mixer_gain (int value); + void set_vga_gain (int value); + void set_lna_agc (void); + void set_mixer_agc (void); + void set_rf_bias (void); + void show_tab (int); +private: + bool load_airspyFunctions (void); +// The functions to be extracted from the dll/.so file + pfn_airspy_init my_airspy_init; + pfn_airspy_exit my_airspy_exit; + pfn_airspy_error_name my_airspy_error_name; + pfn_airspy_open my_airspy_open; + pfn_airspy_close my_airspy_close; + pfn_airspy_get_samplerates my_airspy_get_samplerates; + pfn_airspy_set_samplerate my_airspy_set_samplerate; + pfn_airspy_start_rx my_airspy_start_rx; + pfn_airspy_stop_rx my_airspy_stop_rx; + pfn_airspy_set_sample_type my_airspy_set_sample_type; + pfn_airspy_set_freq my_airspy_set_freq; + pfn_airspy_set_lna_gain my_airspy_set_lna_gain; + pfn_airspy_set_mixer_gain my_airspy_set_mixer_gain; + pfn_airspy_set_vga_gain my_airspy_set_vga_gain; + pfn_airspy_set_linearity_gain my_airspy_set_linearity_gain; + pfn_airspy_set_sensitivity_gain my_airspy_set_sensitivity_gain; + pfn_airspy_set_lna_agc my_airspy_set_lna_agc; + pfn_airspy_set_mixer_agc my_airspy_set_mixer_agc; + pfn_airspy_set_rf_bias my_airspy_set_rf_bias; + pfn_airspy_board_id_read my_airspy_board_id_read; + pfn_airspy_board_id_name my_airspy_board_id_name; + pfn_airspy_board_partid_serialno_read + my_airspy_board_partid_serialno_read; +// + HINSTANCE Handle_usb; + HINSTANCE Handle; + bool libraryLoaded; + QFrame *myFrame; + bool success; + std::atomic running; + bool lna_agc; + bool mixer_agc; + bool rf_bias; +const char* board_id_name (void); + + int16_t vgaGain; + int16_t mixerGain; + int16_t lnaGain; + int32_t selectedRate; + int16_t convBufferSize; + int16_t convIndex; + std::vector > convBuffer; + int16_t mapTable_int [4 * 512]; + float mapTable_float [4 * 512]; + QSettings *airspySettings; + RingBuffer> *theBuffer; + int32_t inputRate; + airspyFilter *filter; + bool filtering; + struct airspy_device* device; + uint64_t serialNumber; + char serial[128]; +static + int callback(airspy_transfer_t *); + int data_available (void *buf, int buf_size); +const char * getSerial (void); + int open (void); +}; + +#endif diff --git a/devices/airspy-handler/airspy-widget.ui b/devices/airspy-handler/airspy-widget.ui new file mode 100644 index 0000000..4a41ee5 --- /dev/null +++ b/devices/airspy-handler/airspy-widget.ui @@ -0,0 +1,518 @@ + + + airspyWidget + + + + 0 + 0 + 384 + 302 + + + + airspy + + + + + 10 + 90 + 351 + 191 + + + + 0 + + + + sensitivity + + + + + 10 + 20 + 251 + 20 + + + + 21 + + + 10 + + + Qt::Horizontal + + + + + + 220 + 60 + 64 + 23 + + + + QFrame::NoFrame + + + 2 + + + QLCDNumber::Flat + + + + + + 220 + 80 + 64 + 23 + + + + QFrame::NoFrame + + + 2 + + + QLCDNumber::Flat + + + + + + 220 + 100 + 64 + 23 + + + + QFrame::NoFrame + + + 2 + + + QLCDNumber::Flat + + + + + + 100 + 60 + 101 + 20 + + + + lna gain + + + + + + 100 + 80 + 91 + 20 + + + + mixer gain + + + + + + 100 + 100 + 81 + 20 + + + + vga gain + + + + + + 280 + 20 + 41 + 23 + + + + 2 + + + QLCDNumber::Flat + + + + + + linearity + + + + + 10 + 20 + 251 + 20 + + + + 21 + + + 10 + + + Qt::Horizontal + + + + + + 270 + 20 + 51 + 23 + + + + 2 + + + QLCDNumber::Flat + + + + + + 220 + 60 + 64 + 23 + + + + QFrame::NoFrame + + + 2 + + + QLCDNumber::Flat + + + + + + 220 + 80 + 64 + 23 + + + + QFrame::NoFrame + + + 2 + + + QLCDNumber::Flat + + + + + + 220 + 100 + 64 + 23 + + + + QFrame::NoFrame + + + 2 + + + QLCDNumber::Flat + + + + + + 100 + 60 + 91 + 20 + + + + lna gain + + + + + + 100 + 80 + 101 + 20 + + + + mixer gain + + + + + + 100 + 100 + 71 + 20 + + + + vga gain + + + + + + classic view + + + + + 80 + 10 + 201 + 20 + + + + 15 + + + 10 + + + Qt::Horizontal + + + + + + 10 + 10 + 66 + 20 + + + + lna + + + + + + 290 + 10 + 51 + 23 + + + + 2 + + + QLCDNumber::Flat + + + + + + 80 + 40 + 201 + 20 + + + + 15 + + + 10 + + + Qt::Horizontal + + + + + + 290 + 40 + 51 + 23 + + + + 2 + + + QLCDNumber::Flat + + + + + + 10 + 40 + 66 + 20 + + + + mixer + + + + + + 80 + 70 + 201 + 20 + + + + 15 + + + 10 + + + Qt::Horizontal + + + + + + 10 + 70 + 66 + 20 + + + + vga + + + + + + 290 + 70 + 51 + 23 + + + + 2 + + + QLCDNumber::Flat + + + + + + 20 + 110 + 81 + 32 + + + + lna + + + + + + 110 + 110 + 101 + 32 + + + + mixer + + + + + + 220 + 110 + 101 + 32 + + + + bias + + + + + + + + 100 + 60 + 241 + 21 + + + + + + + + + + 50 + 20 + 211 + 20 + + + + A I R S P Y handler + + + + + + diff --git a/devices/airspy-handler/airspy-widget.ui-new b/devices/airspy-handler/airspy-widget.ui-new new file mode 100644 index 0000000..46beb6f --- /dev/null +++ b/devices/airspy-handler/airspy-widget.ui-new @@ -0,0 +1,221 @@ + + + airspyWidget + + + + 0 + 0 + 423 + 212 + + + + Form + + + + + 10 + 0 + 411 + 201 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 10 + 170 + 101 + 21 + + + + airspy + + + + + + 90 + 10 + 251 + 20 + + + + 21 + + + 10 + + + Qt::Horizontal + + + + + + 10 + 10 + 71 + 21 + + + + linearity + + + + + + 90 + 40 + 251 + 20 + + + + 21 + + + 10 + + + Qt::Horizontal + + + + + + 10 + 40 + 71 + 21 + + + + sensitivity + + + + + + 270 + 130 + 121 + 31 + + + + lna-agc + + + + + + 270 + 100 + 121 + 31 + + + + mixer-agc + + + + + + 20 + 150 + 241 + 21 + + + + + + + + + + 270 + 160 + 121 + 31 + + + + bias + + + + + + 340 + 10 + 64 + 23 + + + + QFrame::NoFrame + + + 2 + + + QLCDNumber::Flat + + + + + + 340 + 40 + 64 + 23 + + + + QFrame::NoFrame + + + 2 + + + QLCDNumber::Flat + + + + + + 340 + 70 + 64 + 23 + + + + QFrame::NoFrame + + + 2 + + + QLCDNumber::Flat + + + + + + + diff --git a/devices/airspy-handler/airspyfilter.cpp b/devices/airspy-handler/airspyfilter.cpp new file mode 100644 index 0000000..28e87e5 --- /dev/null +++ b/devices/airspy-handler/airspyfilter.cpp @@ -0,0 +1,89 @@ +# +/* + * Copyright (C) 2008, 2009, 2010 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of qt-dab + * + * qt-dab 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 2 of the License. + * + * qt-dab 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with qt-dab; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "airspyfilter.h" +#include +#ifndef M_PI +# define M_PI 3.14159265358979323846 /* pi */ +#endif + + airspyFilter::airspyFilter (int16_t firSize, + int32_t cutoffFreq, + int32_t sampleRate) { +float tmp [firSize]; +float lo = (float)(cutoffFreq) / sampleRate; +float sum = 0.0; +int16_t i; + + this -> buffer_re = new float [firSize]; + this -> buffer_im = new float [firSize]; + this -> kernel = new float [firSize]; + this -> firSize = firSize; + ip = 0; +// +// create a low pass filter for lo; + for (i = 0; i < firSize; i ++) { + if (i == firSize / 2) + tmp [i] = 2 * M_PI * lo; + else + tmp [i] = sin (2 * M_PI * lo * (i - firSize /2)) / (i - firSize/2); +// +// windowing with Blackman + tmp [i] *= (0.42 - + 0.5 * cos (2 * M_PI * (float)i / (float)firSize) + + 0.08 * cos (4 * M_PI * (float)i / (float)firSize)); + + sum += tmp [i]; + } +// +// and the kernel + for (i = 0; i < firSize; i ++) + kernel [i] = tmp [i] / sum; +} + + airspyFilter::~airspyFilter (void) { + delete [] kernel; + delete [] buffer_re; + delete [] buffer_im; +} + +// we process the samples backwards rather than reversing +// the kernel +std::complex airspyFilter::Pass (float re, float im) { +int16_t i; +float tmp_1 = 0; +float tmp_2 = 0; + + buffer_re [ip] = re; + buffer_im [ip] = im; + for (i = 0; i < firSize; i ++) { + int16_t index = ip - i; + if (index < 0) + index += firSize; + tmp_1 += buffer_re [index] * kernel [i]; + tmp_2 += buffer_im [index] * kernel [i]; + } + + ip = (ip + 1) % firSize; + return std::complex (tmp_1, tmp_2);; +} + diff --git a/devices/airspy-handler/airspyfilter.h b/devices/airspy-handler/airspyfilter.h new file mode 100644 index 0000000..98ccea8 --- /dev/null +++ b/devices/airspy-handler/airspyfilter.h @@ -0,0 +1,44 @@ +# +/* + * Copyright (C) 2010, 2011, 2012 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of qt-dab + * + * qt-dab 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; either version 2 of the License, or + * (at your option) any later version. + * + * qt-dab 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with qt-dab; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __AIRSPY_FILTER__ +#define __AIRSPY_FILTER__ + +#include +#include +#include + +class airspyFilter { +public: + airspyFilter (int16_t, int32_t, int32_t); + ~airspyFilter (void); + std::complex Pass (float re, float im); + int16_t firSize; + float *kernel; + float *buffer_re; + float *buffer_im; + int16_t ip; + int32_t sampleRate; +}; + +#endif diff --git a/devices/airspy-handler/libairspy/airspy.h b/devices/airspy-handler/libairspy/airspy.h new file mode 100644 index 0000000..630424d --- /dev/null +++ b/devices/airspy-handler/libairspy/airspy.h @@ -0,0 +1,219 @@ +/* +Copyright (c) 2012, Jared Boone +Copyright (c) 2013, Michael Ossmann +Copyright (c) 2013-2016, Benjamin Vernoux +Copyright (C) 2013-2016, Youssef Touil + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + Neither the name of AirSpy nor the names of its contributors may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef __AIRSPY_H__ +#define __AIRSPY_H__ + +#include +#include "airspy_commands.h" + +#define AIRSPY_VERSION "1.0.9" +#define AIRSPY_VER_MAJOR 1 +#define AIRSPY_VER_MINOR 0 +#define AIRSPY_VER_REVISION 9 + +#ifdef _WIN32 + #define ADD_EXPORTS + + /* You should define ADD_EXPORTS *only* when building the DLL. */ + #ifdef ADD_EXPORTS + #define ADDAPI __declspec(dllexport) + #else + #define ADDAPI __declspec(dllimport) + #endif + + /* Define calling convention in one place, for convenience. */ + #define ADDCALL __cdecl + +#else /* _WIN32 not defined. */ + + /* Define with no value on non-Windows OSes. */ + #define ADDAPI + #define ADDCALL + +#endif + +#ifdef __cplusplus +extern "C" +{ +#endif + +enum airspy_error +{ + AIRSPY_SUCCESS = 0, + AIRSPY_TRUE = 1, + AIRSPY_ERROR_INVALID_PARAM = -2, + AIRSPY_ERROR_NOT_FOUND = -5, + AIRSPY_ERROR_BUSY = -6, + AIRSPY_ERROR_NO_MEM = -11, + AIRSPY_ERROR_LIBUSB = -1000, + AIRSPY_ERROR_THREAD = -1001, + AIRSPY_ERROR_STREAMING_THREAD_ERR = -1002, + AIRSPY_ERROR_STREAMING_STOPPED = -1003, + AIRSPY_ERROR_OTHER = -9999, +}; + +enum airspy_board_id +{ + AIRSPY_BOARD_ID_PROTO_AIRSPY = 0, + AIRSPY_BOARD_ID_INVALID = 0xFF, +}; + +enum airspy_sample_type +{ + AIRSPY_SAMPLE_FLOAT32_IQ = 0, /* 2 * 32bit float per sample */ + AIRSPY_SAMPLE_FLOAT32_REAL = 1, /* 1 * 32bit float per sample */ + AIRSPY_SAMPLE_INT16_IQ = 2, /* 2 * 16bit int per sample */ + AIRSPY_SAMPLE_INT16_REAL = 3, /* 1 * 16bit int per sample */ + AIRSPY_SAMPLE_UINT16_REAL = 4, /* 1 * 16bit unsigned int per sample */ + AIRSPY_SAMPLE_RAW = 5, /* Raw packed samples from the device */ + AIRSPY_SAMPLE_END = 6 /* Number of supported sample types */ +}; + +#define MAX_CONFIG_PAGE_SIZE (0x10000) + +struct airspy_device; + +typedef struct { + struct airspy_device* device; + void* ctx; + void* samples; + int sample_count; + uint64_t dropped_samples; + enum airspy_sample_type sample_type; +} airspy_transfer_t, airspy_transfer; + +typedef struct { + uint32_t part_id[2]; + uint32_t serial_no[4]; +} airspy_read_partid_serialno_t; + +typedef struct { + uint32_t major_version; + uint32_t minor_version; + uint32_t revision; +} airspy_lib_version_t; + +typedef int (*airspy_sample_block_cb_fn)(airspy_transfer* transfer); + +extern ADDAPI void ADDCALL airspy_lib_version(airspy_lib_version_t* lib_version); +/* airspy_init() deprecated */ +extern ADDAPI int ADDCALL airspy_init(void); +/* airspy_exit() deprecated */ +extern ADDAPI int ADDCALL airspy_exit(void); + +extern ADDAPI int ADDCALL airspy_open_sn(struct airspy_device** device, uint64_t serial_number); +extern ADDAPI int ADDCALL airspy_open(struct airspy_device** device); +extern ADDAPI int ADDCALL airspy_close(struct airspy_device* device); + +extern ADDAPI int ADDCALL airspy_get_samplerates(struct airspy_device* device, uint32_t* buffer, const uint32_t len); + +/* Parameter samplerate can be either the index of a samplerate or directly its value in Hz within the list returned by airspy_get_samplerates() */ +extern ADDAPI int ADDCALL airspy_set_samplerate(struct airspy_device* device, uint32_t samplerate); + +extern ADDAPI int ADDCALL airspy_set_conversion_filter_float32(struct airspy_device* device, const float *kernel, const uint32_t len); +extern ADDAPI int ADDCALL airspy_set_conversion_filter_int16(struct airspy_device* device, const int16_t *kernel, const uint32_t len); + +extern ADDAPI int ADDCALL airspy_start_rx(struct airspy_device* device, airspy_sample_block_cb_fn callback, void* rx_ctx); +extern ADDAPI int ADDCALL airspy_stop_rx(struct airspy_device* device); + +/* return AIRSPY_TRUE if success */ +extern ADDAPI int ADDCALL airspy_is_streaming(struct airspy_device* device); + +extern ADDAPI int ADDCALL airspy_si5351c_write(struct airspy_device* device, uint8_t register_number, uint8_t value); +extern ADDAPI int ADDCALL airspy_si5351c_read(struct airspy_device* device, uint8_t register_number, uint8_t* value); + +extern ADDAPI int ADDCALL airspy_config_write(struct airspy_device* device, const uint8_t page_index, const uint16_t length, unsigned char *data); +extern ADDAPI int ADDCALL airspy_config_read(struct airspy_device* device, const uint8_t page_index, const uint16_t length, unsigned char *data); + +extern ADDAPI int ADDCALL airspy_r820t_write(struct airspy_device* device, uint8_t register_number, uint8_t value); +extern ADDAPI int ADDCALL airspy_r820t_read(struct airspy_device* device, uint8_t register_number, uint8_t* value); + +/* Parameter value shall be 0=clear GPIO or 1=set GPIO */ +extern ADDAPI int ADDCALL airspy_gpio_write(struct airspy_device* device, airspy_gpio_port_t port, airspy_gpio_pin_t pin, uint8_t value); +/* Parameter value corresponds to GPIO state 0 or 1 */ +extern ADDAPI int ADDCALL airspy_gpio_read(struct airspy_device* device, airspy_gpio_port_t port, airspy_gpio_pin_t pin, uint8_t* value); + +/* Parameter value shall be 0=GPIO Input direction or 1=GPIO Output direction */ +extern ADDAPI int ADDCALL airspy_gpiodir_write(struct airspy_device* device, airspy_gpio_port_t port, airspy_gpio_pin_t pin, uint8_t value); +extern ADDAPI int ADDCALL airspy_gpiodir_read(struct airspy_device* device, airspy_gpio_port_t port, airspy_gpio_pin_t pin, uint8_t* value); + +extern ADDAPI int ADDCALL airspy_spiflash_erase(struct airspy_device* device); +extern ADDAPI int ADDCALL airspy_spiflash_write(struct airspy_device* device, const uint32_t address, const uint16_t length, unsigned char* const data); +extern ADDAPI int ADDCALL airspy_spiflash_read(struct airspy_device* device, const uint32_t address, const uint16_t length, unsigned char* data); + +extern ADDAPI int ADDCALL airspy_board_id_read(struct airspy_device* device, uint8_t* value); +/* Parameter length shall be at least 128bytes */ +extern ADDAPI int ADDCALL airspy_version_string_read(struct airspy_device* device, char* version, uint8_t length); + +extern ADDAPI int ADDCALL airspy_board_partid_serialno_read(struct airspy_device* device, airspy_read_partid_serialno_t* read_partid_serialno); + +extern ADDAPI int ADDCALL airspy_set_sample_type(struct airspy_device* device, enum airspy_sample_type sample_type); + +/* Parameter freq_hz shall be between 24000000(24MHz) and 1750000000(1.75GHz) */ +extern ADDAPI int ADDCALL airspy_set_freq(struct airspy_device* device, const uint32_t freq_hz); + +/* Parameter value shall be between 0 and 15 */ +extern ADDAPI int ADDCALL airspy_set_lna_gain(struct airspy_device* device, uint8_t value); + +/* Parameter value shall be between 0 and 15 */ +extern ADDAPI int ADDCALL airspy_set_mixer_gain(struct airspy_device* device, uint8_t value); + +/* Parameter value shall be between 0 and 15 */ +extern ADDAPI int ADDCALL airspy_set_vga_gain(struct airspy_device* device, uint8_t value); + +/* Parameter value: + 0=Disable LNA Automatic Gain Control + 1=Enable LNA Automatic Gain Control +*/ +extern ADDAPI int ADDCALL airspy_set_lna_agc(struct airspy_device* device, uint8_t value); +/* Parameter value: + 0=Disable MIXER Automatic Gain Control + 1=Enable MIXER Automatic Gain Control +*/ +extern ADDAPI int ADDCALL airspy_set_mixer_agc(struct airspy_device* device, uint8_t value); + +/* Parameter value: 0..21 */ +extern ADDAPI int ADDCALL airspy_set_linearity_gain(struct airspy_device* device, uint8_t value); + +/* Parameter value: 0..21 */ +extern ADDAPI int ADDCALL airspy_set_sensitivity_gain(struct airspy_device* device, uint8_t value); + +/* Parameter value shall be 0=Disable BiasT or 1=Enable BiasT */ +extern ADDAPI int ADDCALL airspy_set_rf_bias(struct airspy_device* dev, uint8_t value); + +/* Parameter value shall be 0=Disable Packing or 1=Enable Packing */ +extern ADDAPI int ADDCALL airspy_set_packing(struct airspy_device* device, uint8_t value); + +extern ADDAPI const char* ADDCALL airspy_error_name(enum airspy_error errcode); +extern ADDAPI const char* ADDCALL airspy_board_id_name(enum airspy_board_id board_id); + +/* Parameter sector_num shall be between 2 & 13 (sector 0 & 1 are reserved) */ +extern ADDAPI int ADDCALL airspy_spiflash_erase_sector(struct airspy_device* device, const uint16_t sector_num); + +#ifdef __cplusplus +} // __cplusplus defined. +#endif + +#endif//__AIRSPY_H__ diff --git a/devices/airspy-handler/libairspy/airspy_commands.h b/devices/airspy-handler/libairspy/airspy_commands.h new file mode 100644 index 0000000..21194f8 --- /dev/null +++ b/devices/airspy-handler/libairspy/airspy_commands.h @@ -0,0 +1,145 @@ +/* +Copyright (c) 2013-2016, Benjamin Vernoux + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + Neither the name of AirSpy nor the names of its contributors may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef __AIRSPY_COMMANDS_H__ +#define __AIRSPY_COMMANDS_H__ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef enum +{ + RECEIVER_MODE_OFF = 0, + RECEIVER_MODE_RX = 1 +} receiver_mode_t; + +/* + Note: airspy_samplerate_t is now obsolete and left for backward compatibility. + The list of supported sample rates should be retrieved at run time by calling airspy_get_samplerates(). + Refer to the Airspy Tools for illustrations. +*/ +typedef enum +{ + AIRSPY_SAMPLERATE_10MSPS = 0, /* 12bits 10MHz IQ */ + AIRSPY_SAMPLERATE_2_5MSPS = 1, /* 12bits 2.5MHz IQ */ + AIRSPY_SAMPLERATE_END = 2 /* End index for sample rate (corresponds to number of samplerate) */ +} airspy_samplerate_t; + + +#define AIRSPY_CONF_CMD_SHIFT_BIT (3) // Up to 3bits=8 samplerates (airspy_samplerate_t enum shall not exceed 7) + +// Commands (usb vendor request) shared between Firmware and Host. +#define AIRSPY_CMD_MAX (27) +typedef enum +{ + AIRSPY_INVALID = 0 , + AIRSPY_RECEIVER_MODE = 1 , + AIRSPY_SI5351C_WRITE = 2 , + AIRSPY_SI5351C_READ = 3 , + AIRSPY_R820T_WRITE = 4 , + AIRSPY_R820T_READ = 5 , + AIRSPY_SPIFLASH_ERASE = 6 , + AIRSPY_SPIFLASH_WRITE = 7 , + AIRSPY_SPIFLASH_READ = 8 , + AIRSPY_BOARD_ID_READ = 9 , + AIRSPY_VERSION_STRING_READ = 10, + AIRSPY_BOARD_PARTID_SERIALNO_READ = 11, + AIRSPY_SET_SAMPLERATE = 12, + AIRSPY_SET_FREQ = 13, + AIRSPY_SET_LNA_GAIN = 14, + AIRSPY_SET_MIXER_GAIN = 15, + AIRSPY_SET_VGA_GAIN = 16, + AIRSPY_SET_LNA_AGC = 17, + AIRSPY_SET_MIXER_AGC = 18, + AIRSPY_MS_VENDOR_CMD = 19, + AIRSPY_SET_RF_BIAS_CMD = 20, + AIRSPY_GPIO_WRITE = 21, + AIRSPY_GPIO_READ = 22, + AIRSPY_GPIODIR_WRITE = 23, + AIRSPY_GPIODIR_READ = 24, + AIRSPY_GET_SAMPLERATES = 25, + AIRSPY_SET_PACKING = 26, + AIRSPY_SPIFLASH_ERASE_SECTOR = AIRSPY_CMD_MAX +} airspy_vendor_request; + +typedef enum +{ + CONFIG_CALIBRATION = 0, + //CONFIG_META = 1, +} airspy_common_config_pages_t; + +typedef enum +{ + GPIO_PORT0 = 0, + GPIO_PORT1 = 1, + GPIO_PORT2 = 2, + GPIO_PORT3 = 3, + GPIO_PORT4 = 4, + GPIO_PORT5 = 5, + GPIO_PORT6 = 6, + GPIO_PORT7 = 7 +} airspy_gpio_port_t; + +typedef enum +{ + GPIO_PIN0 = 0, + GPIO_PIN1 = 1, + GPIO_PIN2 = 2, + GPIO_PIN3 = 3, + GPIO_PIN4 = 4, + GPIO_PIN5 = 5, + GPIO_PIN6 = 6, + GPIO_PIN7 = 7, + GPIO_PIN8 = 8, + GPIO_PIN9 = 9, + GPIO_PIN10 = 10, + GPIO_PIN11 = 11, + GPIO_PIN12 = 12, + GPIO_PIN13 = 13, + GPIO_PIN14 = 14, + GPIO_PIN15 = 15, + GPIO_PIN16 = 16, + GPIO_PIN17 = 17, + GPIO_PIN18 = 18, + GPIO_PIN19 = 19, + GPIO_PIN20 = 20, + GPIO_PIN21 = 21, + GPIO_PIN22 = 22, + GPIO_PIN23 = 23, + GPIO_PIN24 = 24, + GPIO_PIN25 = 25, + GPIO_PIN26 = 26, + GPIO_PIN27 = 27, + GPIO_PIN28 = 28, + GPIO_PIN29 = 29, + GPIO_PIN30 = 30, + GPIO_PIN31 = 31 +} airspy_gpio_pin_t; + +#ifdef __cplusplus +} // __cplusplus defined. +#endif + +#endif//__AIRSPY_COMMANDS_H__ diff --git a/devices/airspy-handler/libairspy/filters.h b/devices/airspy-handler/libairspy/filters.h new file mode 100644 index 0000000..30da6e4 --- /dev/null +++ b/devices/airspy-handler/libairspy/filters.h @@ -0,0 +1,134 @@ +/* +Copyright (C) 2014, Youssef Touil + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +#ifndef FILTERS_H +#define FILTERS_H + +#include + +#define HB_KERNEL_FLOAT_LEN 47 + +const float HB_KERNEL_FLOAT[HB_KERNEL_FLOAT_LEN] = +{ + -0.000998606272947510, + 0.000000000000000000, + 0.001695637278417295, + 0.000000000000000000, + -0.003054430179754289, + 0.000000000000000000, + 0.005055504379767936, + 0.000000000000000000, + -0.007901319195893647, + 0.000000000000000000, + 0.011873357051047719, + 0.000000000000000000, + -0.017411159379930066, + 0.000000000000000000, + 0.025304817427568772, + 0.000000000000000000, + -0.037225225204559217, + 0.000000000000000000, + 0.057533286997004301, + 0.000000000000000000, + -0.102327462004259350, + 0.000000000000000000, + 0.317034472508947400, + 0.500000000000000000, + 0.317034472508947400, + 0.000000000000000000, + -0.102327462004259350, + 0.000000000000000000, + 0.057533286997004301, + 0.000000000000000000, + -0.037225225204559217, + 0.000000000000000000, + 0.025304817427568772, + 0.000000000000000000, + -0.017411159379930066, + 0.000000000000000000, + 0.011873357051047719, + 0.000000000000000000, + -0.007901319195893647, + 0.000000000000000000, + 0.005055504379767936, + 0.000000000000000000, + -0.003054430179754289, + 0.000000000000000000, + 0.001695637278417295, + 0.000000000000000000, + -0.000998606272947510 +}; + +#define HB_KERNEL_INT16_LEN 47 + +const int16_t HB_KERNEL_INT16[HB_KERNEL_INT16_LEN] = +{ + -33, + 0, + 56, + 0, + -100, + 0, + 166, + 0, + -259, + 0, + 389, + 0, + -571, + 0, + 829, + 0, + -1220, + 0, + 1885, + 0, + -3353, + 0, + 10389, + 16384, + 10389, + 0, + -3353, + 0, + 1885, + 0, + -1220, + 0, + 829, + 0, + -571, + 0, + 389, + 0, + -259, + 0, + 166, + 0, + -100, + 0, + 56, + 0, + -33 +}; + +#endif // FILTERS_H diff --git a/devices/airspy-handler/libairspy/iqconverter_float.h b/devices/airspy-handler/libairspy/iqconverter_float.h new file mode 100644 index 0000000..f82b8b3 --- /dev/null +++ b/devices/airspy-handler/libairspy/iqconverter_float.h @@ -0,0 +1,47 @@ +/* +Copyright (C) 2014, Youssef Touil + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +#ifndef IQCONVERTER_FLOAT_H +#define IQCONVERTER_FLOAT_H + +#include + +#define IQCONVERTER_NZEROS 2 +#define IQCONVERTER_NPOLES 2 + +typedef struct { + float avg; + float hbc; + int len; + int fir_index; + int delay_index; + float *fir_kernel; + float *fir_queue; + float *delay_line; +} iqconverter_float_t; + +iqconverter_float_t *iqconverter_float_create(const float *hb_kernel, int len); +void iqconverter_float_free(iqconverter_float_t *cnv); +void iqconverter_float_reset(iqconverter_float_t *cnv); +void iqconverter_float_process(iqconverter_float_t *cnv, float *samples, int len); + +#endif // IQCONVERTER_FLOAT_H diff --git a/devices/airspy-handler/libairspy/iqconverter_int16.h b/devices/airspy-handler/libairspy/iqconverter_int16.h new file mode 100644 index 0000000..10c867d --- /dev/null +++ b/devices/airspy-handler/libairspy/iqconverter_int16.h @@ -0,0 +1,45 @@ +/* +Copyright (C) 2014, Youssef Touil + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +#ifndef IQCONVERTER_INT16_H +#define IQCONVERTER_INT16_H + +#include + +typedef struct { + int len; + int fir_index; + int delay_index; + int16_t old_x; + int16_t old_y; + int32_t old_e; + int32_t *fir_kernel; + int32_t *fir_queue; + int16_t *delay_line; +} iqconverter_int16_t; + +iqconverter_int16_t *iqconverter_int16_create(const int16_t *hb_kernel, int len); +void iqconverter_int16_free(iqconverter_int16_t *cnv); +void iqconverter_int16_reset(iqconverter_int16_t *cnv); +void iqconverter_int16_process(iqconverter_int16_t *cnv, int16_t *samples, int len); + +#endif // IQCONVERTER_INT16_H diff --git a/devices/elad-s1-handler.tgz b/devices/elad-s1-handler.tgz new file mode 100644 index 0000000..2ad4b8c Binary files /dev/null and b/devices/elad-s1-handler.tgz differ diff --git a/devices/elad-s1-handler/CMakeLists.txt b/devices/elad-s1-handler/CMakeLists.txt new file mode 100644 index 0000000..ab1b1c0 --- /dev/null +++ b/devices/elad-s1-handler/CMakeLists.txt @@ -0,0 +1,83 @@ +cmake_minimum_required( VERSION 2.6 ) +#set ( CMAKE_BUILD_TYPE Release ) +set (objectName device_elad-s1) +ADD_DEFINITIONS (-DQT_SHARED) +ADD_DEFINITIONS (-DQT_NO_DEBUG) +set (CMAKE_INSTALL_PREFIX ../../../../../../../) +add_definitions ( -Wall ) + + find_package (Qt5Widgets REQUIRED) + find_package (Qt5Declarative REQUIRED) + + find_library (DYNAMIC_LOAD dl) + if(NOT(DYNAMIC_LOAD)) + message(FATAL_ERROR "please install -ldl") + else(NOT(DYNAMIC_LOAD)) + set(extraLibs ${DYNAMIC_LOAD}) + endif(NOT(DYNAMIC_LOAD)) +# + find_library (PTHREADS pthread) + if(NOT(PTHREADS)) + message (FATAL_ERROR "please install libpthread") + else(NOT(PTHREADS)) + set (extraLibs ${extraLibs} ${PTHREADS}) + endif(NOT(PTHREADS)) + + set (${objectName}_UIS ./widget.ui) + + include_directories ( + ${CMAKE_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${QT5Widgets_INCLUDES} + ${QT_QTCORE_INCLUDE_DIR} + ${QT_QTGUI_INCLUDE_DIR} + . + ../ + ../.. + ../../radio-utils + ../../../includes + ../../../includes/filters + ../../../includes/various + ../../../includes/output + ) + + set ( ${objectName}_HDRS + ../rig-interface.h + ./elad-s1.h + ./elad-worker.h + ./elad-loader.h + ../../../includes/swradio-constants.h + ../../../includes/filters/fir-filters.h + ../../../includes/various/ringbuffer.h + ) + + set ( ${objectName}_SRCS + ./elad-s1.cpp + ./elad-worker.cpp + ./elad-loader.cpp + ../../../src/filters/fir-filters.cpp + ../../../src/filters/iir-filters.cpp + ../../../src/various/sincos.cpp + ../../../src/various/utilities.cpp + ) + + set (${objectName}_UIS ./widget.ui) + QT5_WRAP_UI(UIS ${${objectName}_UIS}) + + set ( ${objectName}_MOCS + ../rig-interface.h + ./elad-s1.h + ) + + add_library (${objectName} + SHARED ${${objectName}_SRCS} + ${UIS} ${RSCS} ${TRS} ${MOCS} + ) + + target_link_libraries (${objectName} + Qt5::Widgets + ${extraLibs} + ${SAMPLERATE_LIBRARIES} + ) + + INSTALL(TARGETS ${objectName} LIBRARY DESTINATION ./linux-bin/input-plugins-sw) diff --git a/devices/elad-s1-handler/elad-filter.cpp b/devices/elad-s1-handler/elad-filter.cpp new file mode 100644 index 0000000..ff06671 --- /dev/null +++ b/devices/elad-s1-handler/elad-filter.cpp @@ -0,0 +1,89 @@ +# +/* + * Copyright (C) 2008, 2009, 2010 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of qt-dab + * + * qt-dab 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 2 of the License. + * + * qt-dab 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with qt-dab; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "elad-filter.h" +#include +#ifndef M_PI +# define M_PI 3.14159265358979323846 /* pi */ +#endif + + eladFilter::eladFilter (int16_t firSize, + int32_t cutoffFreq, + int32_t sampleRate) { +float tmp [firSize]; +float lo = (float)(cutoffFreq) / sampleRate; +float sum = 0.0; +int16_t i; + + this -> buffer_re = new float [firSize]; + this -> buffer_im = new float [firSize]; + this -> kernel = new float [firSize]; + this -> firSize = firSize; + ip = 0; +// +// create a low pass filter for lo; + for (i = 0; i < firSize; i ++) { + if (i == firSize / 2) + tmp [i] = 2 * M_PI * lo; + else + tmp [i] = sin (2 * M_PI * lo * (i - firSize /2)) / (i - firSize/2); +// +// windowing with Blackman + tmp [i] *= (0.42 - + 0.5 * cos (2 * M_PI * (float)i / (float)firSize) + + 0.08 * cos (4 * M_PI * (float)i / (float)firSize)); + + sum += tmp [i]; + } +// +// and the kernel + for (i = 0; i < firSize; i ++) + kernel [i] = tmp [i] / sum; +} + + eladFilter::~eladFilter (void) { + delete [] kernel; + delete [] buffer_re; + delete [] buffer_im; +} + +// we process the samples backwards rather than reversing +// the kernel +std::complex eladFilter::Pass (std::complex val) { +int16_t i; +float tmp_1 = 0; +float tmp_2 = 0; + + buffer_re [ip] = real (val); + buffer_im [ip] = imag (val); + for (i = 0; i < firSize; i ++) { + int16_t index = ip - i; + if (index < 0) + index += firSize; + tmp_1 += buffer_re [index] * kernel [i]; + tmp_2 += buffer_im [index] * kernel [i]; + } + + ip = (ip + 1) % firSize; + return std::complex (tmp_1, tmp_2);; +} + diff --git a/devices/elad-s1-handler/elad-filter.h b/devices/elad-s1-handler/elad-filter.h new file mode 100644 index 0000000..bad54d1 --- /dev/null +++ b/devices/elad-s1-handler/elad-filter.h @@ -0,0 +1,45 @@ +# +/* + * Copyright (C) 2010, 2011, 2012 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of qt-dab + * + * qt-dab 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; either version 2 of the License, or + * (at your option) any later version. + * + * qt-dab 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with qt-dab; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __ELAD_FILTER__ +#define __ELAD_FILTER__ + +#include +#include +#include + +class eladFilter { +public: + eladFilter (int16_t, int32_t, int32_t); + ~eladFilter (void); + std::complex Pass (std::complex); +private: + int16_t firSize; + float *kernel; + float *buffer_re; + float *buffer_im; + int16_t ip; + int32_t sampleRate; +}; + +#endif diff --git a/devices/elad-s1-handler/elad-handler.cpp b/devices/elad-s1-handler/elad-handler.cpp new file mode 100644 index 0000000..8644a71 --- /dev/null +++ b/devices/elad-s1-handler/elad-handler.cpp @@ -0,0 +1,219 @@ +# +/* + * Copyright (C) 2014 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include + +#include "elad-handler.h" // our header +#include "elad-worker.h" // the thread, reading in the data +#include "elad-loader.h" // function loader +#include + +#define RATE 3072000 +// Currently, we do not have lots of settings, +// it just might change suddenly, but not today + eladHandler::eladHandler (QSettings *s) { +int16_t success; + + this -> eladSettings = s; + this -> myFrame = new QFrame (NULL); + setupUi (myFrame); + myFrame -> show (); + _I_Buffer = NULL; + theLoader = NULL; + theWorker = NULL; + vfoOffset = + eladSettings -> value ("elad-offset", 0). toInt (); + +// +// sometimes problems with dynamic linkage of libusb, it is +// loaded indirectly through the dll + if (libusb_init (NULL) < 0) { + fprintf (stderr, "libusb problem\n"); // should not happen + throw (21); + } + + libusb_exit (NULL); + theLoader = new eladLoader (RATE, &success); + if (success != 0) { + if (success == -1) + QMessageBox::warning (myFrame, tr ("sdr"), + tr ("No success in loading libs\n")); + else + if (success == -2) + QMessageBox::warning (myFrame, tr ("sdr"), + tr ("No success in setting up USB\n")); + else + if (success == -3) + QMessageBox::warning (myFrame, tr ("sdr"), + tr ("No success in FPGA init\n")); + else + if (success == -4) + QMessageBox::warning (myFrame, tr ("sdr"), + tr ("No success in hardware init\n")); + + statusLabel -> setText ("not functioning"); + delete theLoader; + theLoader = NULL; + delete myFrame; + throw (21); + } +// +// Note (10.10.2014: +// It turns out that the elad provides for 32 bit samples +// packed as bytes + statusLabel -> setText ("Loaded"); +// +// buffersize app 0.5 seconds of data + _I_Buffer = new RingBuffer>(32 * 32768); + vfoFrequency = Khz (220000); +// +// since localFilter and gainReduced are also used as +// parameter for the API functions, they are int's rather +// than bool. + localFilter = 0; + filterText -> setText ("no filter"); + gainReduced = 0; + gainLabel -> setText ("0"); + connect (hzOffset, SIGNAL (valueChanged (int)), + this, SLOT (setOffset (int))); + connect (gainReduction, SIGNAL (clicked (void)), + this, SLOT (setGainReduction (void))); + connect (filter, SIGNAL (clicked (void)), + this, SLOT (setFilter (void))); +} +// + eladHandler::~eladHandler (void) { + eladSettings -> setValue ("elad-offset", vfoOffset); + stopReader (); + if (_I_Buffer != NULL) + delete _I_Buffer; + if (theLoader != NULL) + delete theLoader; + if (theWorker != NULL) + delete theWorker; +} + +int32_t eladHandler::defaultFrequency (void) { + return Khz (220000); +} + +void eladHandler::setVFOFrequency (int32_t newFrequency) { +int32_t realFreq = newFrequency - vfoOffset; + + if (theWorker == NULL) { + vfoFrequency = newFrequency - vfoOffset; + return; + } + + theWorker -> setVFOFrequency (realFreq); + vfoFrequency = theWorker -> getVFOFrequency (); +} + +int32_t eladHandler::getVFOFrequency (void) { + return vfoFrequency + vfoOffset; +} + +bool eladHandler::restartReader (void) { +bool success; + + if (theWorker != NULL) + return true; + + _I_Buffer -> FlushRingBuffer (); + theWorker = new eladWorker (vfoFrequency, + theLoader, + this, + _I_Buffer, + &success); + fprintf (stderr, "worker started, success = %d\n", success); + return success; +} + +void eladHandler::stopReader (void) { + if (theWorker == NULL) + return; + + theWorker -> stop (); + while (theWorker -> isRunning ()) + usleep (100); + delete theWorker; + theWorker = NULL; +} + +// we are - in this context - certain that whenever getSamples +// is called, there are sufficient samples available. +int32_t eladHandler::getSamples (std::complex *V, int32_t size) { + return _I_Buffer -> getDataFromBuffer (V, size); +} + +int32_t eladHandler::Samples (void) { + return _I_Buffer -> GetRingBufferReadAvailable () / 2; +} + +void eladHandler::resetBuffer (void) { + _I_Buffer -> FlushRingBuffer (); +} + +// +// Although we are getting 30-more bits in, the adc in the +// elad gives us 14 bits. That + 20 db gain results in app 105 db +// plus a marge it is app 120 a 130 db, so the bit depth for the scope +// is 21 +int16_t eladHandler::bitDepth (void) { + return 21; +} + +// +void eladHandler::setOffset (int k) { + vfoOffset = k; +} + +void eladHandler::setGainReduction (void) { + gainReduced = gainReduced == 1 ? 0 : 1; + theLoader -> set_en_ext_io_ATT20 (theLoader -> getHandle (), + &gainReduced); + gainLabel -> setText (gainReduced == 1 ? "-20" : "0"); +} + +void eladHandler::setFilter (void) { + localFilter = localFilter == 1 ? 0 : 1; + theLoader -> set_en_ext_io_LP30 (theLoader -> getHandle (), + &localFilter); + filterText -> setText (localFilter == 1 ? "30 Mhz" : "no filter"); +} + +void eladHandler::show_eladFrequency (int f) { + eladFrequency -> display (f); +} + +void eladHandler::show_iqSwitch (bool b) { + if (b) + elad_iqSwitch -> setText ("reversed IQ"); + else + elad_iqSwitch -> setText ("normal IQ"); +} + diff --git a/devices/elad-s1-handler/elad-handler.h b/devices/elad-s1-handler/elad-handler.h new file mode 100644 index 0000000..67a8bc4 --- /dev/null +++ b/devices/elad-s1-handler/elad-handler.h @@ -0,0 +1,79 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __ELAD_HANDLER__ +#define __ELAD_HANDLER__ + +#include +#include +#include +#include "dab-constants.h" +#include "virtual-input.h" +#include "ringbuffer.h" +#include "ui_widget.h" +#include + +class QSettings; +class eladWorker; +class eladLoader; +typedef std::complex(*makeSampleP)(uint8_t *); + +class eladHandler: public virtualInput, public Ui_Form { +Q_OBJECT +public: + eladHandler (QSettings *); + ~eladHandler (void); + void setVFOFrequency (int32_t); + int32_t getVFOFrequency (void); + bool legalFrequency (int32_t); + int32_t defaultFrequency (void); + + bool restartReader (void); + void stopReader (void); + int32_t getSamples (std::complex *, int32_t); + int32_t Samples (void); + void resetBuffer (void); + int32_t getRate (void); + int16_t bitDepth (void); +private slots: + void setGainReduction (void); + void setOffset (int); + void setFilter (void); +public slots: + void show_eladFrequency (int); + void show_iqSwitch (bool); +private: + QSettings *eladSettings; + bool deviceOK; + eladLoader *theLoader; + eladWorker *theWorker; + RingBuffer> *_I_Buffer; + QFrame *myFrame; + int32_t vfoFrequency; + int32_t vfoOffset; + int gainReduced; + int localFilter; + uint8_t conversionNumber; + int16_t iqSize; +}; +#endif + diff --git a/devices/elad-s1-handler/elad-loader.cpp b/devices/elad-s1-handler/elad-loader.cpp new file mode 100644 index 0000000..1974c12 --- /dev/null +++ b/devices/elad-s1-handler/elad-loader.cpp @@ -0,0 +1,196 @@ +# +/* + * Copyright (C) 2014 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "elad-loader.h" +// +// Straight forward class to load the functions from the +// elad library + + eladLoader::eladLoader (int32_t theRate, int16_t *success) { +int rc; + libraryLoaded = false; + hardware_OK = false; + usb_OK = false; + *success = -1; // just the default + + fprintf (stderr, "going to load libusb\n"); + hwHandle = dlopen ("libusb-1.0.so", RTLD_NOW | RTLD_GLOBAL); + hwLibname = new char [100]; + sprintf (hwLibname, "libfdms1_hw_init_%d.so.1.0", theRate); +// "/usr/local/lib64/libfdms1_hw_init_%d.so.1.0", theRate); + + fprintf (stderr, "going to load %s\n", hwLibname); + hwHandle = dlopen (hwLibname, RTLD_NOW); + if (hwHandle == NULL) { + fprintf (stderr, "error report %s\n", dlerror ()); + libusb_close (dev_handle); + return; + } +// load the init function + Init = (FDMS1_HW_INIT) dlsym (hwHandle, (const char *)"fdms1_hw_init"); + if (Init == NULL) { + fprintf (stderr, "Could not load fdms1_hw_init\n"); + dlclose (hwHandle); + return; + } +// +// now for the control library + cwLibname = "libfdms1_hw_ctrl.so.1.0"; +// cwLibname = "/usr/local/lib64/libfdms1_hw_ctrl.so.1.0"; + fprintf (stderr, "going to load %s\n", cwLibname); + cwHandle = dlopen (cwLibname, RTLD_NOW); + if (cwHandle == NULL) { + fprintf (stderr, "error report %s\n", dlerror ()); + dlclose (hwHandle); + return; + } + + libraryLoaded = true; +// +// Load the functions one by one + set_en_ext_io_ATT20 = (Pset_en_ext_io_ATT20) + GETPROCADDRESS (cwHandle, "set_en_ext_io_ATT20"); + if (set_en_ext_io_ATT20 == NULL) { + fprintf (stderr, "Could not load set_en_ext_io_ATT20\n"); + return; + } + + set_en_ext_io_LP30 = (Pset_en_ext_io_ATT20) + GETPROCADDRESS (cwHandle, "set_en_ext_io_LP30"); + if (set_en_ext_io_LP30 == NULL) { + fprintf (stderr, "Could not load set_en_ext_io_ATT20\n"); + return; + } + + OpenHW = (OPEN_HW) GETPROCADDRESS (cwHandle, "OpenHW"); + SetHWLO = (SET_HWLO) GETPROCADDRESS (cwHandle, "SetHWLO"); + StartFIFO = (START_FIFO) GETPROCADDRESS (cwHandle, "StartFIFO"); + StopFIFO = (STOP_FIFO) GETPROCADDRESS (cwHandle, "StopFIFO"); + StopHW = (STOP_HW) GETPROCADDRESS (cwHandle, "StopHW"); + CloseHW = (CLOSE_HW) GETPROCADDRESS (cwHandle, "CloseHW"); + fprintf (stderr, "Functions seem to be loaded\n"); +// +// We first open the USB lib + usb_OK = false; + dev_handle = startUSB (); + if (dev_handle == NULL) { + *success = -2; + return; + } + usb_OK = true; +// we are going for init + fprintf (stderr, "Loading FPGA, please wait\n"); + rc = Init (dev_handle); + if (rc == 0) { + fprintf (stderr, "Loading FPGA Image failed %d\n", rc); + *success = -3; + return; + } + rc = OpenHW (dev_handle, theRate); + fprintf (stderr, "Hardware opened %s\n", rc == 1 ? "good" : "failed"); + hardware_OK = rc == 1; + if (!hardware_OK) { + *success = -4; + return; + } + + if (hardware_OK) { + int d_en_ext_io_ATT20 = 1; + int d_en_ext_io_LP30 = 1; + set_en_ext_io_ATT20 (dev_handle, &d_en_ext_io_ATT20); + set_en_ext_io_LP30 (dev_handle, &d_en_ext_io_LP30); + } + *success = 0; +} + + eladLoader::~eladLoader (void) { + if (hardware_OK) { + StopHW (); + CloseHW (); + } + if (usb_OK) + libusb_close (dev_handle); + + if (libraryLoaded) { + dlclose (cwHandle); + dlclose (hwHandle); + } +} +// + +libusb_device_handle *eladLoader::startUSB (void) { +libusb_device_handle *dev_handle = NULL; +uint16_t vendor_id = 0x1721; +uint16_t product_id = 0x0610; + + context = 0; +int rc = libusb_init ( &context ); + + if (rc == 0 && context != 0) { + libusb_set_debug (context,3); + } + else { + fprintf (stderr, + "Error in libusb_init: [%d] %s\n", + rc, libusb_error_name (rc)); + return NULL; + } + + dev_handle = libusb_open_device_with_vid_pid (context, + vendor_id, + product_id); + + if (dev_handle == 0) { + fprintf (stderr, "Error in libusb_open_device_with_vid_pid\n"); + fprintf (stderr, + "Check FDMS1 is properly connected and turned on.\n"); + return NULL; + } + + fprintf (stderr, "libusb_open_device_with_vid_pid OK\n"); + + if (libusb_kernel_driver_active (dev_handle, 0) ){ + printf("Device busy...detaching...\n"); + libusb_detach_kernel_driver (dev_handle, 0); + } else + printf("Device free from kernel, continue...\n"); + + rc = libusb_claim_interface (dev_handle, 0); + //claim interface 0 (the first) of device + if (rc < 0) { + fprintf (stderr, + "Cannot claim interface: [%d] %s\n", + rc, libusb_error_name (rc)); + return NULL; + } + return dev_handle; +} + +libusb_device_handle *eladLoader::getHandle (void) { + return dev_handle; +} + +bool eladLoader::OK (void) { + return libraryLoaded && hardware_OK && usb_OK; +} + diff --git a/devices/elad-s1-handler/elad-loader.h b/devices/elad-s1-handler/elad-loader.h new file mode 100644 index 0000000..3f733e2 --- /dev/null +++ b/devices/elad-s1-handler/elad-loader.h @@ -0,0 +1,81 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +// +// We use a straightforward class "eladLoader" both as +// loader and as container for the dll functions. + +#ifndef __ELAD_LOADER +#define __ELAD_LOADER +#include "dab-constants.h" +#include +#include + +// The naming of functions for accessing shared libraries +// differ between Linux and Windows +#define GETPROCADDRESS dlsym + +// Dll function prototypes + +typedef void (*Pset_en_ext_io_ATT20)(libusb_device_handle *, int *); +typedef void (*Pset_en_ext_io_LP30)(libusb_device_handle *, int *); +typedef int (*OPEN_HW)(libusb_device_handle *, long); +typedef int (*SET_HWLO)(libusb_device_handle *, long *); +typedef void (*START_FIFO)(libusb_device_handle *); +typedef void (*STOP_FIFO)(libusb_device_handle *); +typedef void (*STOP_HW)(void); +typedef void (*CLOSE_HW)(void); +typedef int (*FDMS1_HW_INIT)(libusb_device_handle *); + +class eladLoader { +public: + + eladLoader (int32_t, int16_t *); + ~eladLoader (void); + bool OK (void); +libusb_device_handle *getHandle (void); +Pset_en_ext_io_ATT20 set_en_ext_io_ATT20; +Pset_en_ext_io_LP30 set_en_ext_io_LP30; +OPEN_HW OpenHW; +SET_HWLO SetHWLO; +START_FIFO StartFIFO; +STOP_FIFO StopFIFO; +STOP_HW StopHW; +CLOSE_HW CloseHW; +FDMS1_HW_INIT Init; +private: + libusb_device_handle *startUSB (void); + HINSTANCE hwHandle; + HINSTANCE cwHandle; + libusb_device_handle *dev_handle; + libusb_context *context; + bool libraryLoaded; + bool usb_OK; + bool hardware_OK; +const char *cwLibname; + char *hwLibname; + int32_t theRate; +}; + +#endif + + diff --git a/devices/elad-s1-handler/elad-s1.pro b/devices/elad-s1-handler/elad-s1.pro new file mode 100644 index 0000000..66a77d8 --- /dev/null +++ b/devices/elad-s1-handler/elad-s1.pro @@ -0,0 +1,26 @@ +# +TEMPLATE = lib +CONFIG += plugin +QT += core gui widgets + +INCLUDEPATH += . \ + ../ ../.. \ + ../../../includes \ + ../../../includes/various +HEADERS = ../rig-interface.h \ + ../../../includes/swradio-constants.h \ + ./elad-s1.h \ + ./elad-worker.h \ + ./elad-loader.h \ + ../../../includes/various/ringbuffer.h +SOURCES = ./elad-s1.cpp \ + ./elad-worker.cpp \ + ./elad-loader.cpp +TARGET = $$qtLibraryTarget(device_elad-s1sw) +FORMS += ./widget.ui + +unix{ +DESTDIR = ../../../../../linux-bin/input-plugins-sw +LIBS += -lusb-1.0 -ldl +} + diff --git a/devices/elad-s1-handler/elad-worker.cpp b/devices/elad-s1-handler/elad-worker.cpp new file mode 100644 index 0000000..afbd798 --- /dev/null +++ b/devices/elad-s1-handler/elad-worker.cpp @@ -0,0 +1,290 @@ +# +/* + * Copyright (C) 2014 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "dab-constants.h" // some general definitions +#include "elad-worker.h" // our header +#include "elad-handler.h" +#include "elad-loader.h" // the API definition +#include "ringbuffer.h" // the buffer + +// The elad-worker is a simple wrapper around the elad +// interface. It is a pretty simple thread performing the +// basic functions, it reads the bytes, converts them to +// samples and converts the rate to 2048000 +// + eladWorker::eladWorker (int32_t defaultFreq, + eladLoader *f, + eladHandler *h, + RingBuffer> *theBuffer, + bool *OK) { +int i; + fprintf (stderr, "creating a worker\n"); + _I_Buffer = new RingBuffer (16 * 32768); + fprintf (stderr, "local buffer allocated\n"); + this -> theRate = 3072000; + this -> defaultFreq = defaultFreq; + this -> functions = f; + this -> theBuffer = theBuffer; + *OK = false; // just the default + iqSwitch = false; + + theFilter = new eladFilter (5, 1024000, 3072000); + conversionNumber = theRate == 192000 ? 1: + theRate <= 3072000 ? 2 : 3; +// +// we convert to complexes directly + iqSize = conversionNumber == 3 ? 4 : 8; + convBufferSize = theRate / 1000; + convIndex = 0; + convBuffer = new std::complex [convBufferSize + 1]; + + fprintf (stderr, "iqSize = %d, conversion = %d\n", + iqSize, conversionNumber); +// The sizes of the mapTable and the convTable are +// predefined and follow from the input and output rate +// (theRate / 1000) vs (2048000 / 1000) + for (i = 0; i < 2048; i ++) { + float inVal = float (theRate / 1000); + mapTable_int [i] = int (floor (i * (inVal / 2048.0))); + mapTable_float [i] = i * (inVal / 2048.0) - mapTable_int [i]; + } + fprintf (stderr, "mapTables initialized\n"); +// + fprintf (stderr, "testing functions\n"); + if (!functions -> OK ()) + return; + lastFrequency = defaultFreq; // the parameter!!!! + runnable = true; + fprintf (stderr, "functions are OK\n"); + functions -> StartFIFO (functions -> getHandle ()); + connect (this, SIGNAL (show_eladFrequeny (int)), + h, SLOT (show_eladFrequency (int))); + connect (this, SIGNAL (show_iqSwitch (bool)), + h, SLOT (show_iqSwitch (bool))); + start (); + *OK = true; +} + +// As usual, killing objects containing a thread need to +// be done carefully. +void eladWorker::stop (void) { + if (runnable) + functions -> StopFIFO (functions -> getHandle ()); + runnable = false; +} + + eladWorker::~eladWorker (void) { + stop (); + while (isRunning ()) + msleep (1); + delete _I_Buffer; + delete [] convBuffer; +} + +std::complex makeSample_31bits (uint8_t *); +std::complex makeSample_30bits (uint8_t *, bool); +std::complex makeSample_15bits (uint8_t *); + +typedef union { + struct __attribute__((__packed__)) { + float i; + float q; + } iqf; + struct __attribute__((__packed__)) { + int32_t i; + int32_t q; + } iq; + struct __attribute__((__packed__)) { + uint8_t i1; + uint8_t i2; + uint8_t i3; + uint8_t i4; + uint8_t q1; + uint8_t q2; + uint8_t q3; + uint8_t q4; + }; +} iq_sample; + +#define SCALE_FACTOR_30 1073741824.000 +#define SCALE_FACTOR_29 536970912.000 +#define SCALE_FACTOR_14 16384.000 + + +std::complex makeSample_31bits (uint8_t *buf) { +int ii = 0; int qq = 0; +int16_t i = 0; + + uint8_t q0 = buf [i++]; + uint8_t q1 = buf [i++]; + uint8_t q2 = buf [i++]; + uint8_t q3 = buf [i++]; + + uint8_t i0 = buf [i++]; + uint8_t i1 = buf [i++]; + uint8_t i2 = buf [i++]; + uint8_t i3 = buf [i++]; + + ii = (i3 << 24) | (i2 << 16) | (i1 << 8) | i0; + qq = (q3 << 24) | (q2 << 16) | (q1 << 8) | q0; + return std::complex ((float)qq / SCALE_FACTOR_30, + (float)ii / SCALE_FACTOR_30); + return std::complex ((float)ii / SCALE_FACTOR_30, + (float)qq / SCALE_FACTOR_30); +} + + +std::complex makeSample_30bits (uint8_t *buf, bool flag) { +int ii = 0; int qq = 0; +int16_t i = 0; + + uint8_t q0 = buf [i++]; + uint8_t q1 = buf [i++]; + uint8_t q2 = buf [i++]; + uint8_t q3 = buf [i++]; + + uint8_t i0 = buf [i++]; + uint8_t i1 = buf [i++]; + uint8_t i2 = buf [i++]; + uint8_t i3 = buf [i++]; + + ii = (i3 << 24) | (i2 << 16) | (i1 << 8) | i0; + qq = (q3 << 24) | (q2 << 16) | (q1 << 8) | q0; + if (flag) + return std::complex ((float)qq / SCALE_FACTOR_29, + (float)ii / SCALE_FACTOR_29); + else + return std::complex ((float)ii / SCALE_FACTOR_29, + (float)qq / SCALE_FACTOR_29); +} +// +std::complex makeSample_15bits (uint8_t *buf) { +int ii = 0; int qq = 0; +int16_t i = 0; + + ii = (int)((unsigned char)(buf[i++])); + ii += (int)((unsigned char)(buf[i++])) << 8; + qq = (int)((unsigned char)(buf[i++])); + qq += (int)((unsigned char)(buf[i++])) << 8; + return std::complex ((float)ii / SCALE_FACTOR_14, + (float)ii / SCALE_FACTOR_14); + return std::complex ((float)qq / SCALE_FACTOR_14, + (float)ii / SCALE_FACTOR_14); +} + +#define BUFFER_SIZE (8 * 8192) +uint8_t buffer [BUFFER_SIZE]; +// +// To make life easy, we do all handling in this task, +// its "output", i.e. the shared buffer contains the +// samples, type complex, representing a samplerate 2048000 +// Every millisecond we add 2048 samples by converting +// 3072 samples +void eladWorker:: run (void) { +int32_t amount; +int rc, i; + +// when (re)starting, clean up first + _I_Buffer -> FlushRingBuffer (); + + fprintf (stderr, "worker thread started\n"); + + while (runnable) { + rc = libusb_bulk_transfer (functions -> getHandle (), + (6 | LIBUSB_ENDPOINT_IN), + (uint8_t *)buffer, + BUFFER_SIZE * sizeof (uint8_t), + &amount, + 2000); + if (rc) { + fprintf (stderr, + "Error in libusb_bulk_transfer: [%d] %s\n", + rc, + libusb_error_name (rc)); + if (rc != 7) + break; + } +// +// Since we do not know whether the amount read is a multiple +// of iqSize, we use an intermediate buffer + _I_Buffer -> putDataIntoBuffer (buffer, amount); + while (_I_Buffer -> GetRingBufferReadAvailable () >= iqSize * 1024) { + uint8_t myBuffer [iqSize * 1024]; + _I_Buffer -> getDataFromBuffer (myBuffer, iqSize * 1024); +// +// Having read 1024 * iqSize bytes, we can make them into complex samples +// and start converting the rate + for (i = 0; i < 1024; i ++) { + convBuffer [convIndex ++] = +// theFilter -> Pass ( +// makeSample_30bits (&myBuffer [iqSize * i], +// iqSwitch)); + makeSample_30bits (&myBuffer [iqSize * i], + iqSwitch); + if (convIndex > convBufferSize) { + std::complex temp [2048]; + int16_t j; + for (j = 0; j < 2048; j ++) { + int16_t inpBase = mapTable_int [j]; + float inpRatio = mapTable_float [j]; + + temp [j] = cmul (convBuffer [inpBase + 1], inpRatio) + + cmul (convBuffer [inpBase], 1 - inpRatio); + } + + theBuffer -> putDataIntoBuffer (temp, 2048); +// shift the sample at the end to the beginning, it is needed +// as the starting sample for the next time + convBuffer [0] = convBuffer [convBufferSize]; + convIndex = 1; + } + } + } + } + fprintf (stderr, "eladWorker now stopped\n"); +} + +void eladWorker::setVFOFrequency (int32_t f) { +int result; +int realFreq; + if (!runnable) + return; + + realFreq = f % Khz (3072); + iqSwitch = ((f / Khz (3072)) & 01) == 01; + lastFrequency = f; + result = functions -> SetHWLO (functions -> getHandle (), + &lastFrequency); + if (result == 1) + fprintf (stderr, "setting frequency to %d succeeded\n", + realFreq); + else + fprintf (stderr, "setting frequency to %d failed\n", + realFreq); + show_eladFrequency (realFreq); + show_iqSwitch (iqSwitch); +} + +int32_t eladWorker::getVFOFrequency (void) { + return lastFrequency; +} + diff --git a/devices/elad-s1-handler/elad-worker.h b/devices/elad-s1-handler/elad-worker.h new file mode 100644 index 0000000..8496d57 --- /dev/null +++ b/devices/elad-s1-handler/elad-worker.h @@ -0,0 +1,76 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __ELAD_WORKER__ +#define __ELAD_WORKER__ + +#include +#include +#include +#include +#include +#include +#include +#include "dab-constants.h" +#include "elad-filter.h" +#include "ringbuffer.h" + +class eladLoader; +class eladHandler; + +class eladWorker: public QThread { +Q_OBJECT +public: + eladWorker (int32_t, // initial freq + eladLoader *, + eladHandler *, + RingBuffer> *, + bool *); + ~eladWorker (void); + void setVFOFrequency (int32_t); + int32_t getVFOFrequency (void); + void stop (void); +private: + void run (void); + eladLoader *functions; // + RingBuffer *_I_Buffer; + RingBuffer> *theBuffer; + int32_t defaultFreq; + long int lastFrequency; + bool runnable; + int32_t theRate; + int mapTable_int [2048]; + float mapTable_float [2048]; + int conversionNumber; +// we convert to complexes directly + int iqSize; + int convBufferSize; + int convIndex; + std::complex *convBuffer; + bool iqSwitch; + eladFilter *theFilter; +signals: + void show_eladFrequency (int); + void show_iqSwitch (bool); +}; +#endif + diff --git a/devices/elad-s1-handler/widget.ui b/devices/elad-s1-handler/widget.ui new file mode 100644 index 0000000..9e8d2d6 --- /dev/null +++ b/devices/elad-s1-handler/widget.ui @@ -0,0 +1,207 @@ + + + Form + + + + 0 + 0 + 239 + 320 + + + + Form + + + + + 0 + 0 + 211 + 311 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 0 + 90 + 121 + 31 + + + + 2 + + + 7 + + + QLCDNumber::Flat + + + + + + 10 + 160 + 101 + 21 + + + + elad-s1 + + + + + + 0 + 120 + 121 + 31 + + + + 999 + + + + + + 120 + 130 + 31 + 21 + + + + Hz + + + + + + 10 + 10 + 91 + 21 + + + + gain reduction + + + + + + 50 + 200 + 121 + 21 + + + + + + + + + + 100 + 10 + 41 + 21 + + + + + + + + + + 20 + 10 + 71 + 21 + + + + + + + + + + 96 + 50 + 51 + 31 + + + + filter + + + + + + 10 + 50 + 91 + 31 + + + + no filter + + + + + + 10 + 190 + 161 + 23 + + + + + + + 10 + 220 + 161 + 20 + + + + elad frequency + + + + + + 82 + 250 + 91 + 20 + + + + + + + + + + + diff --git a/devices/extio-handler/common-readers.cpp b/devices/extio-handler/common-readers.cpp new file mode 100644 index 0000000..5a6d60e --- /dev/null +++ b/devices/extio-handler/common-readers.cpp @@ -0,0 +1,174 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +// +// For the different formats for input, we have +// different readers, with one "mother" reader. +// Note that the cardreader is quite different +// and coded elsewhere +// +#include "common-readers.h" +// +// The reader for 16 bit int values +// + reader_16::reader_16 (RingBuffer> *p, + int32_t base_16, + int32_t rate):virtualReader (p, rate) { + this -> base = base_16; +} + + reader_16::~reader_16 (void) { +} +// +// apparently bytes are read in from low byte to high byte +void reader_16::processData (float IQoffs, void *data, int cnt) { +int32_t i; +std::complex IQData [blockSize]; +uint8_t *p = (uint8_t *)data; + (void)IQoffs; + (void)cnt; + + for (i = 0; i < blockSize; i ++) { + uint8_t r0 = p [4 * i]; + uint8_t r1 = p [4 * i + 1]; + uint8_t i0 = p [4 * i + 2]; + uint8_t i1 = p [4 * i + 3]; + int16_t re = (r1 << 8) | r0; + int16_t im = (i1 << 8) | i0; + IQData [i] = std::complex ((float)re / base, + (float)im / base); + } + + convertandStore (IQData, blockSize); +} + +int16_t reader_16::bitDepth (void) { + return 16; +} +// +// The reader for 24 bit integer values +// + reader_24::reader_24 (RingBuffer> *p, + int32_t base_24, int32_t rate): + virtualReader (p, rate) { + this -> base = base_24; +} + + reader_24::~reader_24 (void) { +} + +void reader_24::processData (float IQoffs, void *data, int cnt) { +int32_t i; +std::complex IQData [blockSize]; +uint8_t *p = (uint8_t *)data; + (void)IQoffs; + (void)cnt; + + for (i = 0; i < blockSize; i ++) { + uint8_t r0 = p [6 * i]; + uint8_t r1 = p [6 * i + 1]; + uint8_t r2 = p [6 * i + 2]; + uint8_t i0 = p [6 * i + 3]; + uint8_t i1 = p [6 * i + 4]; + uint8_t i2 = p [6 * i + 5]; + int32_t re = int32_t (uint32_t (r2 << 16 | r1 << 8 | r0)); + int32_t im = int32_t (uint32_t (i2 << 16 | i1 << 8 | i0)); + IQData [i] = std::complex ((float)re / base, + (float)im / base); + } + + convertandStore (IQData, blockSize); +} + +int16_t reader_24::bitDepth (void) { + return 24; +} +// +// The reader for 32 bit integer values +// + reader_32::reader_32 (RingBuffer> *p, + int32_t base_32, int32_t rate): + virtualReader (p, rate) { + this -> base = base_32; +} + + reader_32::~reader_32 (void) { +} + +void reader_32::processData (float IQoffs, void *data, int cnt) { +int32_t i; +std::complex IQData [blockSize]; +uint8_t *p = (uint8_t *)data; + (void)IQoffs; + (void)cnt; + + for (i = 0; i < blockSize; i ++) { + uint8_t r0 = p [8 * i]; + uint8_t r1 = p [8 * i + 1]; + uint8_t r2 = p [8 * i + 2]; + uint8_t r3 = p [8 * i + 3]; + uint8_t i0 = p [8 * i + 4]; + uint8_t i1 = p [8 * i + 5]; + uint8_t i2 = p [8 * i + 6]; + uint8_t i3 = p [8 * i + 7]; + int32_t re = int32_t (uint32_t (r3 << 24 | r2 << 16 | + r1 << 8 | r0)); + int32_t im = int32_t (uint32_t (i3 << 24 | i2 << 16 | + i1 << 8 | i0)); + IQData [i] = std::complex ((float)re / base, + (float)im / base); + } + + convertandStore (IQData, blockSize); +} + +int16_t reader_32::bitDepth (void) { + return 32; +} +// +// The reader for 32 bit float values +// + reader_float::reader_float (RingBuffer> *p, + int32_t rate): + virtualReader (p, rate) { +int16_t i; +} + + reader_float::~reader_float (void) { +} +// +void reader_float::processData (float IQoffs, void *data, int cnt) { +int32_t i, j; +std::complex IQData [blockSize]; +float *p = (float *)data; + (void)IQoffs; + (void)cnt; + + for (i = 0; i < blockSize; i ++) + IQData [i] = std::complex (p [2 * i], p [2 * i + 1]); + + convertandStore (IQData, blockSize); +} + +int16_t reader_float::bitDepth (void) { + return 24; +} + diff --git a/devices/extio-handler/common-readers.h b/devices/extio-handler/common-readers.h new file mode 100644 index 0000000..578febe --- /dev/null +++ b/devices/extio-handler/common-readers.h @@ -0,0 +1,53 @@ +# +// +// For the different formats for input, we have +// different readers, with one "mother" reader. +// Note that the cardreader is quite different here +// and its code is elsewhere +#ifndef __COMMON_READERS +#define __COMMON_READERS + +#include "virtual-reader.h" + +class reader_16: public virtualReader { +public: + reader_16 (RingBuffer> *p, int32_t, int32_t); + ~reader_16 (void); +void processData (float IQoffs, void *data, int cnt); +int16_t bitDepth (void); +}; + +class reader_24: public virtualReader { +public: + reader_24 (RingBuffer> *p, int32_t, int32_t); + ~reader_24 (void); +void processData (float IQoffs, void *data, int cnt); +int16_t bitDepth (void); +}; + +class reader_32: public virtualReader { +public: + reader_32 (RingBuffer> *p, int32_t, int32_t); + ~reader_32 (void); +void processData (float IQoffs, void *data, int cnt); +int16_t bitDepth (void); +}; + +// +// This is the only one we actually need for +// elad s2 as input device for DAB +class reader_float: public virtualReader { +public: + reader_float (RingBuffer> *p, int32_t); + ~reader_float (void); +void processData (float IQoffs, void *data, int cnt); +int16_t bitDepth (void); +private: + int16_t mapTable_int [2048]; + float mapTable_float [2048]; + std::complex convBuffer [3072 + 1]; + int16_t convIndex; +}; + +#endif + diff --git a/devices/extio-handler/extio-handler.cpp b/devices/extio-handler/extio-handler.cpp new file mode 100644 index 0000000..a1831ac --- /dev/null +++ b/devices/extio-handler/extio-handler.cpp @@ -0,0 +1,387 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#include +#include +#include +#include "extio-handler.h" +#include "virtual-reader.h" +#include "common-readers.h" + +#ifndef __MINGW32__ +#include "dlfcn.h" +#endif +using namespace std; + +#ifdef __MINGW32__ +#define GETPROCADDRESS GetProcAddress +#define FREELIBRARY FreeLibrary +#else +#define GETPROCADDRESS dlsym +#define FREELIBRARY dlclose +#endif +// + +// Simple interface routine to extio's +// The callback from the Extio*.dll does not contain a "context", +// so we have to create one artificially in order to access +// our functions +// Our context here is the instance of the class, stored in +// a static variable +static +extioHandler *myContext = NULL; + +static +int extioCallback (int cnt, int status, float IQoffs, void *IQData) { + if (cnt > 0) { // we got data + if (myContext != NULL && myContext -> isStarted) + myContext -> theReader -> processData (IQoffs, IQData, cnt); + } + else // we got something + if (cnt < 0) { + fprintf (stderr, "got a status cmd %d\n", status); + switch (status) { + // for the SDR14 + case extHw_Disconnected: + case extHw_READY: + case extHw_RUNNING: + case extHw_ERROR: + case extHw_OVERLOAD: + break; + case extHw_Changed_SampleRate: // 100 ignore + break; + case extHw_Changed_LO: // 101 + break; + case extHw_Lock_LO: // 102 + break; + case extHw_Unlock_LO: // 103 + break; + case extHw_Changed_LO_Not_TUNE: // 104 + break; + case extHw_Changed_TUNE: // 105 + break; + case extHw_Changed_MODE: // 106 + break; + case extHw_Start: // 107 + break; + case extHw_Stop: // 108 + break; + case extHw_Changed_FILTER: // 109 + break; + default: + break; + } + } + return 1; +} +// +// the seemingly additional complexity is caused by the fact +// that naming of files in windows is in MultiBytechars +// +// We assume that if there are settings possible, they +// are dealt with by the producer of the extio, so here +// no frame whatsoever. + extioHandler::extioHandler (QSettings *s) { +#ifdef __MINGW32__ +char temp [256]; +wchar_t *windowsName; +int16_t wchars_num; +#endif +int32_t inputRate = 0; + + inputRate = 2048000; // default + lastFrequency = Khz (25000); + base_16 = s -> value ("base_16", 128). toInt (); + base_24 = s -> value ("base_24", 32767 * 256). toInt (); + base_32 = s -> value ("base_32", 32767 * 32768). toInt (); + isStarted = false; + theReader = NULL; + dll_open = false; + + QString dll_file = "foute boel"; + dll_file = QFileDialog:: + getOpenFileName (NULL, + tr ("load file .."), + QDir::currentPath (), +#ifdef __MINGW32__ + tr ("libs (Extio*.dll)")); +#else + tr ("libs (*.so)")); +#endif + dll_file = QDir::toNativeSeparators (dll_file); + if (dll_file == QString ("")) { + QMessageBox::warning (NULL, tr ("sdr"), + tr ("incorrect filename\n")); + throw (20); + } + +#ifdef __MINGW32__ + wchars_num = MultiByteToWideChar (CP_UTF8, 0, + dll_file. toLatin1 (). data (), + -1, NULL, 0); + windowsName = new wchar_t [wchars_num]; + MultiByteToWideChar (CP_UTF8, 0, + dll_file. toLatin1 (). data (), + -1, windowsName, wchars_num); + wcstombs (temp, windowsName, 128); + Handle = LoadLibrary (windowsName); + fprintf (stderr, "Last error = %ld\n", GetLastError ()); +#else + Handle = dlopen (dll_file. toLatin1 (). data (), RTLD_NOW); +#endif + if (Handle == NULL) { + QMessageBox::warning (NULL, tr ("sdr"), + tr ("loading dll failed\n")); + throw (21); + } + + if (!loadFunctions ()) { + QMessageBox::warning (NULL, tr ("sdr"), + tr ("loading functions failed\n")); + FREELIBRARY (Handle); + throw (22); + } +// apparently, the library is open, so record that + dll_open = true; + myContext = (extioHandler *)this; +// +// and start the rig + rigName = new char [128]; + rigModel = new char [128]; + if (!((*InitHW) (rigName, rigModel, hardwareType))) { + QMessageBox::warning (NULL, tr ("sdr"), + tr ("init failed\n")); + FREELIBRARY (Handle); + throw (23); + } + + SetCallback (extioCallback); + if (!(*OpenHW)()) { + QMessageBox::warning (NULL, tr ("sdr"), + tr ("Opening hardware failed\n")); + FREELIBRARY (Handle); + throw (24); + } + + bool OK = false; + while (!OK) { + inputRate = GetHWSR (); + fprintf (stderr, "inputRate = %d\n", inputRate); + if (inputRate < Khz (2000) || + (1000 * (inputRate / 1000) != inputRate)) + QMessageBox::warning (NULL, tr ("sdr"), + tr ("please select an inputrate 2048000")); + else + OK = true; + } + + theBuffer = new RingBuffer>(1024 * 1024); + fprintf (stderr, "hardware type = %d\n", hardwareType); + switch (hardwareType) { + case exthwNone: + case exthwSDRX: + case exthwHPSDR: + case exthwSDR14: + case exthwSCdata: + default: + QMessageBox::warning (NULL, tr ("sdr"), + tr ("device not supported\n")); + return; + + case exthwUSBdata16: + theReader = new reader_16 (theBuffer, base_16, inputRate); + break; + case exthwUSBdata24: + theReader = new reader_24 (theBuffer, base_24, inputRate); + break; + case exthwUSBdata32: + theReader = new reader_32 (theBuffer, base_32, inputRate); + break; + case exthwUSBfloat32: + theReader = new reader_float (theBuffer, inputRate); + break; + } + + ShowGUI (); + fprintf (stderr, "Hw open successful\n"); +} + + extioHandler::~extioHandler (void) { + if (dll_open) { + HideGUI (); + StopHW (); + CloseHW (); + } + + if (Handle != NULL) + FREELIBRARY (Handle); + + if (theReader != NULL) + delete theReader; +} + +bool extioHandler::loadFunctions (void) { +// start binding addresses, + InitHW = (pfnInitHW)GETPROCADDRESS (Handle, "InitHW"); + if (InitHW == NULL) { + fprintf (stderr, "Failed to load InitHW\n"); + return false; + } + + OpenHW = (pfnOpenHW)GETPROCADDRESS (Handle, "OpenHW"); + if (OpenHW == NULL) { + fprintf (stderr, "Failed to load OpenHW\n"); + return false; + } + + StartHW = (pfnStartHW)GETPROCADDRESS (Handle, "StartHW"); + if (StartHW == NULL) { + fprintf (stderr, "Failed to load StartHW\n"); + return false; + } + + StopHW = (pfnStopHW)GETPROCADDRESS (Handle, "StopHW"); + if (StopHW == NULL) { + fprintf (stderr, "Failed to load StopHW\n"); + return false; + } + + CloseHW = (pfnCloseHW)GETPROCADDRESS (Handle, "CloseHW"); + if (CloseHW == NULL) { + fprintf (stderr, "Failed to load CloseHW\n"); + return false; + } + +// GetHWLO = (pfnGetHWLO)GETPROCADDRESS (Handle, "GetHWLO"); +// if (GetHWLO == NULL) { +// fprintf (stderr, "Failed to load GetHWLO\n"); +// return false; +// } + + SetHWLO = (pfnSetHWLO)GETPROCADDRESS (Handle, "SetHWLO"); + if (SetHWLO == NULL) { + fprintf (stderr, "Failed to load SetHWLO\n"); + return false; + } + + GetStatus = (pfnGetStatus)GETPROCADDRESS (Handle, "GetStatus"); + if (GetStatus == NULL) { + fprintf (stderr, "Failed to load GetStatus\n"); + return false; + } + + SetCallback = (pfnSetCallback) + GETPROCADDRESS (Handle, "SetCallback"); + if (SetCallback == NULL) { + fprintf (stderr, "Failed to load SetCallback\n"); + return false; + } +// +// the "non essentials", packed in envelope functions: + L_ShowGUI = (pfnShowGUI)GETPROCADDRESS (Handle, "ShowGUI"); + L_HideGUI = (pfnHideGUI)GETPROCADDRESS (Handle, "HideGUI"); + L_GetHWSR = (pfnGetHWSR)GETPROCADDRESS (Handle, "GetHWSR"); + L_GetFilters = (pfnGetFilters)GETPROCADDRESS (Handle, "GetFilters"); + L_GetTune = (pfnGetTune)GETPROCADDRESS (Handle, "GetTune"); + L_GetMode = (pfnGetMode)GETPROCADDRESS (Handle, "GetMode"); + L_GetHWLO = (pfnGetHWLO)GETPROCADDRESS (Handle, "GetHWLO"); +// + return true; +} + +int32_t extioHandler::getRate (void) { + return GetHWSR (); +} + +void extioHandler::setVFOFrequency (int32_t f) { + fprintf (stderr, "setting freq to %d\n", f); +int h = (*SetHWLO) ((int)f); + lastFrequency = f; +} + +int32_t extioHandler::getVFOFrequency (void) { +// lastFrequency = (*GetHWLO)(); + return lastFrequency; +} + +// +// envelopes for functions that might or might not +// be available +void extioHandler::ShowGUI (void) { + if (L_ShowGUI != NULL) + (*L_ShowGUI) (); +} + +void extioHandler::HideGUI (void) { + if (L_HideGUI != NULL) + (*L_HideGUI) (); +} + +long extioHandler::GetHWSR (void) { + return L_GetHWSR != NULL ? (*L_GetHWSR) () : 192000; +} + +long extioHandler::GetHWLO (void) { + return L_GetHWLO != NULL ? (*L_GetHWLO)() : Mhz (200); +} + +// +// +// Handling the data +bool extioHandler::restartReader (void) { + fprintf (stderr, "restart reader entered (%d)\n", lastFrequency); +int32_t size = (*StartHW)(lastFrequency); + fprintf (stderr, "restart reader returned with %d\n", size); + theReader -> restartReader (size); + fprintf (stderr, "now we have restarted the reader\n"); + isStarted = true; + return true; +} + +void extioHandler::stopReader (void) { + if (isStarted) { + (*StopHW)(); + theReader -> stopReader (); + isStarted = false; + } +} + +int32_t extioHandler::Samples (void) { +int32_t x = theBuffer -> GetRingBufferReadAvailable (); + if (x < 0) + fprintf (stderr, "toch een fout in ringbuffer\n"); + return x; +} + +int32_t extioHandler::getSamples (std::complex *buffer, + int32_t number) { + return theBuffer -> getDataFromBuffer (buffer, number); +} + +int16_t extioHandler::bitDepth (void) { + return theReader -> bitDepth (); +} + +int32_t extioHandler::defaultFrequency (void) { + return Khz (220000); +} + diff --git a/devices/extio-handler/extio-handler.h b/devices/extio-handler/extio-handler.h new file mode 100644 index 0000000..8765ccd --- /dev/null +++ b/devices/extio-handler/extio-handler.h @@ -0,0 +1,231 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef __EXTIO_HANDLER__ +#define __EXTIO_HANDLER__ +# +#include +#include +#include +#include +#include "ringbuffer.h" + +class QSettings; +class virtualReader; +// create type defs for the functions +#ifdef __MINGW32__ +#define STDCALL __stdcall +#else +#define STDCALL +#endif + +typedef int (*pfnExtIOCallback) (int cnt, int status, float IQoffs, void *IQdata); +typedef bool (STDCALL *pfnInitHW)(char *, char *, int& ); // +typedef bool (STDCALL *pfnOpenHW)(void); +typedef void (STDCALL *pfnCloseHW)(void); +typedef int (STDCALL *pfnStartHW)(long); +typedef void (STDCALL *pfnStopHW)(void); +typedef int (STDCALL *pfnSetHWLO)(long); +typedef void (STDCALL *pfnSetCallback)(pfnExtIOCallback funcptr); +typedef int (STDCALL *pfnGetStatus)(void); +// +typedef long (STDCALL *pfnGetHWLO)(void); +typedef long (STDCALL *pfnGetHWSR)(void); +typedef void (STDCALL *pfnRawDataReady)(long, void *, void *, int); +typedef void (STDCALL *pfnShowGUI)(void); +typedef void (STDCALL *pfnHideGUI)(void); +typedef long (STDCALL *pfnGetTune)(void); +typedef uint8_t (STDCALL *pfnGetMode)(void); +typedef void (STDCALL *pfnModeChanged)(char); +typedef void (STDCALL *pfnTuneChanged)(long freq); +typedef void (STDCALL *pfnIfLimitsChanged)(long low, long high); +typedef void (STDCALL *pfnFiltersChanged)(int, int, int, bool); +typedef void (STDCALL *pfnMuteChanged)(bool); +typedef void (STDCALL *pfnGetFilters)(int&, int&, int&); + +// hwtype codes to be set with pfnInitHW +// Please ask Alberto di Bene (i2phd@weaksignals.com) +// for the assignment of an index code +// for cases different from the above. +// note: "exthwUSBdataNN" don't need to be from USB. +// The keyword "USB" is just for historical reasons, +// which may get removed later .. +typedef enum { + exthwNone = 0 + , exthwSDR14 = 1 + , exthwSDRX = 2 + , exthwUSBdata16 = 3 // the hardware does its own digitization and the audio data are returned to Winrad + // via the callback device. Data must be in 16-bit (short) format, little endian. + , exthwSCdata = 4 // The audio data are returned via the (S)ound (C)ard managed by Winrad. The external + // hardware just controls the LO, and possibly a preselector, under DLL control. + , exthwUSBdata24 = 5 // the hardware does its own digitization and the audio data are returned to Winrad + // via the callback device. Data are in 24-bit integer format, little endian. + , exthwUSBdata32 = 6 // the hardware does its own digitization and the audio data are returned to Winrad + // via the callback device. Data are in 32-bit integer format, little endian. + , exthwUSBfloat32 = 7 // the hardware does its own digitization and the audio data are returned to Winrad + // via the callback device. Data are in 32-bit float format, little endian. + , exthwHPSDR = 8 // for HPSDR only! +} extHWtypeT; + +// status codes for pfnExtIOCallback; used when cnt < 0 +typedef enum { +// only processed/understood for SDR14 + extHw_Disconnected = 0 // SDR-14/IQ not connected or powered off + , extHw_READY = 1 // IDLE / Ready + , extHw_RUNNING = 2 // RUNNING => not disconnected + , extHw_ERROR = 3 // ?? + , extHw_OVERLOAD = 4 // OVERLOAD => not disconnected + + // for all extIO's + , extHw_Changed_SampleRate = 100 // sampling speed has changed in the external HW + , extHw_Changed_LO = 101 // LO frequency has changed in the external HW + , extHw_Lock_LO = 102 + , extHw_Unlock_LO = 103 + , extHw_Changed_LO_Not_TUNE = 104 // CURRENTLY NOT YET IMPLEMENTED + // LO freq. has changed, Winrad must keep the Tune freq. unchanged + // (must immediately call GetHWLO() ) + , extHw_Changed_TUNE = 105 // a change of the Tune freq. is being requested. + // Winrad must call GetTune() to know which value is wanted + , extHw_Changed_MODE = 106 // a change of demod. mode is being requested. + // Winrad must call GetMode() to know the new mode + , extHw_Start = 107 // The DLL wants Winrad to Start + , extHw_Stop = 108 // The DLL wants Winrad to Stop + , extHw_Changed_FILTER = 109 // a change in the band limits is being requested + // Winrad must call GetFilters() + +// Above status codes are processed with Winrad 1.32. +// All Winrad derivation like WRplus, WinradF, WinradHD and +// HDSDR should understand them, +// but these do not provide version info with +// VersionInfo(progname, ver_major, ver_minor). + + , extHw_Mercury_DAC_ON = 110 // enable audio output on the Mercury DAC when using the HPSDR + , extHw_Mercury_DAC_OFF = 111 // disable audio output on the Mercury DAC when using the HPSDR + , extHw_PC_Audio_ON = 112 // enable audio output on the PC sound card when using the HPSDR + , extHw_PC_Audio_OFF = 113 // disable audio output on the PC sound card when using the HPSDR + + , extHw_Audio_MUTE_ON = 114 // the DLL is asking Winrad to mute the audio output + , extHw_Audio_MUTE_OFF = 115 // the DLL is asking Winrad to unmute the audio output +// Above status codes are processed with Winrad 1.33 and HDSDR +// Winrad 1.33 and HDSDR still do not provide their +// version with VersionInfo() +// Following status codes are processed when VersionInfo delivers +// 0 == strcmp(progname, "HDSDR") && +// ( ver_major > 2 || ( ver_major == 2 && ver_minor >= 13 ) ) +// +// all extHw_XX_SwapIQ_YYY callbacks shall be +// reported after each OpenHW() call + , extHw_RX_SwapIQ_ON = 116 // additionaly swap IQ - this does not modify the menu point / user selection + , extHw_RX_SwapIQ_OFF = 117 // the user selected swapIQ is additionally applied + , extHw_TX_SwapIQ_ON = 118 // additionaly swap IQ - this does not modify the menu point / user selection + , extHw_TX_SwapIQ_OFF = 119 // the user selected swapIQ is additionally applied + +// Following status codes (for I/Q transceivers) +// are processed when VersionInfo delivers +// 0 == strcmp(progname, "HDSDR") && +// ( ver_major > 2 || ( ver_major == 2 && ver_minor >= 13 ) ) + + , extHw_TX_Request = 120 // DLL requests TX mode / User pressed PTT + // exciter/transmitter must wait until SetModeRxTx() is called! + , extHw_RX_Request = 121 // DLL wants to leave TX mode / User released PTT + // exciter/transmitter must wait until SetModeRxTx() is called! + , extHw_CW_Pressed = 122 // User pressed CW key + , extHw_CW_Released = 123 // User released CW key + , extHw_PTT_as_CWkey = 124 // handle extHw_TX_Request as extHw_CW_Pressed in CW mode + // and extHw_RX_Request as extHw_CW_Released + , extHw_Changed_ATT = 125 // Attenuator changed => call GetActualAttIdx() + +// Following status codes are processed when VersionInfo delivers +// 0 == strcmp(progname, "HDSDR") && +// ( ver_major > 2 || ( ver_major == 2 && ver_minor >= 14 ) ) + + , extHw_Changed_ATTENS = 136 // refresh selectable attenuators => starts calling GetAttenuators() +} extHWstatusT; + +// codes for pfnSetModeRxTx: +typedef enum { + extHw_modeRX = 0 + , extHw_modeTX = 1 +} extHw_ModeRxTxT; + +class extioHandler:public virtualInput { +Q_OBJECT +public: + extioHandler (QSettings *); + ~extioHandler (void); + int32_t getRate (void); + void setVFOFrequency (int32_t); + int32_t getVFOFrequency (void); + int32_t defaultFrequency (void); + + bool restartReader (void); + void stopReader (void); + int32_t Samples (void); + int32_t getSamples (std::complex *, + int32_t); + int16_t bitDepth (void); + long GetHWLO (void); // should be available + long GetHWSR (void); // may be a noop +// +// The call back need access to + virtualReader *theReader; + bool isStarted; +private: + int32_t base_16; + int32_t base_24; + int32_t base_32; + int32_t inputRate; + bool loadFunctions (void); + RingBuffer> *theBuffer; +// functions to be extracted from the dll + pfnInitHW InitHW; // should be available + pfnOpenHW OpenHW; // should be available + pfnSetHWLO SetHWLO; // should be available + pfnStartHW StartHW; // should be available + pfnStopHW StopHW; // should be available + pfnCloseHW CloseHW; // should be available + pfnGetStatus GetStatus; // should be available + pfnSetCallback SetCallback; // should be available +// +// optionals + pfnShowGUI L_ShowGUI; + pfnHideGUI L_HideGUI; + pfnGetHWSR L_GetHWSR; + pfnGetFilters L_GetFilters; + pfnGetTune L_GetTune; + pfnGetMode L_GetMode; + pfnGetHWLO L_GetHWLO; // should be available + void ShowGUI (void); + void HideGUI (void); + +// filename of dll + QString dll_filename; + HINSTANCE Handle; + bool dll_open; + char *rigName; + char *rigModel; + int hardwareType; +signals: +// The following signals originate from the Winrad Extio interface +}; +#endif + diff --git a/devices/extio-handler/extio-widget.ui b/devices/extio-handler/extio-widget.ui new file mode 100644 index 0000000..4f66ef9 --- /dev/null +++ b/devices/extio-handler/extio-widget.ui @@ -0,0 +1,84 @@ + + + extioWidget + + + + 0 + 0 + 148 + 170 + + + + extIO control + + + + + 0 + 0 + 151 + 231 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 20 + 100 + 121 + 21 + + + + extIO handler + + + + + + 10 + 80 + 131 + 21 + + + + + + + + + + 10 + 40 + 121 + 31 + + + + TextLabel + + + + + + 10 + 10 + 111 + 29 + + + + + + + + diff --git a/devices/extio-handler/reader.h b/devices/extio-handler/reader.h new file mode 100644 index 0000000..05d48f9 --- /dev/null +++ b/devices/extio-handler/reader.h @@ -0,0 +1,186 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +// +// For the different formats for input, we have +// different readers, with one "mother" reader. +// Note that the cardreader is quite different here +#ifndef __READER +#define __READER + +#include +#include +#include "ringbuffer.h" +#include "dab-constants.h" + +class reader { +protected: + RingBuffer> *theBuffer; + int32_t blockSize; +public: + reader (RingBuffer> *p) { + theBuffer = p; + blockSize = -1; +} + +virtual ~reader (void) { +} + +virtual void restartReader (int32_t s) { + blockSize = s; +} + +virtual void stopReader (void) { +} + +virtual void processData (float IQoffs, void *data, int cnt) { + (void)IQoffs; + (void)data; + (void)cnt; +} + +virtual int16_t bitDepth (void) { + return 12; +} +}; + +class reader_16: public reader { +public: + reader_16 (RingBuffer> *p):reader (p) { +} + + ~reader_16 (void) { +} + +void processData (float IQoffs, void *data, int cnt) { +int32_t i; +std::complex temp [blockSize]; +uint8_t *p = (uint8_t *)data; + (void)IQoffs; + for (i = 0; i < blockSize; i ++) { + uint8_t r0 = p [4 * i]; + uint8_t r1 = p [4 * i + 1]; + uint8_t i0 = p [4 * i + 2]; + uint8_t i1 = p [4 * i + 3]; + float re = (r0 << 8 | r1) / 32767.0; + float im = (i0 << 8 | i1) / 32767.0; + temp [i] = std::complex (re, im); + } + theBuffer -> putDataIntoBuffer (temp, blockSize); +} + +int16_t bitDepth (void) { + return 16; +} +}; + +class reader_24: public reader { +public: + reader_24 (RingBuffer> *p):reader (p) { +} + + ~reader_24 (void) { +} + +void processData (float IQoffs, void *data, int cnt) { +int32_t i; +std::complex temp [blockSize]; +uint8_t *p = (uint8_t *)data; + (void)IQoffs; + for (i = 0; i < 6 * blockSize; i ++) { + uint8_t r0 = p [6 * i]; + uint8_t r1 = p [6 * i + 1]; + uint8_t r2 = p [6 * i + 2]; + uint8_t i0 = p [6 * i + 3]; + uint8_t i1 = p [6 * i + 4]; + uint8_t i2 = p [6 * i + 5]; + float re = (r0 << 16 | r1 << 8 | r2) / (32768 * 256); + float im = (i0 << 16 | i1 << 8 | i2) / (32768 * 256); + temp [i] = std::complex (re, im); + } + theBuffer -> putDataIntoBuffer (temp, blockSize); +} + +int16_t bitDepth (void) { + return 24; +} +}; + +class reader_32: public reader { +public: + reader_32 (RingBuffer> *p):reader (p) { +} + + ~reader_32 (void) { +} + +void processData (float IQoffs, void *data, int cnt) { +int32_t i; +std::complex temp [blockSize]; +uint8_t *p = (uint8_t *)data; + (void)IQoffs; + for (i = 0; i < 8 * blockSize; i ++) { + uint8_t r0 = p [8 * i]; + uint8_t r1 = p [8 * i + 1]; + uint8_t r2 = p [8 * i + 2]; + uint8_t r3 = p [8 * i + 3]; + uint8_t i0 = p [8 * i + 4]; + uint8_t i1 = p [8 * i + 5]; + uint8_t i2 = p [8 * i + 6]; + uint8_t i3 = p [8 * i + 7]; + float re = (r0 << 24 | r1 << 16 | r2 << 8 | r3) / (32767 * 65536); + float im = (i0 << 24 | i1 << 16 | i2 << 8 | i3) / (32767 * 65336); + temp [i] = std::complex (re, im); + } + theBuffer -> putDataIntoBuffer (temp, blockSize); +} + +int16_t bitDepth (void) { + return 32; +} +}; + + +class reader_float: public reader { +public: + reader_float (RingBuffer> *p):reader (p) { +} + + ~reader_float (void) { +} + +void processData (float IQoffs, void *data, int cnt) { +int32_t i; +std::complex temp [blockSize]; +float *p = (float *)data; + (void)IQoffs; + for (i = 0; i < 2 * blockSize; i ++) + temp [i] = std::complex (p [2 * i], p [2 * i + 1]); + theBuffer -> putDataIntoBuffer (temp, blockSize); +} + +int16_t bitDepth (void) { + return 32; +} +}; + +#endif + diff --git a/devices/extio-handler/virtual-reader.cpp b/devices/extio-handler/virtual-reader.cpp new file mode 100644 index 0000000..83e3966 --- /dev/null +++ b/devices/extio-handler/virtual-reader.cpp @@ -0,0 +1,93 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +// +// For the different formats for input, we have +// different readers, with one "mother" reader. +// Note that the cardreader is quite different here +// +// This is the - almost empty - default implementation +#include "virtual-reader.h" + + virtualReader::virtualReader (RingBuffer> *p, + int32_t rate) { + theBuffer = p; + blockSize = -1; + setMapper (rate, 2048000); +} + + virtualReader::~virtualReader (void) { +} + +void virtualReader::restartReader (int32_t s) { + fprintf (stderr, "Restart met block %d\n", s); + blockSize = s; +} + +void virtualReader::stopReader (void) { +} + +void virtualReader::processData (float IQoffs, void *data, int cnt) { + (void)IQoffs; + (void)data; + (void)cnt; +} + +int16_t virtualReader::bitDepth (void) { + return 12; +} + +void virtualReader::setMapper (int32_t inRate, int32_t outRate) { +int32_t i; + + this -> inSize = inRate / 1000; + this -> outSize = outRate / 1000; + inTable = new std::complex [inSize]; + outTable = new std::complex [outSize]; + mapTable = new float [outSize]; + for (i = 0; i < outSize; i ++) + mapTable [i] = (float) i * inRate / outRate; + conv = 0; +} + +void virtualReader::convertandStore (std::complex *s, + int32_t amount) { +int32_t i, j; + + for (i = 0; i < amount; i ++) { + inTable [conv++] = s [i]; + if (conv >= inSize) { // full buffer, map + for (j = 0; j < outSize - 1; j ++) { + int16_t base = (int)(floor (mapTable [j])); + float frac = mapTable [j] - base; + outTable [j] = cmul (inTable [base], 1 - frac) + + cmul (inTable [base + 1], frac); + } + +// +// let op, het laatste element was nog niet gebruikta + conv = 1; + inTable [0] = inTable [inSize - 1]; + theBuffer -> putDataIntoBuffer (outTable, outSize - 1); + } + } +} + diff --git a/devices/extio-handler/virtual-reader.h b/devices/extio-handler/virtual-reader.h new file mode 100644 index 0000000..c02feab --- /dev/null +++ b/devices/extio-handler/virtual-reader.h @@ -0,0 +1,64 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +// +// For the different formats for input, we have +// different readers, with one "mother" reader. +// Note that the cardreader is quite different here +#ifndef __VIRTUAL_READER__ +#define __VIRTUAL_READER__ + +#include +#include +#include "ringbuffer.h" +#include "dab-constants.h" +// +// The virtualReader is the mother of the readers. +// The cardReader is slighty different, however +// made fitting the framework +class virtualReader { +protected: +RingBuffer> *theBuffer; +int32_t blockSize; +public: + virtualReader (RingBuffer> *p, + int32_t rate); +virtual ~virtualReader (void); +virtual void restartReader (int32_t s); +virtual void stopReader (void); +virtual void processData (float IQoffs, void *data, int cnt); +virtual int16_t bitDepth (void); +protected: + int32_t base; + void convertandStore (std::complex *, int32_t); +private: + void setMapper (int32_t, int32_t); + float *mapTable; + int16_t conv; + int16_t inSize; + int16_t outSize; + std::complex *inTable; + std::complex *outTable; + +}; + +#endif + diff --git a/devices/filereader-widget.ui b/devices/filereader-widget.ui new file mode 100644 index 0000000..35ef455 --- /dev/null +++ b/devices/filereader-widget.ui @@ -0,0 +1,70 @@ + + + filereaderWidget + + + + 0 + 0 + 589 + 124 + + + + Qt-DAB File Reader + + + + + 10 + 20 + 571 + 91 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 10 + 20 + 181 + 21 + + + + <html><head/><body><p>Path to file</p></body></html> + + + Playing pre-recorded file: + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + 10 + 50 + 551 + 21 + + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + diff --git a/devices/rawfiles/rawfiles.cpp b/devices/rawfiles/rawfiles.cpp new file mode 100644 index 0000000..4b7ca7d --- /dev/null +++ b/devices/rawfiles/rawfiles.cpp @@ -0,0 +1,171 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * File reader: + * For the (former) files with 8 bit raw data from the + * dabsticks + */ +#include "rawfiles.h" +#include +#include +#include +#include +// +#include +#include + +static inline +int64_t getMyTime (void) { +struct timeval tv; + + gettimeofday (&tv, NULL); + return ((int64_t)tv. tv_sec * 1000000 + (int64_t)tv. tv_usec); +} + +#define INPUT_FRAMEBUFFERSIZE 8 * 32768 +// +// + rawFiles::rawFiles (QString f) { + fileName = f; + myFrame = new QFrame; + setupUi (myFrame); + myFrame -> show (); + _I_Buffer = new RingBuffer(INPUT_FRAMEBUFFERSIZE); + readerOK = false; + filePointer = fopen (f. toUtf8 (). data (), "rb"); + if (filePointer == NULL) { + fprintf (stderr, "file %s cannot open\n", + f. toUtf8 (). data ()); + perror ("file ?"); + delete myFrame; + delete _I_Buffer; + throw (31); + } + nameofFile -> setText (f); + readerOK = true; + readerPausing = true; + currPos = 0; + start (); +} + + rawFiles::~rawFiles (void) { + ExitCondition = true; + if (readerOK) { + while (isRunning ()) + usleep (100); + fclose (filePointer); + } + delete _I_Buffer; + delete myFrame; +} + +bool rawFiles::restartReader (void) { + if (readerOK) + readerPausing = false; + return readerOK; +} + +void rawFiles::stopReader (void) { + if (readerOK) + readerPausing = true; +} + +// size is in I/Q pairs, file contains 8 bits values +int32_t rawFiles::getSamples (std::complex *V, int32_t size) { +int32_t amount, i; +uint8_t *temp = (uint8_t *)alloca (2 * size * sizeof (uint8_t)); + + if (filePointer == NULL) + return 0; + + while ((int32_t)(_I_Buffer -> GetRingBufferReadAvailable ()) < 2 * size) + if (readerPausing) + usleep (100000); + else + msleep (100); + + amount = _I_Buffer -> getDataFromBuffer (temp, 2 * size); + for (i = 0; i < amount / 2; i ++) + V [i] = std::complex (float (temp [2 * i] - 128) / 128.0, + float (temp [2 * i + 1] - 128) / 128.0); + return amount / 2; +} + +int32_t rawFiles::Samples (void) { + return _I_Buffer -> GetRingBufferReadAvailable () / 2; +} + +void rawFiles::run (void) { +int32_t t, i; +uint8_t *bi; +int32_t bufferSize = 32768; +int64_t period; +int64_t nextStop; + + if (!readerOK) + return; + + ExitCondition = false; + + period = (32768 * 1000) / (2 * 2048); // full IQś read + fprintf (stderr, "Period = %ld\n", period); + bi = new uint8_t [bufferSize]; + nextStop = getMyTime (); + while (!ExitCondition) { + if (readerPausing) { + usleep (1000); + nextStop = getMyTime (); + continue; + } + while (_I_Buffer -> WriteSpace () < bufferSize + 10) { + if (ExitCondition) + break; + usleep (100); + } + + nextStop += period; + t = readBuffer (bi, bufferSize); + if (t <= 0) { + for (i = 0; i < bufferSize; i ++) + bi [i] = 0; + t = bufferSize; + } + _I_Buffer -> putDataIntoBuffer (bi, t); + if (nextStop - getMyTime () > 0) + usleep (nextStop - getMyTime ()); + } + fprintf (stderr, "taak voor replay eindigt hier\n"); +} +/* + * length is number of uints that we read. + */ +int32_t rawFiles::readBuffer (uint8_t *data, int32_t length) { +int32_t n; + + n = fread (data, sizeof (uint8_t), length, filePointer); + currPos += n; + if (n < length) { + fseek (filePointer, 0, SEEK_SET); + fprintf (stderr, "End of file, restarting\n"); + } + return n & ~01; +} + diff --git a/devices/rawfiles/rawfiles.h b/devices/rawfiles/rawfiles.h new file mode 100644 index 0000000..2f20af6 --- /dev/null +++ b/devices/rawfiles/rawfiles.h @@ -0,0 +1,66 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __RAW_FILES__ +#define __RAW_FILES__ + +#include +#include +#include +#include "dab-constants.h" +#include "virtual-input.h" +#include "ringbuffer.h" + +#include "ui_filereader-widget.h" + +class QLabel; +class QSettings; +class fileHulp; +/* + */ +class rawFiles: public virtualInput, + public Ui_filereaderWidget, QThread { +public: + + rawFiles (QString); + ~rawFiles (void); + int32_t getSamples (std::complex *, int32_t); + uint8_t myIdentity (void); + int32_t Samples (void); + bool restartReader (void); + void stopReader (void); +private: + QString fileName; +virtual void run (void); + QFrame *myFrame; + int32_t readBuffer (uint8_t *, int32_t); + RingBuffer *_I_Buffer; + int32_t bufferSize; + FILE *filePointer; + bool readerOK; + bool readerPausing; + bool ExitCondition; + bool ThreadFinished; + int64_t currPos; +}; + +#endif + diff --git a/devices/rtl_tcp/rtl_tcp-widget.ui b/devices/rtl_tcp/rtl_tcp-widget.ui new file mode 100644 index 0000000..aed8ffd --- /dev/null +++ b/devices/rtl_tcp/rtl_tcp-widget.ui @@ -0,0 +1,178 @@ + + + rtl_tcp_widget + + + + 0 + 0 + 168 + 237 + + + + rtl-tcp control + + + + + 0 + 0 + 161 + 231 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 10 + 210 + 111 + 21 + + + + rtl_tcp_client + + + + + + 10 + 160 + 141 + 41 + + + + + + + + + + 10 + 10 + 111 + 21 + + + + connect + + + + + + 10 + 40 + 111 + 21 + + + + disconnect + + + + + + 10 + 159 + 131 + 31 + + + + + + + + + + 10 + 70 + 71 + 21 + + + + 999 + + + + + + 10 + 100 + 71 + 21 + + + + -100 + + + + + + 90 + 70 + 51 + 21 + + + + gain + + + + + + 90 + 100 + 61 + 21 + + + + ppm + + + + + + 10 + 130 + 71 + 21 + + + + -100 + + + + + + 90 + 130 + 51 + 21 + + + + Offset + + + + + + + diff --git a/devices/rtl_tcp/rtl_tcp_client.cpp b/devices/rtl_tcp/rtl_tcp_client.cpp new file mode 100644 index 0000000..f9438e2 --- /dev/null +++ b/devices/rtl_tcp/rtl_tcp_client.cpp @@ -0,0 +1,287 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * A simple client for rtl_tcp + */ + +#include +#include +#include +#include +#include +#include +#include +#include "rtl_tcp_client.h" +// +#define DEFAULT_FREQUENCY (Khz (220000)) + + rtl_tcp_client::rtl_tcp_client (QSettings *s) { + remoteSettings = s; + + theFrame = new QFrame; + setupUi (theFrame); + this -> theFrame -> show (); + + // setting the defaults and constants + theRate = 2048000; + remoteSettings -> beginGroup ("rtl_tcp_client"); + theGain = remoteSettings -> + value ("rtl_tcp_client-gain", 20). toInt (); + thePpm = remoteSettings -> + value ("rtl_tcp_client-ppm", 0). toInt (); + vfoOffset = remoteSettings -> + value ("rtl_tcp_client-offset", 0). toInt (); + basePort = remoteSettings -> value ("rtl_tcp_port", 1234).toInt(); + remoteSettings -> endGroup (); + tcp_gain -> setValue (theGain); + tcp_ppm -> setValue (thePpm); + vfoFrequency = DEFAULT_FREQUENCY; + theBuffer = new RingBuffer(32 * 32768); + connected = false; + hostLineEdit = new QLineEdit (NULL); + dumping = false; + + connect (tcp_connect, SIGNAL (clicked (void)), + this, SLOT (wantConnect (void))); + connect (tcp_disconnect, SIGNAL (clicked (void)), + this, SLOT (setDisconnect (void))); + connect (tcp_gain, SIGNAL (valueChanged (int)), + this, SLOT (sendGain (int))); + connect (tcp_ppm, SIGNAL (valueChanged (int)), + this, SLOT (set_fCorrection (int))); + connect (khzOffset, SIGNAL (valueChanged (int)), + this, SLOT (set_Offset (int))); + state -> setText ("waiting to start"); +} + + rtl_tcp_client::~rtl_tcp_client (void) { + remoteSettings -> beginGroup ("rtl_tcp_client"); + if (connected) { // close previous connection + stopReader (); +// streamer. close (); + remoteSettings -> setValue ("remote-server", + toServer. peerAddress (). toString ()); + QByteArray datagram; + } + remoteSettings -> setValue ("rtl_tcp_client-gain", theGain); + remoteSettings -> setValue ("rtl_tcp_client-ppm", thePpm); + remoteSettings -> setValue ("rtl_tcp_client-offset", vfoOffset); + remoteSettings -> endGroup (); + toServer. close (); + delete theBuffer; + delete hostLineEdit; + delete theFrame; +} +// +void rtl_tcp_client::wantConnect (void) { +QString ipAddress; +int16_t i; +QList ipAddressesList = QNetworkInterface::allAddresses(); + + if (connected) + return; + // use the first non-localhost IPv4 address + for (i = 0; i < ipAddressesList.size(); ++i) { + if (ipAddressesList.at (i) != QHostAddress::LocalHost && + ipAddressesList. at (i). toIPv4Address ()) { + ipAddress = ipAddressesList. at(i). toString(); + break; + } + } + // if we did not find one, use IPv4 localhost + if (ipAddress. isEmpty()) + ipAddress = QHostAddress (QHostAddress::LocalHost).toString (); + remoteSettings -> beginGroup ("rtl_tcp_client"); + ipAddress = remoteSettings -> + value ("remote-server", ipAddress). toString (); + remoteSettings -> endGroup (); + hostLineEdit -> setText (ipAddress); + + hostLineEdit -> setInputMask ("000.000.000.000"); +// Setting default IP address + hostLineEdit -> show (); + state -> setText ("Enter IP address, \nthen press return"); + connect (hostLineEdit, SIGNAL (returnPressed (void)), + this, SLOT (setConnection (void))); +} + +// if/when a return is pressed in the line edit, +// a signal appears and we are able to collect the +// inserted text. The format is the IP-V4 format. +// Using this text, we try to connect, +void rtl_tcp_client::setConnection (void) { +QString s = hostLineEdit -> text (); +QHostAddress theAddress = QHostAddress (s); + + serverAddress = QHostAddress (s); + disconnect (hostLineEdit, SIGNAL (returnPressed (void)), + this, SLOT (setConnection (void))); + toServer. connectToHost (serverAddress, basePort); + if (!toServer. waitForConnected (2000)) { + QMessageBox::warning (theFrame, tr ("sdr"), + tr ("connection failed\n")); + return; + } + + sendGain (theGain); + sendRate (theRate); + sendVFO (DEFAULT_FREQUENCY - theRate / 4); + toServer. waitForBytesWritten (); + state -> setText ("Connected"); + connected = true; +} + +int32_t rtl_tcp_client::getRate (void) { + return theRate; +} + +int32_t rtl_tcp_client::defaultFrequency (void) { + return DEFAULT_FREQUENCY; // choose any legal frequency here +} + +void rtl_tcp_client::setVFOFrequency (int32_t newFrequency) { + if (!connected) + return; + vfoFrequency = newFrequency; +// here the command to set the frequency + sendVFO (newFrequency); +} + +int32_t rtl_tcp_client::getVFOFrequency (void) { + return vfoFrequency; +} + +bool rtl_tcp_client::restartReader (void) { + if (connected) + return true; + connect (&toServer, SIGNAL (readyRead (void)), + this, SLOT (readData (void))); + return true; +} + +void rtl_tcp_client::stopReader (void) { + if (connected) + disconnect (&toServer, SIGNAL (readyRead (void)), + this, SLOT (readData (void))); +} +// +// +// The brave old getSamples. For the dab stick, we get +// size: still in I/Q pairs, but we have to convert the data from +// uint8_t to DSPCOMPLEX * +int32_t rtl_tcp_client::getSamples (std::complex *V, int32_t size) { +int32_t amount, i; +uint8_t *tempBuffer = (uint8_t *)alloca (2 * size * sizeof (uint8_t)); +// + amount = theBuffer -> getDataFromBuffer (tempBuffer, 2 * size); + if (dumping) + fwrite (tempBuffer, amount, 1, dumpfilePointer); + + for (i = 0; i < amount / 2; i ++) + V [i] = std::complex + ((float (tempBuffer [2 * i] - 128)) / 128.0, + (float (tempBuffer [2 * i + 1] - 128)) / 128.0); + return amount / 2; +} + +int32_t rtl_tcp_client::Samples (void) { + return theBuffer -> GetRingBufferReadAvailable () / 2; +} +// +int16_t rtl_tcp_client::bitDepth (void) { + return 8; +} + +// These functions are typical for network use +void rtl_tcp_client::readData (void) { +uint8_t buffer [8192]; + while (toServer. bytesAvailable () > 8192) { + toServer. read ((char *)buffer, 8192); + theBuffer -> putDataIntoBuffer (buffer, 8192); + } +} +// +// +// commands are packed in 5 bytes, one "command byte" +// and an integer parameter +struct command { + unsigned char cmd; + unsigned int param; +}__attribute__((packed)); + +#define ONE_BYTE 8 + +void rtl_tcp_client::sendCommand (uint8_t cmd, int32_t param) { +QByteArray datagram; + + datagram. resize (5); + datagram [0] = cmd; // command to set rate + datagram [4] = param & 0xFF; //lsb last + datagram [3] = (param >> ONE_BYTE) & 0xFF; + datagram [2] = (param >> (2 * ONE_BYTE)) & 0xFF; + datagram [1] = (param >> (3 * ONE_BYTE)) & 0xFF; + toServer. write (datagram. data (), datagram. size ()); +} + +void rtl_tcp_client::sendVFO (int32_t frequency) { + sendCommand (0x01, frequency); +} + +void rtl_tcp_client::sendRate (int32_t theRate) { + sendCommand (0x02, theRate); +} + +void rtl_tcp_client::setGainMode (int32_t gainMode) { + sendCommand (0x03, gainMode); +} + +void rtl_tcp_client::sendGain (int gain) { + sendCommand (0x04, 10 * gain); + theGain = gain; +} + +// correction is in ppm +void rtl_tcp_client::set_fCorrection (int32_t ppm) { + sendCommand (0x05, ppm); + thePpm = ppm; +} + +void rtl_tcp_client::setDisconnect (void) { + if (connected) { // close previous connection + stopReader (); + remoteSettings -> beginGroup ("rtl_tcp_client"); + remoteSettings -> setValue ("remote-server", + toServer. peerAddress (). toString ()); + remoteSettings -> setValue ("rtl_tcp_client-gain", theGain); + remoteSettings -> setValue ("rtl_tcp_client-ppm", thePpm); + remoteSettings -> endGroup (); + toServer. close (); + } + connected = false; + connectedLabel -> setText (" "); + state -> setText ("disconnected"); +} + +void rtl_tcp_client::set_Offset (int32_t o) { + sendCommand (0x0a, Khz (o)); + vfoOffset = o; +} + diff --git a/devices/rtl_tcp/rtl_tcp_client.h b/devices/rtl_tcp/rtl_tcp_client.h new file mode 100644 index 0000000..f6cf946 --- /dev/null +++ b/devices/rtl_tcp/rtl_tcp_client.h @@ -0,0 +1,87 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __RTL_TCP_CLIENT__ +#define __RTL_TCP_CLIENT__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "dab-constants.h" +#include "virtual-input.h" +#include "ringbuffer.h" +#include "ui_rtl_tcp-widget.h" + +class rtl_tcp_client: public virtualInput, Ui_rtl_tcp_widget { +Q_OBJECT +public: + rtl_tcp_client (QSettings *); + ~rtl_tcp_client (void); + int32_t getRate (void); + int32_t defaultFrequency (void); + void setVFOFrequency (int32_t); + int32_t getVFOFrequency (void); + bool restartReader (void); + void stopReader (void); + int32_t getSamples (std::complex *V, int32_t size); + int32_t Samples (void); + int16_t bitDepth (void); +private slots: + void sendGain (int); + void set_Offset (int); + void set_fCorrection (int); + void readData (void); + void setConnection (void); + void wantConnect (void); + void setDisconnect (void); +private: + void sendVFO (int32_t); + void sendRate (int32_t); + void setGainMode (int32_t gainMode); + void sendCommand (uint8_t, int32_t); + QLineEdit *hostLineEdit; + bool isvalidRate (int32_t); + QSettings *remoteSettings; + QFrame *theFrame; + int32_t theRate; + int32_t vfoFrequency; + RingBuffer *theBuffer; + bool connected; + int16_t theGain; + int16_t thePpm; + QHostAddress serverAddress; + QTcpSocket toServer; + qint64 basePort; + bool dumping; + FILE *dumpfilePointer; +}; + +#endif + diff --git a/devices/rtlsdr-handler/rtl-dongleselect.cpp b/devices/rtlsdr-handler/rtl-dongleselect.cpp new file mode 100644 index 0000000..86c5dde --- /dev/null +++ b/devices/rtlsdr-handler/rtl-dongleselect.cpp @@ -0,0 +1,64 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "rtl-dongleselect.h" +#include +#include +// +// Whenever there are two or more RT2832 based sticks connected +// to the computer, the user is asked to make a choice. + + rtl_dongleSelect::rtl_dongleSelect (void) { + toptext = new QLabel (this); + toptext -> setText ("Select a dongle"); + selectorDisplay = new QListView (this); + QVBoxLayout *layOut = new QVBoxLayout; + layOut -> addWidget (selectorDisplay); + layOut -> addWidget (toptext); + setWindowTitle (tr("dongle select")); + setLayout (layOut); + + dongleList. setStringList (Dongles); + Dongles = QStringList (); + dongleList. setStringList (Dongles); + selectorDisplay -> setModel (&dongleList); + connect (selectorDisplay, SIGNAL (clicked (QModelIndex)), + this, SLOT (selectDongle (QModelIndex))); + selectedItem = -1; +} + + rtl_dongleSelect::~rtl_dongleSelect (void) { +} + +void rtl_dongleSelect::addtoDongleList (const char *v) { +QString s (v); + + Dongles << s; + dongleList. setStringList (Dongles); + selectorDisplay -> setModel (&dongleList); + selectorDisplay -> adjustSize (); + adjustSize (); +} + +void rtl_dongleSelect::selectDongle (QModelIndex s) { + QDialog::done (s. row ()); +} + diff --git a/devices/rtlsdr-handler/rtl-dongleselect.h b/devices/rtlsdr-handler/rtl-dongleselect.h new file mode 100644 index 0000000..c64942a --- /dev/null +++ b/devices/rtlsdr-handler/rtl-dongleselect.h @@ -0,0 +1,50 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __DONGLE_SELECT__ +#define __DONGLE_SELECT__ +# +#include +#include +#include +#include +#include +#include + +class rtl_dongleSelect: public QDialog { +Q_OBJECT +public: + rtl_dongleSelect (void); + ~rtl_dongleSelect (void); + void addtoDongleList (const char *); +private: + QLabel *toptext; + QListView *selectorDisplay; + QStringListModel dongleList; + QStringList Dongles; + int16_t selectedItem; +private slots: + void selectDongle (QModelIndex); +}; + +#endif + diff --git a/devices/rtlsdr-handler/rtl-sdr.h b/devices/rtlsdr-handler/rtl-sdr.h new file mode 100644 index 0000000..ca89b77 --- /dev/null +++ b/devices/rtlsdr-handler/rtl-sdr.h @@ -0,0 +1,367 @@ +/* + * rtl-sdr, turns your Realtek RTL2832 based DVB dongle into a SDR receiver + * Copyright (C) 2012-2013 by Steve Markgraf + * Copyright (C) 2012 by Dimitri Stolnikov + * + * 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, either version 2 of the License, or + * (at your option) any later version. + * + * 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __RTL_SDR_H +#define __RTL_SDR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +typedef struct rtlsdr_dev rtlsdr_dev_t; + +RTLSDR_API uint32_t rtlsdr_get_device_count(void); + +RTLSDR_API const char* rtlsdr_get_device_name(uint32_t index); + +/*! + * Get USB device strings. + * + * NOTE: The string arguments must provide space for up to 256 bytes. + * + * \param index the device index + * \param manufact manufacturer name, may be NULL + * \param product product name, may be NULL + * \param serial serial number, may be NULL + * \return 0 on success + */ +RTLSDR_API int rtlsdr_get_device_usb_strings(uint32_t index, + char *manufact, + char *product, + char *serial); + +/*! + * Get device index by USB serial string descriptor. + * + * \param serial serial string of the device + * \return device index of first device where the name matched + * \return -1 if name is NULL + * \return -2 if no devices were found at all + * \return -3 if devices were found, but none with matching name + */ +RTLSDR_API int rtlsdr_get_index_by_serial(const char *serial); + +RTLSDR_API int rtlsdr_open(rtlsdr_dev_t **dev, uint32_t index); + +RTLSDR_API int rtlsdr_close(rtlsdr_dev_t *dev); + +/* configuration functions */ + +/*! + * Set crystal oscillator frequencies used for the RTL2832 and the tuner IC. + * + * Usually both ICs use the same clock. Changing the clock may make sense if + * you are applying an external clock to the tuner or to compensate the + * frequency (and samplerate) error caused by the original (cheap) crystal. + * + * NOTE: Call this function only if you fully understand the implications. + * + * \param dev the device handle given by rtlsdr_open() + * \param rtl_freq frequency value used to clock the RTL2832 in Hz + * \param tuner_freq frequency value used to clock the tuner IC in Hz + * \return 0 on success + */ +RTLSDR_API int rtlsdr_set_xtal_freq(rtlsdr_dev_t *dev, uint32_t rtl_freq, + uint32_t tuner_freq); + +/*! + * Get crystal oscillator frequencies used for the RTL2832 and the tuner IC. + * + * Usually both ICs use the same clock. + * + * \param dev the device handle given by rtlsdr_open() + * \param rtl_freq frequency value used to clock the RTL2832 in Hz + * \param tuner_freq frequency value used to clock the tuner IC in Hz + * \return 0 on success + */ +RTLSDR_API int rtlsdr_get_xtal_freq(rtlsdr_dev_t *dev, uint32_t *rtl_freq, + uint32_t *tuner_freq); + +/*! + * Get USB device strings. + * + * NOTE: The string arguments must provide space for up to 256 bytes. + * + * \param dev the device handle given by rtlsdr_open() + * \param manufact manufacturer name, may be NULL + * \param product product name, may be NULL + * \param serial serial number, may be NULL + * \return 0 on success + */ +RTLSDR_API int rtlsdr_get_usb_strings(rtlsdr_dev_t *dev, char *manufact, + char *product, char *serial); + +/*! + * Write the device EEPROM + * + * \param dev the device handle given by rtlsdr_open() + * \param data buffer of data to be written + * \param offset address where the data should be written + * \param len length of the data + * \return 0 on success + * \return -1 if device handle is invalid + * \return -2 if EEPROM size is exceeded + * \return -3 if no EEPROM was found + */ + +RTLSDR_API int rtlsdr_write_eeprom(rtlsdr_dev_t *dev, uint8_t *data, + uint8_t offset, uint16_t len); + +/*! + * Read the device EEPROM + * + * \param dev the device handle given by rtlsdr_open() + * \param data buffer where the data should be written + * \param offset address where the data should be read from + * \param len length of the data + * \return 0 on success + * \return -1 if device handle is invalid + * \return -2 if EEPROM size is exceeded + * \return -3 if no EEPROM was found + */ + +RTLSDR_API int rtlsdr_read_eeprom(rtlsdr_dev_t *dev, uint8_t *data, + uint8_t offset, uint16_t len); + +RTLSDR_API int rtlsdr_set_center_freq(rtlsdr_dev_t *dev, uint32_t freq); + +/*! + * Get actual frequency the device is tuned to. + * + * \param dev the device handle given by rtlsdr_open() + * \return 0 on error, frequency in Hz otherwise + */ +RTLSDR_API uint32_t rtlsdr_get_center_freq(rtlsdr_dev_t *dev); + +/*! + * Set the frequency correction value for the device. + * + * \param dev the device handle given by rtlsdr_open() + * \param ppm correction value in parts per million (ppm) + * \return 0 on success + */ +RTLSDR_API int rtlsdr_set_freq_correction(rtlsdr_dev_t *dev, int ppm); + +/*! + * Get actual frequency correction value of the device. + * + * \param dev the device handle given by rtlsdr_open() + * \return correction value in parts per million (ppm) + */ +RTLSDR_API int rtlsdr_get_freq_correction(rtlsdr_dev_t *dev); + +enum rtlsdr_tuner { + RTLSDR_TUNER_UNKNOWN = 0, + RTLSDR_TUNER_E4000, + RTLSDR_TUNER_FC0012, + RTLSDR_TUNER_FC0013, + RTLSDR_TUNER_FC2580, + RTLSDR_TUNER_R820T, + RTLSDR_TUNER_R828D +}; + +/*! + * Get the tuner type. + * + * \param dev the device handle given by rtlsdr_open() + * \return RTLSDR_TUNER_UNKNOWN on error, tuner type otherwise + */ +RTLSDR_API enum rtlsdr_tuner rtlsdr_get_tuner_type(rtlsdr_dev_t *dev); + +/*! + * Get a list of gains supported by the tuner. + * + * NOTE: The gains argument must be preallocated by the caller. If NULL is + * being given instead, the number of available gain values will be returned. + * + * \param dev the device handle given by rtlsdr_open() + * \param gains array of gain values. In tenths of a dB, 115 means 11.5 dB. + * \return <= 0 on error, number of available (returned) gain values otherwise + */ +RTLSDR_API int rtlsdr_get_tuner_gains(rtlsdr_dev_t *dev, int *gains); + +/*! + * Set the gain for the device. + * Manual gain mode must be enabled for this to work. + * + * Valid gain values (in tenths of a dB) for the E4000 tuner: + * -10, 15, 40, 65, 90, 115, 140, 165, 190, + * 215, 240, 290, 340, 420, 430, 450, 470, 490 + * + * Valid gain values may be queried with \ref rtlsdr_get_tuner_gains function. + * + * \param dev the device handle given by rtlsdr_open() + * \param gain in tenths of a dB, 115 means 11.5 dB. + * \return 0 on success + */ +RTLSDR_API int rtlsdr_set_tuner_gain(rtlsdr_dev_t *dev, int gain); + +/*! + * Get actual gain the device is configured to. + * + * \param dev the device handle given by rtlsdr_open() + * \return 0 on error, gain in tenths of a dB, 115 means 11.5 dB. + */ +RTLSDR_API int rtlsdr_get_tuner_gain(rtlsdr_dev_t *dev); + +/*! + * Set the intermediate frequency gain for the device. + * + * \param dev the device handle given by rtlsdr_open() + * \param stage intermediate frequency gain stage number (1 to 6 for E4000) + * \param gain in tenths of a dB, -30 means -3.0 dB. + * \return 0 on success + */ +RTLSDR_API int rtlsdr_set_tuner_if_gain(rtlsdr_dev_t *dev, int stage, int gain); + +/*! + * Set the gain mode (automatic/manual) for the device. + * Manual gain mode must be enabled for the gain setter function to work. + * + * \param dev the device handle given by rtlsdr_open() + * \param manual gain mode, 1 means manual gain mode shall be enabled. + * \return 0 on success + */ +RTLSDR_API int rtlsdr_set_tuner_gain_mode(rtlsdr_dev_t *dev, int manual); + +/* this will select the baseband filters according to the requested sample rate */ +RTLSDR_API int rtlsdr_set_sample_rate(rtlsdr_dev_t *dev, uint32_t rate); + +/*! + * Get actual sample rate the device is configured to. + * + * \param dev the device handle given by rtlsdr_open() + * \return 0 on error, sample rate in Hz otherwise + */ +RTLSDR_API uint32_t rtlsdr_get_sample_rate(rtlsdr_dev_t *dev); + +/*! + * Enable test mode that returns an 8 bit counter instead of the samples. + * The counter is generated inside the RTL2832. + * + * \param dev the device handle given by rtlsdr_open() + * \param test mode, 1 means enabled, 0 disabled + * \return 0 on success + */ +RTLSDR_API int rtlsdr_set_testmode(rtlsdr_dev_t *dev, int on); + +/*! + * Enable or disable the internal digital AGC of the RTL2832. + * + * \param dev the device handle given by rtlsdr_open() + * \param digital AGC mode, 1 means enabled, 0 disabled + * \return 0 on success + */ +RTLSDR_API int rtlsdr_set_agc_mode(rtlsdr_dev_t *dev, int on); + +/*! + * Enable or disable the direct sampling mode. When enabled, the IF mode + * of the RTL2832 is activated, and rtlsdr_set_center_freq() will control + * the IF-frequency of the DDC, which can be used to tune from 0 to 28.8 MHz + * (xtal frequency of the RTL2832). + * + * \param dev the device handle given by rtlsdr_open() + * \param on 0 means disabled, 1 I-ADC input enabled, 2 Q-ADC input enabled + * \return 0 on success + */ +RTLSDR_API int rtlsdr_set_direct_sampling(rtlsdr_dev_t *dev, int on); + +/*! + * Get state of the direct sampling mode + * + * \param dev the device handle given by rtlsdr_open() + * \return -1 on error, 0 means disabled, 1 I-ADC input enabled + * 2 Q-ADC input enabled + */ +RTLSDR_API int rtlsdr_get_direct_sampling(rtlsdr_dev_t *dev); + +/*! + * Enable or disable offset tuning for zero-IF tuners, which allows to avoid + * problems caused by the DC offset of the ADCs and 1/f noise. + * + * \param dev the device handle given by rtlsdr_open() + * \param on 0 means disabled, 1 enabled + * \return 0 on success + */ +RTLSDR_API int rtlsdr_set_offset_tuning(rtlsdr_dev_t *dev, int on); + +/*! + * Get state of the offset tuning mode + * + * \param dev the device handle given by rtlsdr_open() + * \return -1 on error, 0 means disabled, 1 enabled + */ +RTLSDR_API int rtlsdr_get_offset_tuning(rtlsdr_dev_t *dev); + +/* streaming functions */ + +RTLSDR_API int rtlsdr_reset_buffer(rtlsdr_dev_t *dev); + +RTLSDR_API int rtlsdr_read_sync(rtlsdr_dev_t *dev, void *buf, int len, int *n_read); + +typedef void(*rtlsdr_read_async_cb_t)(unsigned char *buf, uint32_t len, void *ctx); + +/*! + * Read samples from the device asynchronously. This function will block until + * it is being canceled using rtlsdr_cancel_async() + * + * NOTE: This function is deprecated and is subject for removal. + * + * \param dev the device handle given by rtlsdr_open() + * \param cb callback function to return received samples + * \param ctx user specific context to pass via the callback function + * \return 0 on success + */ +RTLSDR_API int rtlsdr_wait_async(rtlsdr_dev_t *dev, rtlsdr_read_async_cb_t cb, void *ctx); + +/*! + * Read samples from the device asynchronously. This function will block until + * it is being canceled using rtlsdr_cancel_async() + * + * \param dev the device handle given by rtlsdr_open() + * \param cb callback function to return received samples + * \param ctx user specific context to pass via the callback function + * \param buf_num optional buffer count, buf_num * buf_len = overall buffer size + * set to 0 for default buffer count (32) + * \param buf_len optional buffer length, must be multiple of 512, + * set to 0 for default buffer length (16 * 32 * 512) + * \return 0 on success + */ +RTLSDR_API int rtlsdr_read_async(rtlsdr_dev_t *dev, + rtlsdr_read_async_cb_t cb, + void *ctx, + uint32_t buf_num, + uint32_t buf_len); + +/*! + * Cancel all pending asynchronous operations on the device. + * + * \param dev the device handle given by rtlsdr_open() + * \return 0 on success + */ +RTLSDR_API int rtlsdr_cancel_async(rtlsdr_dev_t *dev); + +#ifdef __cplusplus +} +#endif + +#endif /* __RTL_SDR_H */ diff --git a/devices/rtlsdr-handler/rtl-sdr_export.h b/devices/rtlsdr-handler/rtl-sdr_export.h new file mode 100644 index 0000000..69e178d --- /dev/null +++ b/devices/rtlsdr-handler/rtl-sdr_export.h @@ -0,0 +1,47 @@ +/* + * rtl-sdr, turns your Realtek RTL2832 based DVB dongle into a SDR receiver + * Copyright (C) 2012 by Hoernchen + * + * 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, either version 2 of the License, or + * (at your option) any later version. + * + * 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef RTLSDR_EXPORT_H +#define RTLSDR_EXPORT_H + +#if defined __GNUC__ +# if __GNUC__ >= 4 +# define __SDR_EXPORT __attribute__((visibility("default"))) +# define __SDR_IMPORT __attribute__((visibility("default"))) +# else +# define __SDR_EXPORT +# define __SDR_IMPORT +# endif +#elif _MSC_VER +# define __SDR_EXPORT __declspec(dllexport) +# define __SDR_IMPORT __declspec(dllimport) +#else +# define __SDR_EXPORT +# define __SDR_IMPORT +#endif + +#ifndef rtlsdr_STATIC +# ifdef rtlsdr_EXPORTS +# define RTLSDR_API __SDR_EXPORT +# else +# define RTLSDR_API __SDR_IMPORT +# endif +#else +#define RTLSDR_API +#endif +#endif /* RTLSDR_EXPORT_H */ diff --git a/devices/rtlsdr-handler/rtlsdr-handler.cpp b/devices/rtlsdr-handler/rtlsdr-handler.cpp new file mode 100644 index 0000000..8207cb5 --- /dev/null +++ b/devices/rtlsdr-handler/rtlsdr-handler.cpp @@ -0,0 +1,546 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-SDR; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * This particular driver is a very simple wrapper around the + * librtlsdr. In order to keep things simple, we dynamically + * load the dll (or .so). The librtlsdr is osmocom software and all rights + * are greatly acknowledged + */ + +#include +#include +#include +#include "rtlsdr-handler.h" +#include "rtl-dongleselect.h" +#include "rtl-sdr.h" + +#ifdef __MINGW32__ +#define GETPROCADDRESS GetProcAddress +#else +#define GETPROCADDRESS dlsym +#endif + +#define READLEN_DEFAULT 8192 +// +// For the callback, we do need some environment which +// is passed through the ctx parameter +// +// This is the user-side call back function +// ctx is the calling task +static +void RTLSDRCallBack (uint8_t *buf, uint32_t len, void *ctx) { +rtlsdrHandler *theStick = (rtlsdrHandler *)ctx; + + if ((theStick == NULL) || (len != READLEN_DEFAULT)) + return; + + (void)theStick -> _I_Buffer -> putDataIntoBuffer (buf, len); +} +// +// for handling the events in libusb, we need a controlthread +// whose sole purpose is to process the rtlsdr_read_async function +// from the lib. +class dll_driver : public QThread { +private: + rtlsdrHandler *theStick; +public: + + dll_driver (rtlsdrHandler *d) { + theStick = d; + start (); + } + + ~dll_driver (void) { + } + +private: +virtual void run (void) { + (theStick -> rtlsdr_read_async) (theStick -> device, + (rtlsdr_read_async_cb_t)&RTLSDRCallBack, + (void *)theStick, + 0, + READLEN_DEFAULT); + } +}; +// +// Our wrapper is a simple classs + rtlsdrHandler::rtlsdrHandler (QSettings *s) { +int16_t deviceCount; +int32_t r; +int16_t deviceIndex; +int16_t i; +QString temp; +int k; + + rtlsdrSettings = s; + this -> myFrame = new QFrame (NULL); + setupUi (this -> myFrame); + this -> myFrame -> show (); + inputRate = 2048000; + libraryLoaded = false; + open = false; + _I_Buffer = NULL; + workerHandle = NULL; + lastFrequency = KHz (22000); // just a dummy + this -> vfoOffset = 0; + gains = NULL; + +#ifdef __MINGW32__ + const char *libraryString = "rtlsdr.dll"; + Handle = LoadLibrary ((wchar_t *)L"rtlsdr.dll"); +#else + const char *libraryString = "librtlsdr.so"; + Handle = dlopen ("librtlsdr.so", RTLD_NOW); +#endif + + if (Handle == NULL) { + fprintf (stderr, "failed to open %s\n", libraryString); + delete myFrame; + throw (20); + } + + libraryLoaded = true; + if (!load_rtlFunctions ()) { +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + delete myFrame; + throw (21); + } +// +// Ok, from here we have the library functions accessible + deviceCount = this -> rtlsdr_get_device_count (); + if (deviceCount == 0) { + fprintf (stderr, "No devices found\n"); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + delete myFrame; + throw (22); + } + + deviceIndex = 0; // default + if (deviceCount > 1) { + rtl_dongleSelect dongleSelector; + for (deviceIndex = 0; deviceIndex < deviceCount; deviceIndex ++) { + dongleSelector. + addtoDongleList (rtlsdr_get_device_name (deviceIndex)); + } + deviceIndex = dongleSelector. QDialog::exec (); + } +// +// OK, now open the hardware + r = this -> rtlsdr_open (&device, deviceIndex); + if (r < 0) { + fprintf (stderr, "Opening rtlsdr device failed\n"); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + delete myFrame; + throw (23); + } + + open = true; + r = this -> rtlsdr_set_sample_rate (device, + inputRate); + if (r < 0) { + fprintf (stderr, "Setting samplerate failed\n"); + rtlsdr_close (device); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + delete myFrame; + throw (24); + } + + r = this -> rtlsdr_get_sample_rate (device); + fprintf (stderr, "samplerate set to %d\n", r); + + gainsCount = rtlsdr_get_tuner_gains (device, NULL); + fprintf(stderr, "Supported gain values (%d): ", gainsCount); + gains = new int [gainsCount]; + gainsCount = rtlsdr_get_tuner_gains (device, gains); + for (i = gainsCount; i > 0; i--) { + fprintf(stderr, "%.1f ", gains [i - 1] / 10.0); + combo_gain -> addItem (QString::number (gains [i - 1])); + } + fprintf(stderr, "\n"); + + rtlsdr_set_tuner_gain_mode (device, 1); + + _I_Buffer = new RingBuffer(8 * 1024 * 1024); + + theGain = gains [gainsCount / 2]; // default +// +// See what the saved values are and restore the GUI settings + rtlsdrSettings -> beginGroup ("rtlsdrSettings"); + coarseOffset = rtlsdrSettings -> value ("rtlsdrOffset", 0). toInt (); + temp = rtlsdrSettings -> value ("externalGain", "10"). toString (); + k = combo_gain -> findText (temp); + if (k != -1) { + combo_gain -> setCurrentIndex (k); + theGain = temp. toInt (); + } + + temp = rtlsdrSettings -> value ("autogain", + "autogain_on"). toString (); + k = combo_autogain -> findText (temp); + if (k != -1) + combo_autogain -> setCurrentIndex (k); + + + ppm_correction -> setValue (rtlsdrSettings -> value ("ppm_correction", 0). toInt ()); + KhzOffset -> setValue (rtlsdrSettings -> value ("KhzOffset", 0). toInt ()); + rtlsdrSettings -> endGroup (); +// +// all sliders/values are set to previous values, now do the settings +// based on these slider values + rtlsdr_set_tuner_gain_mode (device, + combo_autogain -> currentText () == "autogain_on"); + if (combo_autogain -> currentText () == "autogain_on") + rtlsdr_set_agc_mode (device, 1); + else + rtlsdr_set_agc_mode (device, 0); + rtlsdr_set_tuner_gain (device, theGain); + set_ppmCorrection (ppm_correction -> value ()); + set_KhzOffset (KhzOffset -> value ()); +// + dumping = false; +// and attach the buttons/sliders to the actions + connect (combo_gain, SIGNAL (activated (const QString &)), + this, SLOT (set_ExternalGain (const QString &))); + connect (combo_autogain, SIGNAL (activated (const QString &)), + this, SLOT (set_autogain (const QString &))); + connect (ppm_correction, SIGNAL (valueChanged (int)), + this, SLOT (set_ppmCorrection (int))); + connect (KhzOffset, SIGNAL (valueChanged (int)), + this, SLOT (set_KhzOffset (int))); + connect (dumpButton, SIGNAL (clicked (void)), + this, SLOT (dumpButton_pressed (void))); +} + + rtlsdrHandler::~rtlsdrHandler (void) { + if (Handle == NULL) { // nothing achieved earlier on + delete myFrame; + return; + } + + if (!open) { +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + return; + } + + stopReader (); + rtlsdrSettings -> beginGroup ("rtlsdrSettings"); + rtlsdrSettings -> setValue ("rtlsdrOffset", coarseOffset); + rtlsdrSettings -> setValue ("externalGain", + combo_gain -> currentText ()); + rtlsdrSettings -> setValue ("autogain", + combo_autogain -> currentText ()); + rtlsdrSettings -> setValue ("ppm_correction", + ppm_correction -> value ()); + rtlsdrSettings -> setValue ("KhzOffset", + KhzOffset -> value ()); + rtlsdrSettings -> sync (); + rtlsdrSettings -> endGroup (); + + this -> rtlsdr_close (device); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + if (_I_Buffer != NULL) + delete _I_Buffer; + if (gains != NULL) + delete[] gains; + delete myFrame; +} + +void rtlsdrHandler::setVFOFrequency (int32_t f) { + lastFrequency = f; + (void)(this -> rtlsdr_set_center_freq (device, f + vfoOffset)); +} + +int32_t rtlsdrHandler::getVFOFrequency (void) { + return (int32_t)(this -> rtlsdr_get_center_freq (device)) - vfoOffset; +} +// +// +bool rtlsdrHandler::restartReader (void) { +int32_t r; + + if (workerHandle != NULL) + return true; + + _I_Buffer -> FlushRingBuffer (); + r = this -> rtlsdr_reset_buffer (device); + if (r < 0) + return false; + + this -> rtlsdr_set_center_freq (device, lastFrequency + vfoOffset); + workerHandle = new dll_driver (this); + rtlsdr_set_agc_mode (device, + combo_autogain -> currentText () == "autogain_on" ? 1 : 0); + rtlsdr_set_tuner_gain (device, theGain); + return true; +} + +void rtlsdrHandler::stopReader (void) { + if (workerHandle == NULL) + return; + if (workerHandle != NULL) { // we are running + this -> rtlsdr_cancel_async (device); + if (workerHandle != NULL) { + while (!workerHandle -> isFinished ()) + usleep (100); + delete workerHandle; + } + } + workerHandle = NULL; +} +// +// when selecting the gain from a table, use the table value +void rtlsdrHandler::set_ExternalGain (const QString &gain) { + theGain = gain. toInt (); + rtlsdr_set_tuner_gain (device, gain. toInt ()); +} +// +void rtlsdrHandler::set_autogain (const QString &autogain) { + rtlsdr_set_agc_mode (device, autogain == "autogain_off" ? 0 : 1); + rtlsdr_set_tuner_gain (device, theGain); +} +// +// correction is in Hz +void rtlsdrHandler::set_ppmCorrection (int32_t ppm) { + this -> rtlsdr_set_freq_correction (device, ppm); +} + +void rtlsdrHandler::set_KhzOffset (int32_t o) { + vfoOffset = Khz (o); + (void)(this -> rtlsdr_set_center_freq (device, lastFrequency + vfoOffset)); +} + +// +// The brave old getSamples. For the dab stick, we get +// size samples: still in I/Q pairs, but we have to convert the data from +// uint8_t to DSPCOMPLEX * +int32_t rtlsdrHandler::getSamples (std::complex *V, int32_t size) { +int32_t amount, i; +uint8_t *tempBuffer = (uint8_t *)alloca (2 * size * sizeof (uint8_t)); +// + amount = _I_Buffer -> getDataFromBuffer (tempBuffer, 2 * size); + if (dumping) + fwrite (tempBuffer, amount, 1, dumpfilePointer); + + for (i = 0; i < amount / 2; i ++) + V [i] = std::complex + ((float (tempBuffer [2 * i] - 128)) / 128.0, + (float (tempBuffer [2 * i + 1] - 128)) / 128.0); + return amount / 2; +} + +int32_t rtlsdrHandler::Samples (void) { + return _I_Buffer -> GetRingBufferReadAvailable () / 2; +} +// + +bool rtlsdrHandler::load_rtlFunctions (void) { +// +// link the required procedures + rtlsdr_open = (pfnrtlsdr_open) + GETPROCADDRESS (Handle, "rtlsdr_open"); + if (rtlsdr_open == NULL) { + fprintf (stderr, "Could not find rtlsdr_open\n"); + return false; + } + rtlsdr_close = (pfnrtlsdr_close) + GETPROCADDRESS (Handle, "rtlsdr_close"); + if (rtlsdr_close == NULL) { + fprintf (stderr, "Could not find rtlsdr_close\n"); + return false; + } + + rtlsdr_set_sample_rate = + (pfnrtlsdr_set_sample_rate)GETPROCADDRESS (Handle, "rtlsdr_set_sample_rate"); + if (rtlsdr_set_sample_rate == NULL) { + fprintf (stderr, "Could not find rtlsdr_set_sample_rate\n"); + return false; + } + + rtlsdr_get_sample_rate = + (pfnrtlsdr_get_sample_rate)GETPROCADDRESS (Handle, "rtlsdr_get_sample_rate"); + if (rtlsdr_get_sample_rate == NULL) { + fprintf (stderr, "Could not find rtlsdr_get_sample_rate\n"); + return false; + } + + rtlsdr_get_tuner_gains = (pfnrtlsdr_get_tuner_gains) + GETPROCADDRESS (Handle, "rtlsdr_get_tuner_gains"); + if (rtlsdr_get_tuner_gains == NULL) { + fprintf (stderr, "Could not find rtlsdr_get_tuner_gains\n"); + return false; + } + + + rtlsdr_set_tuner_gain_mode = (pfnrtlsdr_set_tuner_gain_mode) + GETPROCADDRESS (Handle, "rtlsdr_set_tuner_gain_mode"); + if (rtlsdr_set_tuner_gain_mode == NULL) { + fprintf (stderr, "Could not find rtlsdr_set_tuner_gain_mode\n"); + return false; + } + + rtlsdr_set_agc_mode = (pfnrtlsdr_set_agc_mode) + GETPROCADDRESS (Handle, "rtlsdr_set_agc_mode"); + if (rtlsdr_set_agc_mode == NULL) { + fprintf (stderr, "Could not find rtlsdr_set_agc_mode\n"); + return false; + } + + rtlsdr_set_tuner_gain = (pfnrtlsdr_set_tuner_gain) + GETPROCADDRESS (Handle, "rtlsdr_set_tuner_gain"); + if (rtlsdr_set_tuner_gain == NULL) { + fprintf (stderr, "Cound not find rtlsdr_set_tuner_gain\n"); + return false; + } + + rtlsdr_get_tuner_gain = (pfnrtlsdr_get_tuner_gain) + GETPROCADDRESS (Handle, "rtlsdr_get_tuner_gain"); + if (rtlsdr_get_tuner_gain == NULL) { + fprintf (stderr, "Could not find rtlsdr_get_tuner_gain\n"); + return false; + } + rtlsdr_set_center_freq = (pfnrtlsdr_set_center_freq) + GETPROCADDRESS (Handle, "rtlsdr_set_center_freq"); + if (rtlsdr_set_center_freq == NULL) { + fprintf (stderr, "Could not find rtlsdr_set_center_freq\n"); + return false; + } + + rtlsdr_get_center_freq = (pfnrtlsdr_get_center_freq) + GETPROCADDRESS (Handle, "rtlsdr_get_center_freq"); + if (rtlsdr_get_center_freq == NULL) { + fprintf (stderr, "Could not find rtlsdr_get_center_freq\n"); + return false; + } + + rtlsdr_reset_buffer = (pfnrtlsdr_reset_buffer) + GETPROCADDRESS (Handle, "rtlsdr_reset_buffer"); + if (rtlsdr_reset_buffer == NULL) { + fprintf (stderr, "Could not find rtlsdr_reset_buffer\n"); + return false; + } + + rtlsdr_read_async = (pfnrtlsdr_read_async) + GETPROCADDRESS (Handle, "rtlsdr_read_async"); + if (rtlsdr_read_async == NULL) { + fprintf (stderr, "Cound not find rtlsdr_read_async\n"); + return false; + } + + rtlsdr_get_device_count = (pfnrtlsdr_get_device_count) + GETPROCADDRESS (Handle, "rtlsdr_get_device_count"); + if (rtlsdr_get_device_count == NULL) { + fprintf (stderr, "Could not find rtlsdr_get_device_count\n"); + return false; + } + + rtlsdr_cancel_async = (pfnrtlsdr_cancel_async) + GETPROCADDRESS (Handle, "rtlsdr_cancel_async"); + if (rtlsdr_cancel_async == NULL) { + fprintf (stderr, "Could not find rtlsdr_cancel_async\n"); + return false; + } + + rtlsdr_set_direct_sampling = (pfnrtlsdr_set_direct_sampling) + GETPROCADDRESS (Handle, "rtlsdr_set_direct_sampling"); + if (rtlsdr_set_direct_sampling == NULL) { + fprintf (stderr, "Could not find rtlsdr_set_direct_sampling\n"); + return false; + } + + rtlsdr_set_freq_correction = (pfnrtlsdr_set_freq_correction) + GETPROCADDRESS (Handle, "rtlsdr_set_freq_correction"); + if (rtlsdr_set_freq_correction == NULL) { + fprintf (stderr, "Could not find rtlsdr_set_freq_correction\n"); + return false; + } + + rtlsdr_get_device_name = (pfnrtlsdr_get_device_name) + GETPROCADDRESS (Handle, "rtlsdr_get_device_name"); + if (rtlsdr_get_device_name == NULL) { + fprintf (stderr, "Could not find rtlsdr_get_device_name\n"); + return false; + } + + fprintf (stderr, "OK, functions seem to be loaded\n"); + return true; +} + +void rtlsdrHandler::resetBuffer (void) { + _I_Buffer -> FlushRingBuffer (); +} + +int16_t rtlsdrHandler::maxGain (void) { + return gainsCount; +} + +int16_t rtlsdrHandler::bitDepth (void) { + return 8; +} + +void rtlsdrHandler::dumpButton_pressed (void) { + if (!dumping) { + QString file = QFileDialog::getSaveFileName (NULL, + tr ("Save file ..."), + QDir::homePath (), + tr ("iq file (*.iq)")); + if (file == QString ("")) + return; + file = QDir::toNativeSeparators (file); + if (!file.endsWith (".iq", Qt::CaseInsensitive)) + file.append (".iq"); + dumpfilePointer = fopen (file. toLatin1 (). data (), "w+b"); + if (dumpfilePointer == NULL) + return; + dumpButton -> setText ("WRITING"); + dumping = true; + } + else { + dumping = false; + fclose (dumpfilePointer); + dumpfilePointer = NULL; + dumpButton -> setText ("write raw bytes"); + } +} + diff --git a/devices/rtlsdr-handler/rtlsdr-handler.h b/devices/rtlsdr-handler/rtlsdr-handler.h new file mode 100644 index 0000000..16ff7c4 --- /dev/null +++ b/devices/rtlsdr-handler/rtlsdr-handler.h @@ -0,0 +1,132 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Many of the ideas as implemented in Qt-DAB are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef __RTLSDR_HANDLER__ +#define __RTLSDR_HANDLER__ + +#include +#include +#include +#include "dab-constants.h" +#include "virtual-input.h" +#include "ringbuffer.h" +#include "ui_rtlsdr-widget.h" +class dll_driver; +// +// create typedefs for the library functions +typedef struct rtlsdr_dev rtlsdr_dev_t; +extern "C" { +typedef void (*rtlsdr_read_async_cb_t) (uint8_t *buf, uint32_t len, void *ctx); +typedef int (* pfnrtlsdr_open )(rtlsdr_dev_t **, uint32_t); +typedef int (* pfnrtlsdr_close) (rtlsdr_dev_t *); +typedef int (* pfnrtlsdr_set_center_freq) (rtlsdr_dev_t *, uint32_t); +typedef uint32_t (* pfnrtlsdr_get_center_freq) (rtlsdr_dev_t *); +typedef int (* pfnrtlsdr_get_tuner_gains) (rtlsdr_dev_t *, int *); +typedef int (* pfnrtlsdr_set_tuner_gain_mode) (rtlsdr_dev_t *, int); +typedef int (* pfnrtlsdr_set_agc_mode) (rtlsdr_dev_t *, int); +typedef int (* pfnrtlsdr_set_sample_rate) (rtlsdr_dev_t *, uint32_t); +typedef int (* pfnrtlsdr_get_sample_rate) (rtlsdr_dev_t *); +typedef int (* pfnrtlsdr_set_tuner_gain) (rtlsdr_dev_t *, int); +typedef int (* pfnrtlsdr_get_tuner_gain) (rtlsdr_dev_t *); +typedef int (* pfnrtlsdr_reset_buffer) (rtlsdr_dev_t *); +typedef int (* pfnrtlsdr_read_async) (rtlsdr_dev_t *, + rtlsdr_read_async_cb_t, + void *, + uint32_t, + uint32_t); +typedef int (* pfnrtlsdr_cancel_async) (rtlsdr_dev_t *); +typedef int (* pfnrtlsdr_set_direct_sampling) (rtlsdr_dev_t *, int); +typedef uint32_t (* pfnrtlsdr_get_device_count) (void); +typedef int (* pfnrtlsdr_set_freq_correction)(rtlsdr_dev_t *, int); +typedef char *(* pfnrtlsdr_get_device_name)(int); +} +// This class is a simple wrapper around the +// rtlsdr library that is read in as dll (or .so file in linux) +// It does not do any processing +class rtlsdrHandler: public virtualInput, public Ui_dabstickWidget { +Q_OBJECT +public: + rtlsdrHandler (QSettings *); + ~rtlsdrHandler (void); + void setVFOFrequency (int32_t); + int32_t getVFOFrequency (void); +// interface to the reader + bool restartReader (void); + void stopReader (void); + int32_t getSamples (std::complex *, int32_t); + int32_t Samples (void); + void resetBuffer (void); + int16_t maxGain (void); + int16_t bitDepth (void); +// +// These need to be visible for the separate usb handling thread + RingBuffer *_I_Buffer; + pfnrtlsdr_read_async rtlsdr_read_async; + struct rtlsdr_dev *device; +private: + QFrame *myFrame; + QSettings *rtlsdrSettings; + int32_t inputRate; + int32_t deviceCount; + HINSTANCE Handle; + dll_driver *workerHandle; + int32_t lastFrequency; + bool libraryLoaded; + bool open; + int *gains; + int16_t gainsCount; + bool dumping; + FILE *dumpfilePointer; +// here we need to load functions from the dll + bool load_rtlFunctions (void); + pfnrtlsdr_open rtlsdr_open; + pfnrtlsdr_close rtlsdr_close; + + pfnrtlsdr_set_center_freq rtlsdr_set_center_freq; + pfnrtlsdr_get_center_freq rtlsdr_get_center_freq; + pfnrtlsdr_get_tuner_gains rtlsdr_get_tuner_gains; + pfnrtlsdr_set_tuner_gain_mode rtlsdr_set_tuner_gain_mode; + pfnrtlsdr_set_agc_mode rtlsdr_set_agc_mode; + pfnrtlsdr_set_sample_rate rtlsdr_set_sample_rate; + pfnrtlsdr_get_sample_rate rtlsdr_get_sample_rate; + pfnrtlsdr_set_tuner_gain rtlsdr_set_tuner_gain; + pfnrtlsdr_get_tuner_gain rtlsdr_get_tuner_gain; + pfnrtlsdr_reset_buffer rtlsdr_reset_buffer; + pfnrtlsdr_cancel_async rtlsdr_cancel_async; + pfnrtlsdr_set_direct_sampling rtlsdr_set_direct_sampling; + pfnrtlsdr_get_device_count rtlsdr_get_device_count; + pfnrtlsdr_set_freq_correction rtlsdr_set_freq_correction; + pfnrtlsdr_get_device_name rtlsdr_get_device_name; +private slots: + void set_ExternalGain (const QString &); + void set_autogain (const QString &); + void set_ppmCorrection (int); + void set_KhzOffset (int); + void dumpButton_pressed (void); +}; +#endif + diff --git a/devices/rtlsdr-handler/rtlsdr-widget.ui b/devices/rtlsdr-handler/rtlsdr-widget.ui new file mode 100644 index 0000000..bf87c32 --- /dev/null +++ b/devices/rtlsdr-handler/rtlsdr-widget.ui @@ -0,0 +1,162 @@ + + + dabstickWidget + + + + 0 + 0 + 260 + 258 + + + + RT2832 dabstick + + + + + 0 + 0 + 221 + 231 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 10 + 150 + 101 + 21 + + + + dabstick + + + + + + 10 + 10 + 91 + 21 + + + + -100 + + + 100 + + + + + + 10 + 40 + 91 + 21 + + + + -100 + + + 100 + + + + + + 110 + 40 + 41 + 21 + + + + KHz + + + + + + 110 + 10 + 51 + 21 + + + + ppm + + + + + + 110 + 70 + 41 + 21 + + + + gain + + + + + + 10 + 70 + 91 + 21 + + + + + + + 10 + 120 + 141 + 21 + + + + + autogain_off + + + + + autogain_on + + + + + + + 10 + 170 + 141 + 36 + + + + write raw bytes + + + + + + + diff --git a/devices/sdrplay-handler/mirsdrapi-rsp.h b/devices/sdrplay-handler/mirsdrapi-rsp.h new file mode 100644 index 0000000..3aff5a9 --- /dev/null +++ b/devices/sdrplay-handler/mirsdrapi-rsp.h @@ -0,0 +1,318 @@ +// +// Copyright (c) 2013 Mirics Ltd, All Rights Reserved +// + +#ifndef MIR_SDR_H +#define MIR_SDR_H + +#ifndef _MIR_SDR_QUALIFIER +#if !defined(STATIC_LIB) && (defined(_M_X64) || defined(_M_IX86)) +#define _MIR_SDR_QUALIFIER __declspec(dllimport) +#elif defined(STATIC_LIB) || defined(__GNUC__) +#define _MIR_SDR_QUALIFIER +#endif +#endif // _MIR_SDR_QUALIFIER + +// Application code should check that it is compiled against the same API version +// mir_sdr_ApiVersion() returns the API version +#define MIR_SDR_API_VERSION (float)(2.09) + +#if defined(ANDROID) || defined(__ANDROID__) +// Android requires a mechanism to request info from Java application +typedef enum +{ + mir_sdr_GetFd = 0, + mir_sdr_FreeFd = 1, + mir_sdr_DevNotFound = 2, + mir_sdr_DevRemoved = 3 +} mir_sdr_JavaReqT; + +typedef int (*mir_sdr_SendJavaReq_t)(mir_sdr_JavaReqT cmd, int param); +#endif + +typedef enum +{ + mir_sdr_Success = 0, + mir_sdr_Fail = 1, + mir_sdr_InvalidParam = 2, + mir_sdr_OutOfRange = 3, + mir_sdr_GainUpdateError = 4, + mir_sdr_RfUpdateError = 5, + mir_sdr_FsUpdateError = 6, + mir_sdr_HwError = 7, + mir_sdr_AliasingError = 8, + mir_sdr_AlreadyInitialised = 9, + mir_sdr_NotInitialised = 10, + mir_sdr_NotEnabled = 11, + mir_sdr_HwVerError = 12, + mir_sdr_OutOfMemError = 13 +} mir_sdr_ErrT; + +typedef enum +{ + mir_sdr_BW_Undefined = 0, + mir_sdr_BW_0_200 = 200, + mir_sdr_BW_0_300 = 300, + mir_sdr_BW_0_600 = 600, + mir_sdr_BW_1_536 = 1536, + mir_sdr_BW_5_000 = 5000, + mir_sdr_BW_6_000 = 6000, + mir_sdr_BW_7_000 = 7000, + mir_sdr_BW_8_000 = 8000 +} mir_sdr_Bw_MHzT; + +typedef enum +{ + mir_sdr_IF_Undefined = -1, + mir_sdr_IF_Zero = 0, + mir_sdr_IF_0_450 = 450, + mir_sdr_IF_1_620 = 1620, + mir_sdr_IF_2_048 = 2048 +} mir_sdr_If_kHzT; + +typedef enum +{ + mir_sdr_ISOCH = 0, + mir_sdr_BULK = 1 +} mir_sdr_TransferModeT; + +typedef enum +{ + mir_sdr_CHANGE_NONE = 0x00, + mir_sdr_CHANGE_GR = 0x01, + mir_sdr_CHANGE_FS_FREQ = 0x02, + mir_sdr_CHANGE_RF_FREQ = 0x04, + mir_sdr_CHANGE_BW_TYPE = 0x08, + mir_sdr_CHANGE_IF_TYPE = 0x10, + mir_sdr_CHANGE_LO_MODE = 0x20, + mir_sdr_CHANGE_AM_PORT = 0x40 +} mir_sdr_ReasonForReinitT; + +typedef enum +{ + mir_sdr_LO_Undefined = 0, + mir_sdr_LO_Auto = 1, + mir_sdr_LO_120MHz = 2, + mir_sdr_LO_144MHz = 3, + mir_sdr_LO_168MHz = 4 +} mir_sdr_LoModeT; + +typedef enum +{ + mir_sdr_BAND_AM_LO = 0, + mir_sdr_BAND_AM_MID = 1, + mir_sdr_BAND_AM_HI = 2, + mir_sdr_BAND_VHF = 3, + mir_sdr_BAND_3 = 4, + mir_sdr_BAND_X = 5, + mir_sdr_BAND_4_5 = 6, + mir_sdr_BAND_L = 7 +} mir_sdr_BandT; + +typedef enum +{ + mir_sdr_USE_SET_GR = 0, + mir_sdr_USE_SET_GR_ALT_MODE = 1, + mir_sdr_USE_RSP_SET_GR = 2 +} mir_sdr_SetGrModeT; + +typedef enum +{ + mir_sdr_RSPII_BAND_UNKNOWN = 0, + mir_sdr_RSPII_BAND_AM_LO = 1, + mir_sdr_RSPII_BAND_AM_MID = 2, + mir_sdr_RSPII_BAND_AM_HI = 3, + mir_sdr_RSPII_BAND_VHF = 4, + mir_sdr_RSPII_BAND_3 = 5, + mir_sdr_RSPII_BAND_X_LO = 6, + mir_sdr_RSPII_BAND_X_MID = 7, + mir_sdr_RSPII_BAND_X_HI = 8, + mir_sdr_RSPII_BAND_4_5 = 9, + mir_sdr_RSPII_BAND_L = 10 +} mir_sdr_RSPII_BandT; + +typedef enum +{ + mir_sdr_RSPII_ANTENNA_A = 5, + mir_sdr_RSPII_ANTENNA_B = 6 +} mir_sdr_RSPII_AntennaSelectT; + +typedef enum +{ + mir_sdr_AGC_DISABLE = 0, + mir_sdr_AGC_100HZ = 1, + mir_sdr_AGC_50HZ = 2, + mir_sdr_AGC_5HZ = 3 +} mir_sdr_AgcControlT; + +typedef enum +{ + mir_sdr_GAIN_MESSAGE_START_ID = 0x80000000, + mir_sdr_ADC_OVERLOAD_DETECTED = mir_sdr_GAIN_MESSAGE_START_ID + 1, + mir_sdr_ADC_OVERLOAD_CORRECTED = mir_sdr_GAIN_MESSAGE_START_ID + 2 +} mir_sdr_GainMessageIdT; + +typedef enum +{ + mir_sdr_EXTENDED_MIN_GR = 0, + mir_sdr_NORMAL_MIN_GR = 20 +} mir_sdr_MinGainReductionT; + +typedef struct +{ + char *SerNo; + char *DevNm; + unsigned char hwVer; + unsigned char devAvail; +} mir_sdr_DeviceT; + +typedef struct +{ + float curr; + float max; + float min; +} mir_sdr_GainValuesT; + +// mir_sdr_StreamInit() callback function prototypes +typedef void (*mir_sdr_StreamCallback_t)(short *xi, short *xq, unsigned int firstSampleNum, int grChanged, int rfChanged, int fsChanged, unsigned int numSamples, unsigned int reset, void *cbContext); +typedef void (*mir_sdr_GainChangeCallback_t)(unsigned int gRdB, unsigned int lnaGRdB, void *cbContext); + +typedef mir_sdr_ErrT (*mir_sdr_Init_t)(int gRdB, double fsMHz, double rfMHz, mir_sdr_Bw_MHzT bwType, mir_sdr_If_kHzT ifType, int *samplesPerPacket); +typedef mir_sdr_ErrT (*mir_sdr_Uninit_t)(void); +typedef mir_sdr_ErrT (*mir_sdr_ReadPacket_t)(short *xi, short *xq, unsigned int *firstSampleNum, int *grChanged, int *rfChanged, int *fsChanged); +typedef mir_sdr_ErrT (*mir_sdr_SetRf_t)(double drfHz, int abs, int syncUpdate); +typedef mir_sdr_ErrT (*mir_sdr_SetFs_t)(double dfsHz, int abs, int syncUpdate, int reCal); +typedef mir_sdr_ErrT (*mir_sdr_SetGr_t)(int gRdB, int abs, int syncUpdate); +typedef mir_sdr_ErrT (*mir_sdr_SetGrParams_t)(int minimumGr, int lnaGrThreshold); +typedef mir_sdr_ErrT (*mir_sdr_SetDcMode_t)(int dcCal, int speedUp); +typedef mir_sdr_ErrT (*mir_sdr_SetDcTrackTime_t)(int trackTime); +typedef mir_sdr_ErrT (*mir_sdr_SetSyncUpdateSampleNum_t)(unsigned int sampleNum); +typedef mir_sdr_ErrT (*mir_sdr_SetSyncUpdatePeriod_t)(unsigned int period); +typedef mir_sdr_ErrT (*mir_sdr_ApiVersion_t)(float *version); +typedef mir_sdr_ErrT (*mir_sdr_ResetUpdateFlags_t)(int resetGainUpdate, int resetRfUpdate, int resetFsUpdate); +#if defined(ANDROID) || defined(__ANDROID__) +typedef mir_sdr_ErrT (*mir_sdr_SetJavaReqCallback_t)(mir_sdr_SendJavaReq_t sendJavaReq); +#endif +typedef mir_sdr_ErrT (*mir_sdr_SetTransferMode_t)(mir_sdr_TransferModeT mode); +typedef mir_sdr_ErrT (*mir_sdr_DownConvert_t)(short *in, short *xi, short *xq, unsigned int samplesPerPacket, mir_sdr_If_kHzT ifType, unsigned int M, unsigned int preReset); +typedef mir_sdr_ErrT (*mir_sdr_SetParam_t)(unsigned int id, unsigned int value); +typedef mir_sdr_ErrT (*mir_sdr_SetPpm_t)(double ppm); +typedef mir_sdr_ErrT (*mir_sdr_SetLoMode_t)(mir_sdr_LoModeT loMode); +typedef mir_sdr_ErrT (*mir_sdr_SetGrAltMode_t)(int *gRidx, int LNAstate, int *gRdBsystem, int abs, int syncUpdate); +typedef mir_sdr_ErrT (*mir_sdr_DCoffsetIQimbalanceControl_t)(unsigned int DCenable, unsigned int IQenable); +typedef mir_sdr_ErrT (*mir_sdr_DecimateControl_t)(unsigned int enable, unsigned int decimationFactor, unsigned int wideBandSignal); +typedef mir_sdr_ErrT (*mir_sdr_AgcControl_t)(mir_sdr_AgcControlT enable, int setPoint_dBfs, int knee_dBfs, unsigned int decay_ms, unsigned int hang_ms, int syncUpdate, int LNAstate); +typedef mir_sdr_ErrT (*mir_sdr_StreamInit_t)(int *gRdB, double fsMHz, double rfMHz, mir_sdr_Bw_MHzT bwType, mir_sdr_If_kHzT ifType, int LNAstate, int *gRdBsystem, mir_sdr_SetGrModeT setGrMode, int *samplesPerPacket, mir_sdr_StreamCallback_t StreamCbFn, mir_sdr_GainChangeCallback_t GainChangeCbFn, void *cbContext); +typedef mir_sdr_ErrT (*mir_sdr_StreamUninit_t)(void); +typedef mir_sdr_ErrT (*mir_sdr_Reinit_t)(int *gRdB, double fsMHz, double rfMHz, mir_sdr_Bw_MHzT bwType, mir_sdr_If_kHzT ifType, mir_sdr_LoModeT loMode, int LNAstate, int *gRdBsystem, mir_sdr_SetGrModeT setGrMode, int *samplesPerPacket, mir_sdr_ReasonForReinitT reasonForReinit); +typedef mir_sdr_ErrT (*mir_sdr_GetGrByFreq_t)(double rfMHz, mir_sdr_BandT *band, int *gRdB, int LNAstate, int *gRdBsystem, mir_sdr_SetGrModeT setGrMode); +typedef mir_sdr_ErrT (*mir_sdr_DebugEnable_t)(unsigned int enable); +typedef mir_sdr_ErrT (*mir_sdr_GetCurrentGain_t)(mir_sdr_GainValuesT *gainVals); + +typedef mir_sdr_ErrT (*mir_sdr_GetDevices_t)(mir_sdr_DeviceT *devices, unsigned int *numDevs, unsigned int maxDevs); +typedef mir_sdr_ErrT (*mir_sdr_SetDeviceIdx_t)(unsigned int idx); +typedef mir_sdr_ErrT (*mir_sdr_ReleaseDeviceIdx_t)(void); +typedef mir_sdr_ErrT (*mir_sdr_GetHwVersion_t)(unsigned char *ver); +typedef mir_sdr_ErrT (*mir_sdr_RSPII_AntennaControl_t)(mir_sdr_RSPII_AntennaSelectT select); +typedef mir_sdr_ErrT (*mir_sdr_RSPII_ExternalReferenceControl_t)(unsigned int output_enable); +typedef mir_sdr_ErrT (*mir_sdr_RSPII_BiasTControl_t)(unsigned int enable); +typedef mir_sdr_ErrT (*mir_sdr_RSPII_RfNotchEnable_t)(unsigned int enable); + +typedef mir_sdr_ErrT (*mir_sdr_RSP_SetGr_t)(int gRdB, int LNAstate, int abs, int syncUpdate); +typedef mir_sdr_ErrT (*mir_sdr_RSP_SetGrLimits_t)(mir_sdr_MinGainReductionT minGr); + +typedef mir_sdr_ErrT (*mir_sdr_AmPortSelect_t)(int port); + +// API function definitions +#ifdef __cplusplus +extern "C" +{ +#endif + + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_Init(int gRdB, double fsMHz, double rfMHz, mir_sdr_Bw_MHzT bwType, mir_sdr_If_kHzT ifType, int *samplesPerPacket); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_Uninit(void); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_ReadPacket(short *xi, short *xq, unsigned int *firstSampleNum, int *grChanged, int *rfChanged, int *fsChanged); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetRf(double drfHz, int abs, int syncUpdate); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetFs(double dfsHz, int abs, int syncUpdate, int reCal); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetGr(int gRdB, int abs, int syncUpdate); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetGrParams(int minimumGr, int lnaGrThreshold); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetDcMode(int dcCal, int speedUp); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetDcTrackTime(int trackTime); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetSyncUpdateSampleNum(unsigned int sampleNum); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetSyncUpdatePeriod(unsigned int period); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_ApiVersion(float *version); // Called by application to retrieve version of API used to create Dll + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_ResetUpdateFlags(int resetGainUpdate, int resetRfUpdate, int resetFsUpdate); +#if defined(ANDROID) || defined(__ANDROID__) + // This function provides a machanism for the Java application to set + // the callback function used to send request to it + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetJavaReqCallback(mir_sdr_SendJavaReq_t sendJavaReq); +#endif + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetTransferMode(mir_sdr_TransferModeT mode); + /* + * This following function will only operate correctly for the parameters detailed in the table below: + * + * IF freq | Signal BW | Input Sample Rate | Output Sample Rate | Required Decimation Factor + * ------------------------------------------------------------------------------------------- + * 450kHz | 200kHz | 2000kHz | 500kHz | M=4 + * 450kHz | 300kHz | 2000kHz | 500kHz | M=4 + * 450kHz | 600kHz | 2000kHz | 1000kHz | M=2 + * 2048kHz | 1536kHz | 8192kHz | 2048kHz | M=4 + * + * If preReset == 1, then the filter state will be reset to 0 before starting the filtering operation. + */ + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_DownConvert(short *in, short *xi, short *xq, unsigned int samplesPerPacket, mir_sdr_If_kHzT ifType, unsigned int M, unsigned int preReset); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetParam(unsigned int id, unsigned int value); // This MAY be called before mir_sdr_Init() + + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetPpm(double ppm); // This MAY be called before mir_sdr_Init() + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetLoMode(mir_sdr_LoModeT loMode); // This MUST be called before mir_sdr_Init()/mir_sdr_StreamInit() - otherwise use mir_sdr_Reinit() + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetGrAltMode(int *gRidx, int LNAstate, int *gRdBsystem, int abs, int syncUpdate); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_DCoffsetIQimbalanceControl(unsigned int DCenable, unsigned int IQenable); + /* + * Valid decimation factors for the following function are 2, 4, 8, 16 or 32 only + * Setting wideBandSignal=1 will use a slower filter but minimise the in-band roll-off + */ + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_DecimateControl(unsigned int enable, unsigned int decimationFactor, unsigned int wideBandSignal); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_AgcControl(mir_sdr_AgcControlT enable, int setPoint_dBfs, int knee_dBfs, unsigned int decay_ms, unsigned int hang_ms, int syncUpdate, int LNAstate); + /* + * mir_sdr_StreamInit() replaces mir_sdr_Init() and sets up a thread (or chain of threads) inside the API which will perform the processing chain (shown below), + * and then use the callback function to return the data to the calling application/plug-in. + * Processing chain (in order): + * mir_sdr_ReadPacket() + * DCoffsetCorrection() - LIF mode - enabled by default + * DownConvert() - automatically enabled if the parameters shown for mir_sdr_DownConvert() are selected + * Decimate() - disabled by default + * DCoffsetCorrection() - ZIF mode - enabled by default + * IQimbalanceCorrection() - enabled by default + * Agc() - disabled by default + */ + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_StreamInit(int *gRdB, double fsMHz, double rfMHz, mir_sdr_Bw_MHzT bwType, mir_sdr_If_kHzT ifType, int LNAstate, int *gRdBsystem, mir_sdr_SetGrModeT setGrMode, int *samplesPerPacket, mir_sdr_StreamCallback_t StreamCbFn, mir_sdr_GainChangeCallback_t GainChangeCbFn, void *cbContext); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_StreamUninit(void); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_Reinit(int *gRdB, double fsMHz, double rfMHz, mir_sdr_Bw_MHzT bwType, mir_sdr_If_kHzT ifType, mir_sdr_LoModeT loMode, int LNAstate, int *gRdBsystem, mir_sdr_SetGrModeT setGrMode, int *samplesPerPacket, mir_sdr_ReasonForReinitT reasonForReinit); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_GetGrByFreq(double rfMHz, mir_sdr_BandT *band, int *gRdB, int LNAstate, int *gRdBsystem, mir_sdr_SetGrModeT setGrMode); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_DebugEnable(unsigned int enable); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_GetCurrentGain(mir_sdr_GainValuesT *gainVals); + + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_GetDevices(mir_sdr_DeviceT *devices, unsigned int *numDevs, unsigned int maxDevs); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_SetDeviceIdx(unsigned int idx); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_ReleaseDeviceIdx(void); + /* + * Uninit: ver = 0 + * RSPI : ver = 1 + * RSPII: ver = 2 + */ + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_GetHwVersion(unsigned char *ver); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_RSPII_AntennaControl(mir_sdr_RSPII_AntennaSelectT select); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_RSPII_ExternalReferenceControl(unsigned int output_enable); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_RSPII_BiasTControl(unsigned int enable); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_RSPII_RfNotchEnable(unsigned int enable); + + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_RSP_SetGr(int gRdB, int LNAstate, int abs, int syncUpdate); + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_RSP_SetGrLimits(mir_sdr_MinGainReductionT minGr); + + _MIR_SDR_QUALIFIER mir_sdr_ErrT mir_sdr_AmPortSelect(int port); // If called after mir_sdr_Init() a call to mir_sdr_Reinit(..., reasonForReinit = mir_sdr_CHANGE_AM_PORT) + // is also required to change the port +#ifdef __cplusplus +} +#endif + +#endif //MIR_SDR_H diff --git a/devices/sdrplay-handler/sdrplay-handler.cpp b/devices/sdrplay-handler/sdrplay-handler.cpp new file mode 100644 index 0000000..947b108 --- /dev/null +++ b/devices/sdrplay-handler/sdrplay-handler.cpp @@ -0,0 +1,597 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * + * Qt-DAB 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 version 2 of the License. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include "sdrplay-handler.h" +#include "sdrplayselect.h" + +#define DEFAULT_GRED 40 + + sdrplayHandler::sdrplayHandler (QSettings *s) { +int err; +float ver; +mir_sdr_DeviceT devDesc [4]; +mir_sdr_GainValuesT gainDesc; +sdrplaySelect *sdrplaySelector; + + sdrplaySettings = s; + this -> myFrame = new QFrame (NULL); + setupUi (this -> myFrame); + this -> myFrame -> show (); + antennaSelector -> hide (); + this -> inputRate = Khz (2048); + _I_Buffer = NULL; + libraryLoaded = false; + +#ifdef __MINGW32__ +HKEY APIkey; +wchar_t APIkeyValue [256]; +ULONG APIkeyValue_length = 255; + + if (RegOpenKey (HKEY_LOCAL_MACHINE, + TEXT("Software\\MiricsSDR\\API"), + &APIkey) != ERROR_SUCCESS) { + fprintf (stderr, + "failed to locate API registry entry, error = %d\n", + (int)GetLastError()); + delete myFrame; + throw (21); + } + + RegQueryValueEx (APIkey, + (wchar_t *)L"Install_Dir", + NULL, + NULL, + (LPBYTE)&APIkeyValue, + (LPDWORD)&APIkeyValue_length); +// Ok, make explicit it is in the 64 bits section + wchar_t *x = wcscat (APIkeyValue, (wchar_t *)L"\\x86\\mir_sdr_api.dll"); +// wchar_t *x = wcscat (APIkeyValue, (wchar_t *)L"\\x64\\mir_sdr_api.dll"); +// fprintf (stderr, "Length of APIkeyValue = %d\n", APIkeyValue_length); +// wprintf (L"API registry entry: %s\n", APIkeyValue); + RegCloseKey(APIkey); + + Handle = LoadLibrary (x); + if (Handle == NULL) { + fprintf (stderr, "Failed to open mir_sdr_api.dll\n"); + delete myFrame; + throw (22); + } +#else + Handle = dlopen ("libusb-1.0.so", RTLD_NOW | RTLD_GLOBAL); + Handle = dlopen ("libmirsdrapi-rsp.so", RTLD_NOW); + if (Handle == NULL) + Handle = dlopen ("libmir_sdr.so", RTLD_NOW); + + if (Handle == NULL) { + fprintf (stderr, "error report %s\n", dlerror ()); + delete myFrame; + throw (23); + } +#endif + libraryLoaded = true; + + bool success = loadFunctions (); + if (!success) { +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + delete myFrame; + throw (23); + } + + err = my_mir_sdr_ApiVersion (&ver); + if (ver < 2.05) { + fprintf (stderr, "sorry, library too old\n"); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + delete myFrame; + throw (24); + } + + api_version -> display (ver); + _I_Buffer = new RingBuffer>(1024 * 1024); + vfoFrequency = Khz (220000); + currentGred = DEFAULT_GRED; +// +// See if there are settings from previous incarnations + sdrplaySettings -> beginGroup ("sdrplaySettings"); + coarseOffset = + sdrplaySettings -> value ("sdrplayOffset", 0). toInt (); + gainSlider -> setValue ( + sdrplaySettings -> value ("sdrplayGain", 50). toInt ()); + + ppmControl -> setValue ( + sdrplaySettings -> value ("sdrplay-ppm", 0). toInt ()); + sdrplaySettings -> endGroup (); + + setExternalGain (gainSlider -> value ()); + set_ppmControl (ppmControl -> value ()); +// +// and be prepared for future changes in the settings + connect (gainSlider, SIGNAL (valueChanged (int)), + this, SLOT (setExternalGain (int))); + connect (agcControl, SIGNAL (stateChanged (int)), + this, SLOT (agcControl_toggled (int))); + connect (ppmControl, SIGNAL (valueChanged (int)), + this, SLOT (set_ppmControl (int))); + + my_mir_sdr_GetDevices (devDesc, &numofDevs, uint32_t (4)); + if (numofDevs == 0) { + fprintf (stderr, "Sorry, no device found\n"); +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif + delete myFrame; + throw (25); + } + + if (numofDevs > 1) { + sdrplaySelector = new sdrplaySelect (); + for (deviceIndex = 0; deviceIndex < numofDevs; deviceIndex ++) { +#ifndef __MINGW32__ + sdrplaySelector -> + addtoList (devDesc [deviceIndex]. DevNm); +#else + sdrplaySelector -> + addtoList (devDesc [deviceIndex]. SerNo); +#endif + } + deviceIndex = sdrplaySelector -> QDialog::exec (); + delete sdrplaySelector; + } + else + deviceIndex = 0; + + serialNumber -> setText (devDesc [deviceIndex]. SerNo); + hwVersion = devDesc [deviceIndex]. hwVer; + fprintf (stderr, "hwVer = %d\n", hwVersion); + my_mir_sdr_SetDeviceIdx (deviceIndex); + + antennaSelector -> hide (); + if (hwVersion == 2) { + antennaSelector -> show (); + connect (antennaSelector, SIGNAL (activated (const QString &)), + this, SLOT (set_antennaControl (const QString &))); + } + + if (hwVersion == 255) { + nrBits = 14; + denominator = 16384; + } + else { + nrBits = 12; + denominator = 2048; + } + + unsigned char text; + (void)my_mir_sdr_GetHwVersion (&text); + fprintf (stderr, "hwVersion = %o\n", hwVersion); +// my_mir_sdr_ResetUpdateFlags (1, 0, 0); + running. store (false); + agcMode = false; +} + + sdrplayHandler::~sdrplayHandler (void) { + stopReader (); + if (!libraryLoaded) + return; + sdrplaySettings -> beginGroup ("sdrplaySettings"); + sdrplaySettings -> setValue ("sdrplayOffset", coarseOffset); + sdrplaySettings -> setValue ("sdrplayGain", gainSlider -> value ()); + sdrplaySettings -> setValue ("sdrplay-ppm", ppmControl -> value ()); + sdrplaySettings -> endGroup (); + sdrplaySettings -> sync (); + delete myFrame; + + if (numofDevs > 0) + my_mir_sdr_ReleaseDeviceIdx (deviceIndex); + if (_I_Buffer != NULL) + delete _I_Buffer; +#ifdef __MINGW32__ + FreeLibrary (Handle); +#else + dlclose (Handle); +#endif +} +// +static inline +int16_t bankFor_sdr (int32_t freq) { + if (freq < 12 * MHz (1)) + return mir_sdr_BAND_AM_LO; + if (freq < 30 * MHz (1)) + return mir_sdr_BAND_AM_MID; + if (freq < 60 * MHz (1)) + return mir_sdr_BAND_AM_HI; + if (freq < 120 * MHz (1)) + return mir_sdr_BAND_VHF; + if (freq < 250 * MHz (1)) + return mir_sdr_BAND_3; + if (freq < 420 * MHz (1)) + return mir_sdr_BAND_X; + if (freq < 1000 * MHz (1)) + return mir_sdr_BAND_4_5; + if (freq < 2000 * MHz (1)) + return mir_sdr_BAND_L; + return -1; +} + +int32_t sdrplayHandler::defaultFrequency (void) { + return Mhz (220); +} + +void sdrplayHandler::setVFOFrequency (int32_t newFrequency) { +int gRdBSystem; +int samplesPerPacket; +mir_sdr_ErrT err; +int localGred = currentGred; + + if (bankFor_sdr (newFrequency) == -1) + return; + + if (!running. load ()) { + vfoFrequency = newFrequency; + return; + } + + if (bankFor_sdr (newFrequency) == bankFor_sdr (vfoFrequency)) { + my_mir_sdr_SetRf (double (newFrequency), 1, 0); + vfoFrequency = newFrequency; + return; + } + err = my_mir_sdr_Reinit (&localGred, + double (inputRate) / Mhz (1), + double (newFrequency) / Mhz (1), + mir_sdr_BW_1_536, + mir_sdr_IF_Zero, + mir_sdr_LO_Undefined, // LOMode + 0, // LNA enable + &gRdBSystem, + agcMode, + &samplesPerPacket, + mir_sdr_CHANGE_RF_FREQ); + if (err != mir_sdr_Success) + fprintf (stderr, "Error %d\n", err); + vfoFrequency = newFrequency; +} + +int32_t sdrplayHandler::getVFOFrequency (void) { + return vfoFrequency; +} + +void sdrplayHandler::setExternalGain (int newGain) { +// fprintf (stderr, "newGain = %d, slidervalue = %d\n", +// newGain, +// gainSlider -> value ()); + if (newGain < 0 || newGain >= 102) + return; + + currentGred = maxGain () - newGain; + (void) my_mir_sdr_SetGr (currentGred, 1, 0); + gainDisplay -> display (newGain); +} + +int16_t sdrplayHandler::maxGain (void) { + return 101; +} +// +static +void myStreamCallback (int16_t *xi, + int16_t *xq, + uint32_t firstSampleNum, + int32_t grChanged, + int32_t rfChanged, + int32_t fsChanged, + uint32_t numSamples, + uint32_t reset, + void *cbContext) { +int16_t i; +sdrplayHandler *p = static_cast (cbContext); +float denominator = p -> denominator; +std::complex *localBuf = + (std::complex *)alloca (numSamples * sizeof (std::complex)); + + for (i = 0; i < (int)numSamples; i ++) + localBuf [i] = std::complex (float (xi [i]) / denominator, + float (xq [i]) / denominator); + p -> _I_Buffer -> putDataIntoBuffer (localBuf, numSamples); + (void) firstSampleNum; + (void) grChanged; + (void) rfChanged; + (void) fsChanged; + (void) reset; +} + +void myGainChangeCallback (uint32_t gRdB, + uint32_t lnaGRdB, + void *cbContext) { +// fprintf (stderr, "GainChangeCallback gives %X\n", gRdB); + (void)gRdB; + (void)lnaGRdB; + (void)cbContext; +} + +bool sdrplayHandler::restartReader (void) { +int gRdBSystem; +int samplesPerPacket; +mir_sdr_ErrT err; +int localGRed = currentGred; + + if (running. load ()) + return true; + + err = my_mir_sdr_StreamInit (&localGRed, + double (inputRate) / MHz (1), + double (vfoFrequency) / Mhz (1), + mir_sdr_BW_1_536, + mir_sdr_IF_Zero, + 1, // lnaEnable do not know yet + &gRdBSystem, + mir_sdr_USE_SET_GR, + &samplesPerPacket, + (mir_sdr_StreamCallback_t)myStreamCallback, + (mir_sdr_GainChangeCallback_t)myGainChangeCallback, + this); + if (err != mir_sdr_Success) { + fprintf (stderr, "error code = %d\n", err); + return false; + } + my_mir_sdr_SetPpm (double (ppmControl -> value ())); + err = my_mir_sdr_SetDcMode (4, 1); + err = my_mir_sdr_SetDcTrackTime (63); + running. store (true); + return true; +} + +void sdrplayHandler::stopReader (void) { + if (!running. load ()) + return; + + my_mir_sdr_StreamUninit (); + running. store (false); +} + +// +// The brave old getSamples. For the sdrplay, we get +// size still in I/Q pairs +int32_t sdrplayHandler::getSamples (std::complex *V, int32_t size) { + return _I_Buffer -> getDataFromBuffer (V, size); +} + +int32_t sdrplayHandler::Samples (void) { + return _I_Buffer -> GetRingBufferReadAvailable (); +} + +void sdrplayHandler::resetBuffer (void) { + _I_Buffer -> FlushRingBuffer (); +} + +int16_t sdrplayHandler::bitDepth (void) { + return nrBits; +} + +bool sdrplayHandler::loadFunctions (void) { + my_mir_sdr_StreamInit = (pfn_mir_sdr_StreamInit) + GETPROCADDRESS (this -> Handle, + "mir_sdr_StreamInit"); + if (my_mir_sdr_StreamInit == NULL) { + fprintf (stderr, "Could not find mir_sdr_StreamInit\n"); + return false; + } + + my_mir_sdr_StreamUninit = (pfn_mir_sdr_StreamUninit) + GETPROCADDRESS (this -> Handle, + "mir_sdr_StreamUninit"); + if (my_mir_sdr_StreamUninit == NULL) { + fprintf (stderr, "Could not find mir_sdr_StreamUninit\n"); + return false; + } + + my_mir_sdr_SetRf = (pfn_mir_sdr_SetRf) + GETPROCADDRESS (Handle, "mir_sdr_SetRf"); + if (my_mir_sdr_SetRf == NULL) { + fprintf (stderr, "Could not find mir_sdr_SetRf\n"); + return false; + } + + my_mir_sdr_SetFs = (pfn_mir_sdr_SetFs) + GETPROCADDRESS (Handle, "mir_sdr_SetFs"); + if (my_mir_sdr_SetFs == NULL) { + fprintf (stderr, "Could not find mir_sdr_SetFs\n"); + return false; + } + + my_mir_sdr_SetGr = (pfn_mir_sdr_SetGr) + GETPROCADDRESS (Handle, "mir_sdr_SetGr"); + if (my_mir_sdr_SetGr == NULL) { + fprintf (stderr, "Could not find mir_sdr_SetGr\n"); + return false; + } + + my_mir_sdr_SetGrParams = (pfn_mir_sdr_SetGrParams) + GETPROCADDRESS (Handle, "mir_sdr_SetGrParams"); + if (my_mir_sdr_SetGrParams == NULL) { + fprintf (stderr, "Could not find mir_sdr_SetGrParams\n"); + return false; + } + + my_mir_sdr_SetDcMode = (pfn_mir_sdr_SetDcMode) + GETPROCADDRESS (Handle, "mir_sdr_SetDcMode"); + if (my_mir_sdr_SetDcMode == NULL) { + fprintf (stderr, "Could not find mir_sdr_SetDcMode\n"); + return false; + } + + my_mir_sdr_SetDcTrackTime = (pfn_mir_sdr_SetDcTrackTime) + GETPROCADDRESS (Handle, "mir_sdr_SetDcTrackTime"); + if (my_mir_sdr_SetDcTrackTime == NULL) { + fprintf (stderr, "Could not find mir_sdr_SetDcTrackTime\n"); + return false; + } + + my_mir_sdr_SetSyncUpdateSampleNum = (pfn_mir_sdr_SetSyncUpdateSampleNum) + GETPROCADDRESS (Handle, "mir_sdr_SetSyncUpdateSampleNum"); + if (my_mir_sdr_SetSyncUpdateSampleNum == NULL) { + fprintf (stderr, "Could not find mir_sdr_SetSyncUpdateSampleNum\n"); + return false; + } + + my_mir_sdr_SetSyncUpdatePeriod = (pfn_mir_sdr_SetSyncUpdatePeriod) + GETPROCADDRESS (Handle, "mir_sdr_SetSyncUpdatePeriod"); + if (my_mir_sdr_SetSyncUpdatePeriod == NULL) { + fprintf (stderr, "Could not find mir_sdr_SetSyncUpdatePeriod\n"); + return false; + } + + my_mir_sdr_ApiVersion = (pfn_mir_sdr_ApiVersion) + GETPROCADDRESS (Handle, "mir_sdr_ApiVersion"); + if (my_mir_sdr_ApiVersion == NULL) { + fprintf (stderr, "Could not find mir_sdr_ApiVersion\n"); + return false; + } + + my_mir_sdr_AgcControl = (pfn_mir_sdr_AgcControl) + GETPROCADDRESS (Handle, "mir_sdr_AgcControl"); + if (my_mir_sdr_AgcControl == NULL) { + fprintf (stderr, "Could not find mir_sdr_AgcControl\n"); + return false; + } + + my_mir_sdr_Reinit = (pfn_mir_sdr_Reinit) + GETPROCADDRESS (Handle, "mir_sdr_Reinit"); + if (my_mir_sdr_Reinit == NULL) { + fprintf (stderr, "Could not find mir_sdr_Reinit\n"); + return false; + } + + my_mir_sdr_SetPpm = (pfn_mir_sdr_SetPpm) + GETPROCADDRESS (Handle, "mir_sdr_SetPpm"); + if (my_mir_sdr_SetPpm == NULL) { + fprintf (stderr, "Could not find mir_sdr_SetPpm\n"); + return false; + } + + my_mir_sdr_DebugEnable = (pfn_mir_sdr_DebugEnable) + GETPROCADDRESS (Handle, "mir_sdr_DebugEnable"); + if (my_mir_sdr_DebugEnable == NULL) { + fprintf (stderr, "Could not find mir_sdr_DebugEnable\n"); + return false; + } + + my_mir_sdr_DCoffsetIQimbalanceControl = + (pfn_mir_sdr_DCoffsetIQimbalanceControl) + GETPROCADDRESS (Handle, "mir_sdr_DCoffsetIQimbalanceControl"); + if (my_mir_sdr_DCoffsetIQimbalanceControl == NULL) { + fprintf (stderr, "Could not find mir_sdr_DCoffsetIQimbalanceControl\n"); + return false; + } + + + my_mir_sdr_ResetUpdateFlags = (pfn_mir_sdr_ResetUpdateFlags) + GETPROCADDRESS (Handle, "mir_sdr_ResetUpdateFlags"); + if (my_mir_sdr_ResetUpdateFlags == NULL) { + fprintf (stderr, "Could not find mir_sdr_ResetUpdateFlags\n"); + return false; + } + + my_mir_sdr_GetDevices = (pfn_mir_sdr_GetDevices) + GETPROCADDRESS (Handle, "mir_sdr_GetDevices"); + if (my_mir_sdr_GetDevices == NULL) { + fprintf (stderr, "Could not find mir_sdr_GetDevices"); + return false; + } + + my_mir_sdr_GetCurrentGain = (pfn_mir_sdr_GetCurrentGain) + GETPROCADDRESS (Handle, "mir_sdr_GetCurrentGain"); + if (my_mir_sdr_GetCurrentGain == NULL) { + fprintf (stderr, "Could not find mir_sdr_GetCurrentGain"); + return false; + } + + my_mir_sdr_GetHwVersion = (pfn_mir_sdr_GetHwVersion) + GETPROCADDRESS (Handle, "mir_sdr_GetHwVersion"); + if (my_mir_sdr_GetHwVersion == NULL) { + fprintf (stderr, "Could not find mir_sdr_GetHwVersion"); + return false; + } + + my_mir_sdr_RSPII_AntennaControl = (pfn_mir_sdr_RSPII_AntennaControl) + GETPROCADDRESS (Handle, "mir_sdr_RSPII_AntennaControl"); + if (my_mir_sdr_RSPII_AntennaControl == NULL) { + fprintf (stderr, "Could not find mir_sdr_RSPII_AntennaControl"); + return false; + } + + my_mir_sdr_SetDeviceIdx = (pfn_mir_sdr_SetDeviceIdx) + GETPROCADDRESS (Handle, "mir_sdr_SetDeviceIdx"); + if (my_mir_sdr_SetDeviceIdx == NULL) { + fprintf (stderr, "Could not find mir_sdr_SetDeviceIdx"); + return false; + } + + my_mir_sdr_ReleaseDeviceIdx = (pfn_mir_sdr_ReleaseDeviceIdx) + GETPROCADDRESS (Handle, "mir_sdr_ReleaseDeviceIdx"); + if (my_mir_sdr_ReleaseDeviceIdx == NULL) { + fprintf (stderr, "Could not find mir_sdr_ReleaseDeviceIdx"); + return false; + } + + return true; +} + +void sdrplayHandler::agcControl_toggled (int agcMode) { + this -> agcMode = agcControl -> isChecked (); + my_mir_sdr_AgcControl (this -> agcMode, -currentGred, 0, 0, 0, 0, 1); + if (agcMode == 0) + setExternalGain (gainSlider -> value ()); +} + +void sdrplayHandler::set_ppmControl (int ppm) { + if (running. load ()) { + my_mir_sdr_SetPpm ((float)ppm); + my_mir_sdr_SetRf ((float)vfoFrequency, 1, 0); + } +} + +void sdrplayHandler::set_antennaControl (const QString &s) { +mir_sdr_ErrT err; + + if (hwVersion < 2) // should not happen + return; + + if (s == "Antenna A") + err = my_mir_sdr_RSPII_AntennaControl (mir_sdr_RSPII_ANTENNA_A); + else + err = my_mir_sdr_RSPII_AntennaControl (mir_sdr_RSPII_ANTENNA_B); +} + + diff --git a/devices/sdrplay-handler/sdrplay-handler.h b/devices/sdrplay-handler/sdrplay-handler.h new file mode 100644 index 0000000..6bcc863 --- /dev/null +++ b/devices/sdrplay-handler/sdrplay-handler.h @@ -0,0 +1,158 @@ +# /* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __SDRPLAY_HANDLER__ +#define __SDRPLAY_HANDLER__ + +#include +#include +#include +#include +#include "dab-constants.h" +#include "ringbuffer.h" +#include "virtual-input.h" +#include "ui_sdrplay-widget.h" +#include "mirsdrapi-rsp.h" + +typedef void (*mir_sdr_StreamCallback_t)(int16_t *xi, + int16_t *xq, + uint32_t firstSampleNum, + int32_t grChanged, + int32_t rfChanged, + int32_t fsChanged, + uint32_t numSamples, + uint32_t reset, + void *cbContext); +typedef void (*mir_sdr_GainChangeCallback_t)(uint32_t gRdB, + uint32_t lnaGRdB, + void *cbContext); + +#ifdef __MINGW32__ +#define GETPROCADDRESS GetProcAddress +#else +#define GETPROCADDRESS dlsym +#endif + +// Dll and ".so" function prototypes +typedef mir_sdr_ErrT (*pfn_mir_sdr_StreamInit) (int *gRdB, double fsMHz, +double rfMHz, mir_sdr_Bw_MHzT bwType, mir_sdr_If_kHzT ifType, int LNAEnable, int *gRdBsystem, int useGrAltMode, int *samplesPerPacket, mir_sdr_StreamCallback_t StreamCbFn, mir_sdr_GainChangeCallback_t GainChangeCbFn, void *cbContext); + +typedef mir_sdr_ErrT (*pfn_mir_sdr_Reinit) (int *gRdB, double fsMHz, +double rfMHz, mir_sdr_Bw_MHzT bwType, mir_sdr_If_kHzT ifType, +mir_sdr_LoModeT, int, int*, int, int*, mir_sdr_ReasonForReinitT); + +typedef mir_sdr_ErrT (*pfn_mir_sdr_StreamUninit)(void); +typedef mir_sdr_ErrT (*pfn_mir_sdr_SetRf)(double drfHz, int abs, int syncUpdate); +typedef mir_sdr_ErrT (*pfn_mir_sdr_SetFs)(double dfsHz, int abs, int syncUpdate, int reCal); +typedef mir_sdr_ErrT (*pfn_mir_sdr_SetGr)(int gRdB, int abs, int syncUpdate); +typedef mir_sdr_ErrT (*pfn_mir_sdr_SetGrParams)(int minimumGr, int lnaGrThreshold); +typedef mir_sdr_ErrT (*pfn_mir_sdr_SetDcMode)(int dcCal, int speedUp); +typedef mir_sdr_ErrT (*pfn_mir_sdr_SetDcTrackTime)(int trackTime); +typedef mir_sdr_ErrT (*pfn_mir_sdr_SetSyncUpdateSampleNum)(unsigned int sampleNum); +typedef mir_sdr_ErrT (*pfn_mir_sdr_SetSyncUpdatePeriod)(unsigned int period); +typedef mir_sdr_ErrT (*pfn_mir_sdr_ApiVersion)(float *version); +typedef mir_sdr_ErrT (*pfn_mir_sdr_ResetUpdateFlags)(int resetGainUpdate, int resetRfUpdate, int resetFsUpdate); +typedef mir_sdr_ErrT (*pfn_mir_sdr_AgcControl)(uint32_t, int, int, uint32_t, + uint32_t, int, int); +typedef mir_sdr_ErrT (*pfn_mir_sdr_DCoffsetIQimbalanceControl) (uint32_t, uint32_t); +typedef mir_sdr_ErrT (*pfn_mir_sdr_SetPpm)(double); +typedef mir_sdr_ErrT (*pfn_mir_sdr_DebugEnable)(uint32_t); +typedef mir_sdr_ErrT (*pfn_mir_sdr_GetDevices) (mir_sdr_DeviceT *, uint32_t *, uint32_t); +typedef mir_sdr_ErrT (*pfn_mir_sdr_GetCurrentGain) (mir_sdr_GainValuesT *); +typedef mir_sdr_ErrT (*pfn_mir_sdr_GetHwVersion) (unsigned char *); +typedef mir_sdr_ErrT (*pfn_mir_sdr_RSPII_AntennaControl) (mir_sdr_RSPII_AntennaSelectT); +typedef mir_sdr_ErrT (*pfn_mir_sdr_SetDeviceIdx) (unsigned int); +typedef mir_sdr_ErrT (*pfn_mir_sdr_ReleaseDeviceIdx) (unsigned int); + + +/////////////////////////////////////////////////////////////////////////// +class sdrplayHandler: public virtualInput, public Ui_sdrplayWidget { +Q_OBJECT +public: + sdrplayHandler (QSettings *); + ~sdrplayHandler (void); + void setVFOFrequency (int32_t); + int32_t getVFOFrequency (void); + int32_t defaultFrequency (void); + + bool restartReader (void); + void stopReader (void); + int32_t getSamples (std::complex *, + int32_t); + int32_t Samples (void); + void resetBuffer (void); + int16_t maxGain (void); + int16_t bitDepth (void); +// +// The buffer should be visible by the callback function + RingBuffer> *_I_Buffer; + float denominator; +private: + pfn_mir_sdr_StreamInit my_mir_sdr_StreamInit; + pfn_mir_sdr_Reinit my_mir_sdr_Reinit; + pfn_mir_sdr_StreamUninit my_mir_sdr_StreamUninit; + pfn_mir_sdr_SetRf my_mir_sdr_SetRf; + pfn_mir_sdr_SetFs my_mir_sdr_SetFs; + pfn_mir_sdr_SetGr my_mir_sdr_SetGr; + pfn_mir_sdr_SetGrParams my_mir_sdr_SetGrParams; + pfn_mir_sdr_SetDcMode my_mir_sdr_SetDcMode; + pfn_mir_sdr_SetDcTrackTime my_mir_sdr_SetDcTrackTime; + pfn_mir_sdr_SetSyncUpdateSampleNum + my_mir_sdr_SetSyncUpdateSampleNum; + pfn_mir_sdr_SetSyncUpdatePeriod + my_mir_sdr_SetSyncUpdatePeriod; + pfn_mir_sdr_ApiVersion my_mir_sdr_ApiVersion; + pfn_mir_sdr_ResetUpdateFlags + my_mir_sdr_ResetUpdateFlags; + pfn_mir_sdr_AgcControl my_mir_sdr_AgcControl; + pfn_mir_sdr_DCoffsetIQimbalanceControl + my_mir_sdr_DCoffsetIQimbalanceControl; + pfn_mir_sdr_SetPpm my_mir_sdr_SetPpm; + pfn_mir_sdr_DebugEnable my_mir_sdr_DebugEnable; + pfn_mir_sdr_GetDevices my_mir_sdr_GetDevices; + pfn_mir_sdr_GetCurrentGain my_mir_sdr_GetCurrentGain; + pfn_mir_sdr_GetHwVersion my_mir_sdr_GetHwVersion; + pfn_mir_sdr_RSPII_AntennaControl my_mir_sdr_RSPII_AntennaControl; + pfn_mir_sdr_SetDeviceIdx my_mir_sdr_SetDeviceIdx; + pfn_mir_sdr_ReleaseDeviceIdx my_mir_sdr_ReleaseDeviceIdx; + + int16_t hwVersion; + uint32_t numofDevs; + int16_t deviceIndex; + bool loadFunctions (void); + QSettings *sdrplaySettings; + QFrame *myFrame; + int32_t inputRate; + int32_t vfoFrequency; + int currentGred; + bool libraryLoaded; + std::atomic running; + HINSTANCE Handle; + bool agcMode; + int16_t nrBits; +private slots: + void setExternalGain (int); + void agcControl_toggled (int); + void set_ppmControl (int); + void set_antennaControl (const QString &); +}; +#endif + diff --git a/devices/sdrplay-handler/sdrplay-widget.ui b/devices/sdrplay-handler/sdrplay-widget.ui new file mode 100644 index 0000000..a0a63c4 --- /dev/null +++ b/devices/sdrplay-handler/sdrplay-widget.ui @@ -0,0 +1,168 @@ + + + sdrplayWidget + + + + 0 + 0 + 256 + 300 + + + + SDRplay control + + + + + 0 + 0 + 211 + 291 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 10 + 80 + 101 + 21 + + + + mirics-SDRplay + + + + + + 16 + 180 + 121 + 21 + + + + + + + + + + 20 + 40 + 91 + 21 + + + + 0 + + + QLCDNumber::Flat + + + + + + 170 + 29 + 20 + 171 + + + + Qt::Vertical + + + + + + 160 + 0 + 41 + 23 + + + + 3 + + + QLCDNumber::Flat + + + + + + 110 + 140 + 51 + 25 + + + + agc + + + + + + 10 + 15 + 81 + 21 + + + + -200 + + + 200 + + + + + + 10 + 210 + 141 + 20 + + + + + + + + + + 10 + 230 + 181 + 36 + + + + + Antenna A + + + + + Antenna B + + + + + + + + diff --git a/devices/sdrplay-handler/sdrplayselect.cpp b/devices/sdrplay-handler/sdrplayselect.cpp new file mode 100644 index 0000000..bd0c4d8 --- /dev/null +++ b/devices/sdrplay-handler/sdrplayselect.cpp @@ -0,0 +1,68 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Many of the ideas as implemented in Qt-DAB are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#include +#include +#include "sdrplayselect.h" +// +// Whenever there are two or more sdrplay devices connected +// to the computer, the user is asked to make a choice. + + sdrplaySelect::sdrplaySelect (void) { + toptext = new QLabel (this); + toptext -> setText ("Select an rsp device"); + selectorDisplay = new QListView (this); + QVBoxLayout *layOut = new QVBoxLayout; + layOut -> addWidget (selectorDisplay); + layOut -> addWidget (toptext); + setWindowTitle (tr("RSP select")); + setLayout (layOut); + + Devices = QStringList (); + deviceList. setStringList (Devices); + selectorDisplay -> setModel (&deviceList); + connect (selectorDisplay, SIGNAL (clicked (QModelIndex)), + this, SLOT (select_rsp (QModelIndex))); + selectedItem = -1; +} + + sdrplaySelect::~sdrplaySelect (void) { +} + +void sdrplaySelect::addtoList (const char *v) { +QString s (v); + + Devices << s; + deviceList. setStringList (Devices); + selectorDisplay -> setModel (&deviceList); + selectorDisplay -> adjustSize (); + adjustSize (); +} + +void sdrplaySelect::select_rsp (QModelIndex s) { + QDialog::done (s. row ()); +} + diff --git a/devices/sdrplay-handler/sdrplayselect.h b/devices/sdrplay-handler/sdrplayselect.h new file mode 100644 index 0000000..0aba233 --- /dev/null +++ b/devices/sdrplay-handler/sdrplayselect.h @@ -0,0 +1,50 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __SDRPLAY_SELECT__ +#define __SDRPLAY_SELECT__ +# +#include +#include +#include +#include +#include +#include + +class sdrplaySelect: public QDialog { +Q_OBJECT +public: + sdrplaySelect (void); + ~sdrplaySelect (void); + void addtoList (const char *); +private: + QLabel *toptext; + QListView *selectorDisplay; + QStringListModel deviceList; + QStringList Devices; + int16_t selectedItem; +private slots: +void select_rsp (QModelIndex); +}; + +#endif + diff --git a/devices/uhd/uhd-input.cpp b/devices/uhd/uhd-input.cpp new file mode 100644 index 0000000..8073f67 --- /dev/null +++ b/devices/uhd/uhd-input.cpp @@ -0,0 +1,243 @@ +/* + * + * Copyright (C) 2015 + * Sebastian Held + * + * This file is part of Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "uhd-input.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + uhd_streamer::uhd_streamer (uhdInput *d) { + m_theStick = d; + m_stop_signal_called = false; +//create a receive streamer + uhd::stream_args_t stream_args( "fc32", "sc16" ); + m_theStick -> m_rx_stream = + m_theStick -> m_usrp -> get_rx_stream (stream_args); +//setup streaming + uhd::stream_cmd_t stream_cmd (uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS ); + stream_cmd.num_samps = 0; + stream_cmd.stream_now = true; + stream_cmd.time_spec = uhd::time_spec_t(); + m_theStick -> m_rx_stream -> issue_stream_cmd (stream_cmd); + + start(); +} + +void uhd_streamer::stop (void) { + m_stop_signal_called = true; + while (isRunning ()) + wait(1); +} + +void uhd_streamer::run (void) { + while (!m_stop_signal_called) { +// get write position, ignore data2 and size2 + int32_t size1, size2; + void *data1, *data2; + m_theStick -> theBuffer -> GetRingBufferWriteRegions (10000, + &data1, + &size1, + &data2, + &size2); + + if (size1 == 0) { +// no room in ring buffer, wait for main thread to process the data + usleep (100); // wait 100 us + continue; + } + + uhd::rx_metadata_t md; + size_t num_rx_samps = + m_theStick -> m_rx_stream -> recv (data1, size1, md, 1.0); + m_theStick -> theBuffer -> AdvanceRingBufferWriteIndex (num_rx_samps); + + if (md.error_code == uhd::rx_metadata_t::ERROR_CODE_TIMEOUT) { + std::cout << boost::format ("Timeout while streaming") << std::endl; + continue; + } + + if (md.error_code == uhd::rx_metadata_t::ERROR_CODE_OVERFLOW) { + std::cerr << boost::format ("Got an overflow indication") << std::endl; + continue; + } + +// if (md.error_code != uhd::rx_metadata_t::ERROR_CODE_NONE) { +// std::cerr << boost::format("Receiver error: %s") % md.strerror() << std::endl; +// continue; +// } + } +} + + uhdInput::uhdInput (QSettings *s, bool *success ) { + this -> uhdSettings = s; + this -> myFrame = new QFrame (NULL); + setupUi (this -> myFrame); + this -> myFrame -> show (); + this -> inputRate = Khz (2048); + this -> ringbufferSize = 1024; // blocks of 1024 complexes + this -> theBuffer = NULL; // also indicates good init or not + *success = false; + lastFrequency = 100000; + m_workerHandle = 0; +// create a usrp device. + std::string args; + std::cout << std::endl; + std::cout << boost::format("Creating the usrp device with: %s...") % args << std::endl; + try { + m_usrp = uhd::usrp::multi_usrp::make (args); +// Lock mboard clocks + + std::string ref("internal"); + m_usrp -> set_clock_source (ref); + + std::cout << boost::format("Using Device: %s") % m_usrp->get_pp_string() << std::endl; +// set sample rate + m_usrp -> set_rx_rate (inputRate); + inputRate = m_usrp -> get_rx_rate (); + std::cout << boost::format("Actual RX Rate: %f Msps...") % (inputRate/1e6) << std::endl << std::endl; + +// allocate the rx buffer + theBuffer = new RingBuffer >(ringbufferSize * 1024); + } + catch (...) { + fprintf (stderr, "No luck with uhd\n"); + return; + } +// some housekeeping for the local frame + externalGain -> setMaximum (maxGain ()); + uhdSettings -> beginGroup ("uhdSettings"); + externalGain -> setValue ( + uhdSettings -> value ("externalGain", 40). toInt ()); + f_correction -> setValue ( + uhdSettings -> value ("f_correction", 0). toInt ()); + KhzOffset -> setValue ( + uhdSettings -> value ("KhzOffset", 0). toInt ()); + uhdSettings -> endGroup (); + + setExternalGain (externalGain -> value ()); + set_KhzOffset (KhzOffset -> value ()); + connect (externalGain, SIGNAL (valueChanged (int)), + this, SLOT (setExternalGain (int))); + connect (KhzOffset, SIGNAL (valueChanged (int)), + this, SLOT (set_KhzOffset (int))); + *success = true; +} + + uhdInput::~uhdInput (void) { + if (theBuffer != NULL) { + stopReader(); + uhdSettings -> beginGroup ("uhdSettings"); + uhdSettings -> setValue ("externalGain", + externalGain -> value ()); + uhdSettings -> setValue ("f_correction", + f_correction -> value ()); + uhdSettings -> setValue ("KhzOffset", + KhzOffset -> value ()); + uhdSettings -> endGroup (); + delete theBuffer; + } + delete myFrame; +} + +void uhdInput::setVFOFrequency (int32_t freq) { + std::cout << boost::format ("Setting RX Freq: %f MHz...") % (freq/1e6) << std::endl; + uhd::tune_request_t tune_request (freq); + m_usrp->set_rx_freq (tune_request); +} + +int32_t uhdInput::getVFOFrequency (void) { +int32_t freq = m_usrp -> get_rx_freq (); + std::cout << boost::format("Actual RX Freq: %f MHz...") % (freq/1e6) << std::endl << std::endl; + return freq; +} + +bool uhdInput::restartReader (void) { + if (m_workerHandle != 0) + return true; + + theBuffer -> FlushRingBuffer (); + m_workerHandle = new uhd_streamer (this); + return true; +} + +void uhdInput::stopReader (void) { + if (m_workerHandle == 0) + return; + + m_workerHandle -> stop (); + + delete m_workerHandle; + m_workerHandle = 0; +} +// +// not used: +uint8_t uhdInput::myIdentity (void) { + return DAB_STICK; +} + +int32_t uhdInput::getSamples (std::complex *v, int32_t size) { + size = std::min ((uint32_t)size, + (uint32_t)(theBuffer -> GetRingBufferReadAvailable ())); + theBuffer -> getDataFromBuffer (v, size); + return size; +} + +int32_t uhdInput::Samples (void) { + return theBuffer -> GetRingBufferReadAvailable(); +} + +void uhdInput::resetBuffer (void) { + theBuffer -> FlushRingBuffer(); +} + +void uhdInput::set_fCorrection (int32_t f) { + (void)f; +} + +int16_t uhdInput::maxGain (void) { + uhd::gain_range_t range = m_usrp->get_rx_gain_range(); + return range.stop(); +} + +void uhdInput::setExternalGain (int32_t gain) { + std::cout << boost::format("Setting RX Gain: %f dB...") % gain << std::endl; + m_usrp -> set_rx_gain (gain); + double gain_f = m_usrp -> get_rx_gain (); + std::cout << boost::format("Actual RX Gain: %f dB...") % gain_f << std::endl << std::endl; +} + +void uhdInput::set_KhzOffset (int32_t o) { + vfoOffset = o; +} + +int16_t uhdInput::bitDepth (void) { + return 16; +} + diff --git a/devices/uhd/uhd-input.h b/devices/uhd/uhd-input.h new file mode 100644 index 0000000..3882a3b --- /dev/null +++ b/devices/uhd/uhd-input.h @@ -0,0 +1,87 @@ +# +/* + * Copyright (C) 2015 + * Sebastian Held + * + * This file is part of the SDR-J. + * Many of the ideas as implemented in SDR-J are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __UHDINPUT +#define __UHDINPUT + +#include "virtual-input.h" + +#include +#include "ringbuffer.h" +#include +#include +#include +#include +#include "ui_uhd-widget.h" + +class uhdInput; +// +// the real worker: +class uhd_streamer : public QThread { +public: + uhd_streamer (uhdInput *d); + void stop(); + +private: + uhdInput* m_theStick; + virtual void run(); + volatile bool m_stop_signal_called; +}; + + +class uhdInput: public virtualInput, public Ui_uhdWidget { +Q_OBJECT + friend class uhd_streamer; +public: + uhdInput (QSettings *dabSettings, bool *success); +virtual ~uhdInput (void); +virtual void setVFOFrequency (int32_t freq); +virtual int32_t getVFOFrequency (void); + bool legalFrequency (int32_t) {return true;} + int32_t defaultFrequency (void) {return 100000000;} +virtual bool restartReader (void); +virtual void stopReader (void); +virtual int32_t getSamples (std::complex *, int32_t size); +virtual int32_t Samples (void); + uint8_t myIdentity (void); +virtual void resetBuffer (void); +virtual int16_t maxGain (void); + int16_t bitDepth (void); +// +private: + QSettings *uhdSettings; + QFrame *myFrame; + uhd::usrp::multi_usrp::sptr m_usrp; + uhd::rx_streamer::sptr m_rx_stream; + RingBuffer > *theBuffer; + uhd_streamer* m_workerHandle; + int32_t inputRate; + int32_t ringbufferSize; +private slots: + void setExternalGain (int); + void set_fCorrection (int); + void set_KhzOffset (int); +}; +#endif + diff --git a/devices/uhd/uhd-widget.ui b/devices/uhd/uhd-widget.ui new file mode 100644 index 0000000..6364cba --- /dev/null +++ b/devices/uhd/uhd-widget.ui @@ -0,0 +1,145 @@ + + + uhdWidget + + + + 0 + 0 + 256 + 133 + + + + Form + + + + + 0 + 0 + 211 + 221 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 10 + 100 + 101 + 21 + + + + uhd device + + + + + + 0 + 0 + 91 + 21 + + + + 103 + + + 55 + + + + + + 0 + 20 + 91 + 21 + + + + -100 + + + 100 + + + + + + 0 + 40 + 91 + 21 + + + + 1000000 + + + + + + 100 + 40 + 41 + 21 + + + + KHz + + + + + + 100 + 20 + 51 + 21 + + + + ppm + + + + + + 100 + 0 + 101 + 21 + + + + gain reductiom + + + + + + 16 + 180 + 121 + 21 + + + + + + + + + + + diff --git a/devices/virtual-input.cpp b/devices/virtual-input.cpp new file mode 100644 index 0000000..c34a480 --- /dev/null +++ b/devices/virtual-input.cpp @@ -0,0 +1,77 @@ +# +/* + * Copyright (C) 2010, 2011, 2012 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Default (void) implementation of + * virtual input class + */ +#include "virtual-input.h" + + virtualInput::virtualInput (void) { + lastFrequency = 100000; + vfoOffset = 0; + theGain = 50; + coarseOffset = 0; +} + + virtualInput::~virtualInput (void) { +} + +void virtualInput::setVFOFrequency (int32_t f) { + lastFrequency = f; +} + +int32_t virtualInput::getVFOFrequency (void) { + return lastFrequency; +} + +bool virtualInput::restartReader (void) { + return true; +} + +void virtualInput::stopReader (void) { +} + +int32_t virtualInput::getSamples (std::complex *v, int32_t amount) { + (void)v; + (void)amount; + return amount; +} + +int32_t virtualInput::Samples (void) { + return 1024; +} + +int32_t virtualInput::defaultFrequency (void) { + return Khz (220000); +} + +void virtualInput::resetBuffer (void) { +} + +void virtualInput::setOffset (int32_t o) { + coarseOffset = o; +} + +int32_t virtualInput::getOffset (void) { + return coarseOffset; +} + diff --git a/devices/virtual-input.h b/devices/virtual-input.h new file mode 100644 index 0000000..e11ccbf --- /dev/null +++ b/devices/virtual-input.h @@ -0,0 +1,56 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * We have to create a simple virtual class here, since we + * want the interface with different devices (including filehandling) + * to be transparent + */ +#ifndef __VIRTUAL_INPUT__ +#define __VIRTUAL_INPUT__ + +#include +#include "dab-constants.h" +#include + +class virtualInput: public QObject { +public: + virtualInput (void); +virtual ~virtualInput (void); +virtual void setVFOFrequency (int32_t); +virtual int32_t getVFOFrequency (void); +virtual int32_t defaultFrequency(void); +virtual bool restartReader (void); +virtual void stopReader (void); +virtual int32_t getSamples (std::complex *, int32_t); +virtual int32_t Samples (void); +virtual void resetBuffer (void); +virtual int16_t bitDepth (void) { return 10;} +virtual int32_t getOffset (void); +virtual void setOffset (int32_t); +// +protected: + int32_t lastFrequency; + int32_t vfoOffset; + int theGain; + int32_t coarseOffset; +}; +#endif + diff --git a/devices/wavfiles/wavfiles.cpp b/devices/wavfiles/wavfiles.cpp new file mode 100644 index 0000000..8745c85 --- /dev/null +++ b/devices/wavfiles/wavfiles.cpp @@ -0,0 +1,179 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include +#include +#include "wavfiles.h" + +static inline +int64_t getMyTime (void) { +struct timeval tv; + + gettimeofday (&tv, NULL); + return ((int64_t)tv. tv_sec * 1000000 + (int64_t)tv. tv_usec); +} + +#define __BUFFERSIZE 8 * 32768 + + wavFiles::wavFiles (QString f) { +SF_INFO *sf_info; + + fileName = f; + myFrame = new QFrame; + setupUi (myFrame); + myFrame -> show (); + + tester = 3; + readerOK = false; + _I_Buffer = new RingBuffer>(__BUFFERSIZE); + + sf_info = (SF_INFO *)alloca (sizeof (SF_INFO)); + sf_info -> format = 0; + filePointer = sf_open (f. toUtf8 (). data (), SFM_READ, sf_info); + if (filePointer == NULL) { + fprintf (stderr, "file %s no legitimate sound file\n", + f. toUtf8 ().data ()); + delete myFrame; + throw (24); + } + if ((sf_info -> samplerate != 2048000) || + (sf_info -> channels != 2)) { + fprintf (stderr, "This is not a recorded dab file, sorry\n"); + sf_close (filePointer); + delete myFrame; + throw (25); + } + nameofFile -> setText (f); + readerOK = true; + readerPausing = true; + currPos = 0; +// start (); +} + + wavFiles::~wavFiles (void) { + ExitCondition = true; + if (readerOK) { + while (isRunning ()) + usleep (100); + sf_close (filePointer); + } + delete _I_Buffer; + delete myFrame; +} + +bool wavFiles::restartReader (void) { + if (readerOK) + readerPausing = false; + start (); + return readerOK; +} + +void wavFiles::stopReader (void) { + if (readerOK) + readerPausing = true; +} + +// size is in I/Q pairs +int32_t wavFiles::getSamples (std::complex *V, int32_t size) { +int32_t amount; + + + if (filePointer == NULL) + return 0; + + while (_I_Buffer -> GetRingBufferReadAvailable () < size) + if (readerPausing) + usleep (100000); + else + usleep (100); + + amount = _I_Buffer -> getDataFromBuffer (V, size); + + return amount; +} + +int32_t wavFiles::Samples (void) { + return _I_Buffer -> GetRingBufferReadAvailable (); +} + +void wavFiles::run (void) { +int32_t t, i; +std::complex *bi; +int32_t bufferSize = 32768; +int64_t period; +int64_t nextStop; + + if (!readerOK) + return; + + ExitCondition = false; + + period = (32768 * 1000) / 2048; // full IQś read + fprintf (stderr, "Period = %ld\n", period); + bi = new std::complex [bufferSize]; + nextStop = getMyTime (); + while (!ExitCondition) { + if (readerPausing) { + usleep (1000); + nextStop = getMyTime (); + continue; + } + while (_I_Buffer -> WriteSpace () < bufferSize) { + if (ExitCondition) + break; + usleep (100); + } + + nextStop += period; + t = readBuffer (bi, bufferSize); + if (t < bufferSize) { + for (i = t; i < bufferSize; i ++) + bi [i] = 0; + t = bufferSize; + } + _I_Buffer -> putDataIntoBuffer (bi, bufferSize); + if (nextStop - getMyTime () > 0) + usleep (nextStop - getMyTime ()); + } + fprintf (stderr, "taak voor replay eindigt hier\n"); fflush (stderr); +} +/* + * length is number of uints that we read. + */ +int32_t wavFiles::readBuffer (std::complex *data, int32_t length) { +int32_t i, n; +float temp [2 * length]; + + n = sf_readf_float (filePointer, temp, length); + if (n < length) { + sf_seek (filePointer, 0, SEEK_SET); + fprintf (stderr, "End of file, restarting\n"); + } + for (i = 0; i < n; i ++) + data [i] = std::complex (temp [2 * i], temp [2 * i + 1]); + return n & ~01; +} + diff --git a/devices/wavfiles/wavfiles.h b/devices/wavfiles/wavfiles.h new file mode 100644 index 0000000..e8212a7 --- /dev/null +++ b/devices/wavfiles/wavfiles.h @@ -0,0 +1,61 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __WAV_FILES__ +#define __WAV_FILES__ + +#include +#include +#include +#include +#include "dab-constants.h" +#include "virtual-input.h" +#include "ringbuffer.h" + +#include "ui_filereader-widget.h" + +class wavFiles: public virtualInput, + public Ui_filereaderWidget, QThread { +public: + wavFiles (QString); + ~wavFiles (void); + int32_t getSamples (std::complex *, int32_t); + uint8_t myIdentity (void); + int32_t Samples (void); + bool restartReader (void); + void stopReader (void); +private: + QString fileName; + int tester; + QFrame *myFrame; +virtual void run (void); + int32_t readBuffer (std::complex *, int32_t); + RingBuffer> *_I_Buffer; + int32_t bufferSize; + SNDFILE *filePointer; + bool readerOK; + bool readerPausing; + bool ExitCondition; + int64_t currPos; +}; + +#endif + diff --git a/forms/dabradio.ui b/forms/dabradio.ui new file mode 100644 index 0000000..0879f47 --- /dev/null +++ b/forms/dabradio.ui @@ -0,0 +1,409 @@ + + + dabradio + + + + 0 + 0 + 453 + 405 + + + + dabradio + + + + + + 10 + 150 + 191 + 31 + + + + <html><head/><body><p>Select a device (channel) for the audio output. On program start up a default is chosen.</p></body></html> + + + + Select audio device + + + + + + + 100 + 110 + 101 + 41 + + + + <html><head/><body><p>Select the DAB channel.</p><p>This depends on the band chosen.</p></body></html> + + + + + + 30 + 300 + 161 + 21 + + + + + + + + + + 20 + 340 + 401 + 41 + + + + <html><head/><body><p>Dynamic label (DLS)</p><p>The selected program may carry some textual information, that information is displayed here.</p></body></html> + + + QFrame::NoFrame + + + QFrame::Plain + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + true + + + true + + + Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 210 + 10 + 221 + 321 + + + + + + + 20 + 280 + 171 + 20 + + + + <html><head/><body><p>Copyright (C) 2016, 2017 Jan van Katwijk (J.vanKatwijk@gmail.com), Lazy Chair Programming</p><p>Qt-DAB 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; either version 2 of the License, or (at your option) any later version.<br/></p></body></html> + + + + + + + + + 90 + 1 + 51 + 21 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + + + 190 + 190 + 190 + + + + + + + + + 10 + + + + <html><head/><body><p>Indicator for time synchronization</p><p>Green means that the software recognizes that there are DAB frames, not necessarily that the software is able to decode the DAB stream.</p></body></html> + + + QFrame::NoFrame + + + Sync + + + Qt::AlignCenter + + + + + + 120 + 70 + 71 + 31 + + + + <html><head/><body><p>Ensemble ID</p><p>The hecadecimal number shows the ensemble ID.</p></body></html> + + + QFrame::NoFrame + + + 4 + + + QLCDNumber::Hex + + + QLCDNumber::Flat + + + + + + 10 + 30 + 191 + 31 + + + + + 18 + + + + <html><head/><body><p>Ensemble name</p></body></html> + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + 160 + 0 + 41 + 21 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 190 + 190 + 190 + + + + + + + 190 + 190 + 190 + + + + + + + + + 10 + + + + <html><head/><body><p>Stereo label</p><p>Green means that the program is in stereo.<br/>Red means no audio or mono transmission.</p></body></html> + + + QFrame::NoFrame + + + ST + + + Qt::AlignCenter + + + + + + 10 + 60 + 91 + 51 + + + + + 11 + + + + <html><head/><body><p>Push this button for further technical information about the selected program</p><p>Push again for closing the pop-up-window.</p></body></html> + + + Technical +details + + + + + + 10 + 110 + 91 + 41 + + + + <html><head/><body><p>Push this button for starting a scan over the channels in the current selected band (default VHF Band III or optionally L-Band)</p><p>During the scan a list of all services of all ensembles will be built and presented. One may select</p><p>a service from this list.</p><p>Push again to stop scanning.</p></body></html> + + + Scan band + + + + + + 40 + 0 + 21 + 21 + + + + + 14 + + + + <html><head/><body><p>DAB2 copyright:</p><p>J van Katwijk, Lazy Chair Computing. J.vanKatwijk@gmail.com</p><p>Copyright of the Qt toolkit used: the Qt Company</p><p>Copyright of the libraries used for SDRplay, rtl-sdr based sticks, AIRspy, portaudio, libsndfile and libsamplerate libfaad to their developers</p><p>Copyright of the MP2 library used Martin J Fiedler</p><p>Copyright of the firecode checker: Gnu Radio</p><p>Copyright of the viterbi decoder kernel: the Spiral project</p><p>Copyright of the Reed Solomon Decoder software: Phil Karns</p><p>All copyrights gratefully acknowledged</p><p><br/></p><p>DAB2 (an SDR-J 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 for more details.</p><p><br/></p></body></html> + + + © + + + Qt::AlignCenter + + + + + + 10 + 180 + 191 + 91 + + + + + + + + + QwtPlot + QFrame +
qwt_plot.h
+
+
+ + +
diff --git a/forms/technical_data.ui b/forms/technical_data.ui new file mode 100644 index 0000000..9d8dc9b --- /dev/null +++ b/forms/technical_data.ui @@ -0,0 +1,528 @@ + + + technical_data + + + + 0 + 0 + 249 + 561 + + + + Technical Details + + + + + 160 + 190 + 64 + 23 + + + + QFrame::NoFrame + + + QLCDNumber::Flat + + + + + + 160 + 220 + 64 + 23 + + + + QFrame::NoFrame + + + QLCDNumber::Flat + + + + + + 120 + 350 + 101 + 21 + + + + <html><head/><body><p>Language (defined by provider)</p></body></html> + + + QFrame::NoFrame + + + language + + + + + + 20 + 190 + 141 + 20 + + + + Start Address of CU + + + + + + 20 + 220 + 121 + 20 + + + + Used CUs + + + + + + 120 + 370 + 101 + 21 + + + + <html><head/><body><p>PTY (Program Type)</p></body></html> + + + QFrame::NoFrame + + + programType + + + + + + 20 + 280 + 121 + 20 + + + + Bitrate in kBit/s + + + + + + 160 + 280 + 64 + 23 + + + + QFrame::NoFrame + + + QLCDNumber::Flat + + + + + + 160 + 250 + 64 + 23 + + + + QFrame::NoFrame + + + QLCDNumber::Flat + + + + + + 20 + 250 + 111 + 20 + + + + Subchannel ID + + + + + + 120 + 310 + 101 + 21 + + + + + 0 + 20 + + + + <html><head/><body><p>Shows Protection Level and Type (A or B)</p></body></html> + + + QFrame::NoFrame + + + uepField + + + + + + 120 + 330 + 101 + 21 + + + + QFrame::NoFrame + + + ASCTy + + + + + + 20 + 50 + 221 + 31 + + + + + 16 + + + + <html><head/><body><p>Ensemble Name</p></body></html> + + + ensemble + + + + + + 20 + 80 + 141 + 31 + + + + + 12 + + + + <html><head/><body><p>Frequency in MHz</p><p>Only shown when the input is not a pre-recorded file.</p></body></html> + + + QFrame::NoFrame + + + QFrame::Raised + + + true + + + 8 + + + QLCDNumber::Flat + + + + + + 180 + 90 + 41 + 31 + + + + + 10 + + + + <html><head/><body><p>Frequency in MHz</p><p>Only shown when the input is not a pre-recorded file.</p></body></html> + + + MHz + + + + + + 20 + 400 + 201 + 23 + + + + <html><head/><body><p>Quality of FIC decoding, 100 is good</p></body></html> + + + 24 + + + + + + 20 + 430 + 201 + 23 + + + + <html><head/><body><p>Frame errors. Indication of the quality of the DAB+ frame detection. 100 is good.</p></body></html> + + + 24 + + + + + + 20 + 460 + 201 + 23 + + + + <html><head/><body><p>Quality of the DAB+ frames. </p><p>Indicator for the amount of times meaning the frames contain more errors than the Reed Solomon correction can correct. </p><p>100 is good.</p></body></html> + + + 24 + + + + + + 20 + 490 + 201 + 23 + + + + <html><head/><body><p>Indicator of the success rate of handling the AAC frames in the DAB+ transmissions.</p></body></html> + + + 24 + + + + + + 20 + 158 + 121 + 20 + + + + CPU Usage in % + + + + + + 20 + 120 + 221 + 31 + + + + + 16 + + + + <html><head/><body><p><span style=" font-size:14pt;">Service name</span></p></body></html> + + + programName + + + + + + 180 + 530 + 41 + 20 + + + + <html><head/><body><p>Slide show indicator</p><p>Green means MOT frames are received.</p></body></html> + + + <html><head/><body><p><span style=" color:#ffffff;">MOT</span></p></body></html> + + + Qt::AlignCenter + + + + + + 20 + 530 + 151 + 20 + + + + MOT Decoding + + + + + + 20 + 310 + 91 + 21 + + + + + 0 + 17 + + + + Prot. level: + + + + + + 20 + 330 + 91 + 21 + + + + Type: + + + + + + 20 + 350 + 91 + 21 + + + + Language: + + + + + + 20 + 370 + 91 + 21 + + + + PTY: + + + + + + 160 + 160 + 64 + 23 + + + + QFrame::NoFrame + + + QLCDNumber::Flat + + + + + + 20 + 10 + 64 + 23 + + + + QFrame::NoFrame + + + 3 + + + QLCDNumber::Flat + + + + + + 133 + 10 + 71 + 23 + + + + QFrame::NoFrame + + + QLCDNumber::Flat + + + + + + diff --git a/i18n/de_DE.qm b/i18n/de_DE.qm new file mode 100644 index 0000000..b1cd3ce Binary files /dev/null and b/i18n/de_DE.qm differ diff --git a/i18n/de_DE.ts b/i18n/de_DE.ts new file mode 100644 index 0000000..96b391a --- /dev/null +++ b/i18n/de_DE.ts @@ -0,0 +1,843 @@ + + + + + CAndroid_RTL_SDR + + Android RTL-SDR driver is not installed + Android RTL-SDR Treiber ist nicht installiert + + + Do you would like to install it? After install start welle.io again. + Soll er installiert werden? welle.io muss nach der Treiberinstallation neu gestartet werden. + + + + CDABConstants + + + none + nicht gesetzt + + + + News + Nachrichten + + + + Current Affairs + Aktuelle Nachrichten + + + + Information + Informationen + + + + Sport + Sport + + + + Education + Bildung + + + + Drama + Drama + + + + Arts + Kunst + + + + Science + Forschung + + + + Talk + Talk + + + + Pop Music + Pop + + + + Rock Music + Rock + + + + Easy Listening + + + + + Light classical + Klassik + + + + Classical Music + Klassik + + + + Other Music + + + + + Weather + Wetter + + + + Finance + Finanzen + + + + Children's + Kinder + + + + Factual + + + + + Religion + Religion + + + + Phone In + + + + + Travel + Reise + + + + Leisure + + + + + Jazz and Blues + + + + + Country Music + Country + + + + National Music + + + + + Oldies Music + Oldies + + + + Folk Music + + + + + entry 29 not used + + + + + entry 30 not used + + + + + entry 31 not used + + + + + Unknown + Unbekannt + + + + Albanian + + + + + Breton + + + + + Catalan + + + + + Croatian + + + + + Welsh + + + + + Czech + + + + + Danish + + + + + German + Deutsch + + + + English + Englisch + + + + Spanish + Spanisch + + + + Esperanto + Esperanto + + + + Estonian + Estnisch + + + + Basque + Baskisch + + + + Faroese + Färöisch + + + + French + Französisch + + + + Frisian + Friesisch + + + + Irish + Irisch + + + + Gaelic + + + + + Galician + + + + + Icelandic + Isländisch + + + + Italian + Italienisch + + + + Lappish + + + + + Latin + Latein + + + + Latvian + + + + + Luxembourgian + + + + + Lithuanian + + + + + Hungarian + Ungarisch + + + + Maltese + Maltesisch + + + + Dutch + Niederländisch + + + + Norwegian + Norwegisch + + + + Occitan + + + + + Polish + Polnisch + + + + Portuguese + Portugiesisch + + + + Romanian + Rumänisch + + + + Romansh + + + + + Serbian + Serbisch + + + + Slovak + Slowakisch + + + + Slovene + Slowenisch + + + + Finnish + Finnisch + + + + Swedish + Schwedisch + + + + Turkish + Türkisch + + + + Flemish + + + + + Walloon + + + + + CGUI + + + Station list is empty + Keine Sender vorhanden + + + + version + Version + + + + Git revision + Git Revision + + + + Build on + Übersetzt am + + + + QT version + + + + + CRadioController + + + Unknown + Unbekannt + + + + + No Station + Kein Sender gewählt + + + + RAW File + RAW Datei + + + + + Scanning + Scanne + + + + + Found channels + Gefundene Sender + + + + Lost signal or bad signal quality, trying to find it again. + Kein oder schlechter Empfang. Suche Sender neu. + + + + Radio device is not ready or does not exits. + Radioempfänger meldet einen Fehler oder existiert nicht. + + + + + Tuning + Suche + + + + ChannelBrowser + + + + + + + + + Found channels + Gefundene Sender + + + + Automatic RF gain + Auto HF-Verstärkung + + + + Manual gain + Manuelle Verstärkung + + + + Value: + Aktuell: + + + Select channel manually + Manuelle Kanalwahl + + + + Clear station list + Lösche Senderliste + + + + Full screen mode + Vollbildmodus + + + + Channel list layout + + + + + Expert mode + Expertenmodus + + + + Exit welle.io + welle.io beenden + + + + ExpertView + + + Device + Radioempfänger + + + + Current channel + Aktueller Kanal + + + + Frequency correction + Frequenzkorrektur + + + + SNR + SNR + + + + Frame errors + Framefehler + + + + RS errors + RS Fehler + + + + AAC errors + AAC Framefehler + + + + Frame synchronization + Synchronisation + + + + FIC CRC + FIC CRC + + + + + OK + OK + + + + Not synced + Nicht synchron + + + + Error + Fehler + + + + QObject + + + No valid device found use Null device instead. + Kein Radioempfänger gefunden. + + + + Error while opening device + Fehler beim Zugriff auf Empfänger + + + + Unknown RAW file format + Unbekanntes RAW-Dateiformat + + + + Cannot open file + Fehler beim Öffnen der Datei + + + + End of file, restarting + RAW-Datei zu Ende, beginne von vorn + + + AGC overload. Maybe you are using a to high gain. + HF-Eingangsverstärkung ist zu groß (AGC ist übersteuert). + + + + + ADC overload. Maybe you are using a to high gain. + + + + + RTL-SDR is unplugged. + RTL-SDR wurde entfernt. + + + + RTL-TCP connection closed. + + + + + Connection failed to server + Verbindungsfehler zu Server + + + + SettingsPage + + + Channel scan + Sendersuchlauf + + + + Start + Start + + + + Stop + Stopp + + + + Found channels + Gefundene Sender + + + + Found stations + Gefundene Programme + + + + Hardware RF gain + + + + + Automatic RF gain + Auto HF-Verstärkung + + + + Manual gain + Manuelle Verstärkung + + + + Value: + Aktuell: + + + + Full screen mode + Vollbildmodus + + + + Channel list layout (experimental) + + + + + Expert mode + Expertenmodus + + + Select channel manually + Manuelle Kanalwahl + + + + Clear station list + Lösche Senderliste + + + + Exit welle.io + welle.io beenden + + + + SpectrumView + + + Spectrum + Spektrum + + + + Amplitude + Amplitude + + + + Frequency + Frequenz + + + + TouchSwitch + + + ON + AN + + + + OFF + AUS + + + + main + + + Set the GUI language (e.g. de-DE) + GUI Sprache festlegen + + + + Language + Sprache + + + Input device + Radioempfänger + + + + Input device. Possible is: auto (default), airspy, rtl_tcp, rtl_sdr, rawfile, soapysdr + + + + + Name + Name + + + + DAB mode. Possible is: 1, 2 or 4, default: 1 + DAB Mode. Möglich ist 1, 2 oder 4, Standard: 1 + + + + Mode + Modus + + + + rtl_tcp server IP address. Only valid for input rtl_tcp. + rtl_tcp server IP Adresse. Nur gültig für Empfänger rtl_tcp. + + + + IP address + IP-Adresse + + + + rtl_tcp server IP port. Only valid for input rtl_tcp. + IP Port. Nur gültig für Empfänger rtl_tcp. + + + + Port + Port + + + + I/Q RAW file. Only valid for input rawfile. + I/Q RAW Datei als Radioempfänger. Nur gültig für Empfänger rawfile. + + + + I/Q RAW file + I/Q RAW Rohdatei + + + + I/Q RAW file format. Possible is: u8 (standard), s8, s16le, s16be. Only valid for input rawfile. + I/Q RAW Rohdateiformat. Möglich ist u8 (Standard), s8, s16le, s16be. Nur gültig für Radioempfänger rawfile. + + + + I/Q RAW file format + I/Q RAW Rohdatenformat + + + + Expert mode is enabled + Expertenmodus eingeschaltet + + + + Expert mode is disabled + Expertenmodus ausgeschaltet + + + diff --git a/i18n/hu_HU.qm b/i18n/hu_HU.qm new file mode 100644 index 0000000..3131cbf Binary files /dev/null and b/i18n/hu_HU.qm differ diff --git a/i18n/hu_HU.ts b/i18n/hu_HU.ts new file mode 100644 index 0000000..e401006 --- /dev/null +++ b/i18n/hu_HU.ts @@ -0,0 +1,816 @@ + + + + + CDABConstants + + + none + Meghatározatlan + + + + News + Hírek + + + + Current Affairs + Aktuális ügyek + + + + Information + Információ + + + + Sport + Sport + + + + Education + Oktatás + + + + Drama + Dráma + + + + Arts + Kultúra + + + + Science + Tudomány + + + + Talk + Vegyes + + + + Pop Music + Popzene + + + + Rock Music + Rockzene + + + + Easy Listening + Lágy zenék + + + + Light classical + Könnyű klasszikus zene + + + + Classical Music + Komoly klasszikus zene + + + + Other Music + Egyéb zene + + + + Weather + Időjárás + + + + Finance + Pénzügy + + + + Children's + Gyermekprogramok + + + + Factual + Szociális ügyek + + + + Religion + Vallás + + + + Phone In + Telefonos műsor + + + + Travel + Utazás + + + + Leisure + Szabadidő + + + + Jazz and Blues + Jazz + + + + Country Music + Country + + + + National Music + Nemzet zenéje + + + + Oldies Music + Régi slágerek + + + + Folk Music + Népzene + + + + entry 29 not used + Dokumentumműsor + + + + entry 30 not used + Riadó próbája + + + + entry 31 not used + Riadó + + + + Unknown + Ismeretlen + + + + Albanian + Albán + + + + Breton + Breton + + + + Catalan + Katalán + + + + Croatian + Horvát + + + + Welsh + Walesi + + + + Czech + Cseh + + + + Danish + Dán + + + + German + Német + + + + English + Angol + + + + Spanish + Spanyol + + + + Esperanto + Eszperantó + + + + Estonian + Észt + + + + Basque + Baszk + + + + Faroese + Feröeri + + + + French + Francia + + + + Frisian + Fríz + + + + Irish + Ír + + + + Gaelic + Gall + + + + Galician + Galíciai + + + + Icelandic + Izlandi + + + + Italian + Olasz + + + + Lappish + Lapp + + + + Latin + Latin + + + + Latvian + Lett + + + + Luxembourgian + Luxemburgi + + + + Lithuanian + Litván + + + + Hungarian + Magyar + + + + Maltese + Máltai + + + + Dutch + Holland + + + + Norwegian + Norvég + + + + Occitan + Provanszál + + + + Polish + Lengyel + + + + Portuguese + Portugál + + + + Romanian + Román + + + + Romansh + Romans + + + + Serbian + Szerb + + + + Slovak + Szlovák + + + + Slovene + Szlovén + + + + Finnish + Finn + + + + Swedish + Svéd + + + + Turkish + Török + + + + Flemish + Flamand + + + + Walloon + Vallon + + + + CGUI + + + version + verzió + + + + Git revision + Git revízió + + + + Build on + Készült + + + + QT version + QT verzió + + + + Station list is empty + Állomáslista üres + + + + CRadioController + + + Unknown + Ismeretlen + + + + + No Station + Nincs állomás + + + + + Tuning + Hangolás + + + + RAW File + RAW Fájl + + + + + Scanning + Keresés + + + + + Found channels + Megtalált állomások + + + + Radio device is not ready or does not exits. + A rádióvevő nem áll készen vagy nincs. + + + + Lost signal or bad signal quality, trying to find it again. + Nincs jel vagy rossz jelminőség, próbálja újra a hangolást. + + + + ChannelBrowser + + + + + + + + + Found channels + Megtalált állomások + + + + Automatic RF gain + Automatikus RF erősítés + + + + Manual gain + Kézi RF erősítés + + + + Value: + Érték: + + + + Clear station list + Állomáslista törlése + + + + Full screen mode + Teljesképernyő mód + + + + Channel list layout + Állomáslista elrendezés + + + + Expert mode + Haladó mód + + + + Exit welle.io + Kilépés welle.io-ból + + + + ExpertView + + + Device + Eszköz + + + + Current channel + Aktuális csatorna + + + + Frequency correction + Frekvencia korrekció + + + + SNR + Jel-zaj viszony + + + + Frame errors + Frame hibák + + + + RS errors + RS hibák + + + + AAC errors + AAC hibák + + + + Frame synchronization + Frame szinkronizálás + + + + + OK + Rendben + + + + Not synced + Nem szinkronizált + + + + FIC CRC + FIC CRC + + + + Error + Hiba + + + + QObject + + + No valid device found use Null device instead. + Megfelelő rádióvevő nem található, helyette a "Null" eszköz van használatban. + + + + Error while opening device + Hiba az eszköz megnyitásakor + + + + Unknown RAW file format + Ismeretlen RAW fájl formátum + + + + Cannot open file + A fájl nem nyitható + + + + End of file, restarting + Fájlnak vége, újraindítás + + + + + ADC overload. Maybe you are using a to high gain. + ADC túlterhelve. Talán túl nagy erősítést használsz. + + + + RTL-SDR is unplugged. + RTL-SDR nincs csatlakoztatva + + + + RTL-TCP connection closed. + RTL-TCP kapcsolat zárva + + + + Connection failed to server + Szerverkapcsolat hiba + + + + SettingsPage + + + Found channels + Megtalált állomások száma + + + + Channel scan + Állomás keresés + + + + Start + Indít + + + + Stop + Megállít + + + + Found stations + Megtalált állomások száma + + + + Clear station list + Állomáslista törlése + + + + Hardware RF gain + Hardveres RF erősítés + + + + Automatic RF gain + Automatikus RF erősítés + + + + Manual gain + Kézi RF erősítés + + + + Value: + Érték: + + + + Full screen mode + Teljesképernyő mód + + + + Channel list layout (experimental) + Állomáslista elrendezés (kisérleti) + + + + Expert mode + Haladó mód + + + + Exit welle.io + Kilépés welle.io-ból + + + + SpectrumView + + + Spectrum + Spektrum + + + + Amplitude + Amplitúdó + + + + Frequency + Frekvencia + + + + TouchSwitch + + + ON + BE + + + + OFF + KI + + + + main + + + Expert mode is enabled + Haladó mód bekapcsolva + + + + Expert mode is disabled + Haladó mód kikapcsolva + + + + Set the GUI language (e.g. de-DE) + Kezelőfelület nyelvének beállítása (pld: hu-HU) + + + + Language + Nyelv + + + + Input device. Possible is: auto (default), airspy, rtl_tcp, rtl_sdr, rawfile, soapysdr + Bemeneti eszköz. Választható: auto (alapértelmezett), airspy, rtl_tcp, rtl_sdr, rawfile, soapysdr + + + + Name + Név + + + + DAB mode. Possible is: 1, 2 or 4, default: 1 + DAB mód: Választható: 1, 2 vagy 4, alapértelmezett:1 + + + + Mode + Mód + + + + rtl_tcp server IP address. Only valid for input rtl_tcp. + rtl_tcp szerver IP cím. Csak a bemeneti rtl_tcp-re érvényes. + + + + IP address + IP cím + + + + rtl_tcp server IP port. Only valid for input rtl_tcp. + rtl_tcp szerver IP port. Csak a bemeneti rtl_tcp-re érvényes. + + + + Port + Port + + + + I/Q RAW file. Only valid for input rawfile. + I/Q RAW fájl. Csak a bemeneti raw fáljra érvényes. + + + + I/Q RAW file + I/Q RAW fájl + + + + I/Q RAW file format. Possible is: u8 (standard), s8, s16le, s16be. Only valid for input rawfile. + I/Q RAW fájl formátum. Válaszható: u8(alapértelmezett), s8, s16le. Csak a bemeneti raw fájlra érvényes. + + + + I/Q RAW file format + I/Q RAW fájl formátum + + + diff --git a/i18n/it_IT.qm b/i18n/it_IT.qm new file mode 100644 index 0000000..8fe7e8f Binary files /dev/null and b/i18n/it_IT.qm differ diff --git a/i18n/it_IT.ts b/i18n/it_IT.ts new file mode 100644 index 0000000..c19bde8 --- /dev/null +++ b/i18n/it_IT.ts @@ -0,0 +1,753 @@ + + + + + CAndroid_RTL_SDR + + + + Android RTL-SDR driver is not installed + Il driver RTL-SDR per Android non è installato + + + + Do you would like to install it? After install start welle.io again. + Vuoi installarlo? Una volta installato riapri welle.io. + + + + CDABConstants + + + none + Nessuno + + + + news + Notizie + + + + current affairs + Attualità + + + + information + Informazione + + + + sport + Sport + + + + education + Educazione + + + + dram + Dramma + + + + arts + Arti + + + + science + Scienza + + + + talk + Discorso + + + + pop music + Pop + + + + rock music + Rock + + + + easy listening + Easy Listening + + + + light classical + Musica leggera + + + + classical music + Classica + + + + other music + Altra musica + + + + wheather + Meteo + + + + finance + Finanza + + + + children's + Bambini + + + + factual + Fatti + + + + religion + Religione + + + + phone in + Chiamata + + + + travel + Viaggio + + + + leisure + Svago + + + + jazz and blues + Jazz and Blues + + + + country music + Country + + + + national music + Musica Nazionale + + + + oldies music + Oldies + + + + folk music + Musica Folk + + + + entry 29 not used + + + + + entry 30 not used + + + + + entry 31 not used + + + + + Unknown + Sconosciuto + + + + Albanian + Albanese + + + + Breton + Bretone + + + + Catalan + Catalano + + + + Croatian + Croato + + + + Welsh + Gallese + + + + Czech + Ceco + + + + Danish + Danese + + + + German + Tedesco + + + + English + Inglese + + + + Spanish + Spagnolo + + + + Esperanto + Esperanto + + + + Estonian + Estone + + + + Basque + Basco + + + + Faroese + Faroese + + + + French + Francese + + + + Frisian + Frisone + + + + Irish + Irlandese + + + + GaeliC + Gaelico + + + + Galician + Gallego + + + + IcelandiC + Islandese + + + + Italian + Italiano + + + + Lappish + Lappone + + + + Latin + LAtino + + + + Latvian + Lettone + + + + Luxembourgian + Lussemburghese + + + + Lithuanian + Lituano + + + + Hungarian + Ungherese + + + + Maltese + Maltese + + + + Dutch + Olandese + + + + Norwegian + Norvegese + + + + Occitan + Occitano + + + + Polish + Polacco + + + + Postuguese + Portoghese + + + + Romanian + Rumeno + + + + Romansh + Ladino + + + + Serbian + Serbo + + + + Slovak + Slovacco + + + + Slovene + Sloveno + + + + Finnish + Finlandese + + + + Swedish + Svedese + + + + Tuskish + Turco + + + + Flemish + Fiammingo + + + + Walloon + Vallone + + + + CGUI + + + Station list is empty + La lista delle stazioni è vuota + + + + version + versione + + + + Git revision + Versione di Git + + + + Build on + Compilata il + + + + CRadioController + + + Unknown + Sconosciuto + + + + + No Station + Nessuna Stazione + + + + RAW File + File RAW + + + + Scanning + Cerco + + + + Lost signal or bad signal quality, trying to find it again. + Segnale perso o debole, provo a ritrovarlo. + + + + Radio device is not ready or does not exits. + Il dispositivo radio non è pronto o non è connesso. + + + + Tuning + Sintonizzo + + + + ExpertView + + + Device + Dispositivo + + + + Current channel + Canale attuale + + + + Frequency correction + Correzione di frequenza + + + + SNR + SNR + + + + Frame errors + Errori di frame + + + + RS errors + Errore RS + + + + AAC errors + Errori AAC + + + + Frame synchronization + Sincronizzazione + + + + FIC CRC + FIC CRC + + + + + OK + OK + + + + Not synced + Non sincronizzato + + + + Error + Errore + + + + QObject + + + No valid device found use Null device instead. + Nessun dispositivo radio valido trovato. + + + + Error while opening device + Errore all'apertura del dispositivo + + + + Unknown RAW file format + Formato del file RAW sconosciuto + + + + Cannot open file + Non posso aprire il file + + + + End of file, restarting + Fine del file RAW, riavvio + + + + + ADC overload. Maybe you are using a to high gain. + Sovraccarico ADC. Forse stai usando troppo guadagno. + + + + RTL-SDR is unplugged. + Il dispositivo RTL-SDR è scollegato. + + + + Connection failed to server + Connessione al server fallita + + + + SettingsPage + + + Channel scan + Scansione canali + + + + Start + Inizia + + + + Stop + Ferma + + + + Found channels + Canali trovati + + + + Found stations + Stazioni trovate + + + + Automatic RF gain + Guadagno RF automatico + + + + Manual gain + Guadagno manuale + + + + Value: + Valore: + + + + Full screen mode + Modalità tutto schermo + + + + Expert mode + Modalità pro + + + + Select channel manually + Seleziona il canale manualmente + + + + Clear station list + Elimina la lista delle stazioni + + + + Exit welle.io + Esci da welle.io + + + + SpectrumView + + + Spectrum + Spettro + + + + Amplitude + Ampiezza + + + + Frequency + Frequenza + + + + TouchSwitch + + + ON + ON + + + + OFF + OFF + + + + main + + + Set the GUI language (e.g. de-DE) + Imposta il linguaggio della GUI (es. it-IT) + + + + Language + Lingua + + + + Input device + Dispositivo radio + + + + Name + Nome + + + + DAB mode. Possible is: 1, 2 or 4, default: 1 + Modalità DAB. Consentiti: 1, 2 o 4, default: 1 + + + + Mode + Modo + + + + rtl_tcp server IP address. Only valid for input rtl_tcp. + Indirizzo IP del server rtl_tcp. Valido solo per rtl_tcp. + + + + IP address + Indirizzo IP + + + + rtl_tcp server IP port. Only valid for input rtl_tcp. + Porta del server rtl_tcp. Valido solo per rtl_tcp. + + + + Port + Porta + + + + I/Q RAW file. Only valid for input rawfile. + File I/Q RAW. Valido solo per file raw. + + + + I/Q RAW file + I/Q RAW File + + + + I/Q RAW file format. Possible is: u8, s16le, default: u8. Only valid for input rawfile. + Formato file I/Q RAW. Ammesso: u8, s16le, default: u8. Valido solo per file raw. + + + + I/Q RAW file format + Formato file I/Q RAW + + + + Expert mode is enabled + La modalità esperto è abilitata + + + + Expert mode is disabled + La modalità esperto è disabilitata + + + diff --git a/icon.ico b/icon.ico new file mode 100644 index 0000000..a4b4075 Binary files /dev/null and b/icon.ico differ diff --git a/includes/backend/.charsets.h.swp b/includes/backend/.charsets.h.swp new file mode 100644 index 0000000..4a713a0 Binary files /dev/null and b/includes/backend/.charsets.h.swp differ diff --git a/includes/backend/audio-backend.h b/includes/backend/audio-backend.h new file mode 100644 index 0000000..c1956b1 --- /dev/null +++ b/includes/backend/audio-backend.h @@ -0,0 +1,85 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __AUDIO_BACKEND__ +#define __AUDIO_BACKEND__ + +#include +#include "virtual-backend.h" +#include +#ifdef __THREADED_BACKEND +#include +#include +#endif +#include "ringbuffer.h" +#include + +class frameProcessor; +class protection; +class RadioInterface; + +#ifdef __THREADED_BACKEND +class audioBackend:public QThread, public virtualBackend { +#else +class audioBackend:public virtualBackend { +#endif +public: + audioBackend (RadioInterface *mr, + audiodata *d, + RingBuffer *, + QString picturesPath); + ~audioBackend (void); +int32_t process (int16_t *, int16_t); +void stopRunning (void); +protected: + RadioInterface *myRadioInterface; + RingBuffer *audioBuffer; +private: +#ifdef __THREADED_BACKEND +void run (void); + atomic running; + QSemaphore freeSlots; + QSemaphore usedSlots; + int16_t *theData [20]; + int16_t nextIn; + int16_t nextOut; +#endif +void processSegment (int16_t *Data); + + uint8_t dabModus; + int16_t fragmentSize; + int16_t bitRate; + bool shortForm; + int16_t protLevel; + std::vector outV; + int16_t **interleaveData; + std::vector tempX; + int16_t countforInterleaver; + int16_t interleaverIndex; + std::vector disperseVector; + + protection *protectionHandler; + frameProcessor *our_dabProcessor; +}; + +#endif + diff --git a/includes/backend/audio/faad-decoder.h b/includes/backend/audio/faad-decoder.h new file mode 100644 index 0000000..5d4b386 --- /dev/null +++ b/includes/backend/audio/faad-decoder.h @@ -0,0 +1,61 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +# +#ifndef __FAAD_DECODER__ +#define __FAAD_DECODER__ +#include +#include "neaacdec.h" +#include "ringbuffer.h" + +class RadioInterface; + +class faadDecoder: public QObject{ +Q_OBJECT +public: + faadDecoder (RadioInterface *mr, + RingBuffer *buffer); + ~faadDecoder (void); +int16_t MP42PCM (uint8_t dacRate, + uint8_t sbrFlag, + int16_t mpegSurround, + uint8_t aacChannelMode, + uint8_t buffer [], + int16_t bufferLength); +private: +bool initialize (uint8_t dacRate, + uint8_t sbrFlag, + int16_t mpegSurround, + uint8_t aacChannelMode); + + bool processorOK; + bool aacInitialized; + uint32_t aacCap; + NeAACDecHandle aacHandle; + NeAACDecConfigurationPtr aacConf; + NeAACDecFrameInfo hInfo; + int32_t baudRate; + RingBuffer *audioBuffer; +signals: + void newAudio (int, int); +}; +#endif + diff --git a/includes/backend/audio/faad-decoder.h-old b/includes/backend/audio/faad-decoder.h-old new file mode 100644 index 0000000..d3583ba --- /dev/null +++ b/includes/backend/audio/faad-decoder.h-old @@ -0,0 +1,142 @@ +# +/* + * Copyright (C) 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the SDR-J (JSDR). + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * This file will be included in mp4processor +*/ +# +#include "neaacdec.h" +#include "audiosink.h" +#include "newconverter.h" + +class faadDecoder { +private: + bool processorOK; + bool aacInitialized; + uint32_t aacCap; + NeAACDecHandle aacHandle; + NeAACDecConfigurationPtr aacConf; + NeAACDecFrameInfo hInfo; + audioSink *ourSink; + int32_t baudRate; + newConverter *myConverter; + DSPCOMPLEX *tempBuffer; + bool corrector; +// +public: + faadDecoder (audioSink *as, bool corrector) { + ourSink = as; + this -> corrector = corrector; + aacCap = NeAACDecGetCapabilities (); + aacHandle = NeAACDecOpen (); + aacConf = NeAACDecGetCurrentConfiguration (aacHandle); + aacInitialized = false; + baudRate = 48000; + myConverter = new newConverter (); +// fprintf (stderr, "for 4096 samples in krijgen we %d samples uit\n", +// myConverter -> getOutputSize ()); + tempBuffer = new DSPCOMPLEX [480]; +} + + ~faadDecoder (void) { + NeAACDecClose (aacHandle); + delete myConverter; + delete [] tempBuffer; +} + +int16_t MP42PCM (uint8_t buffer [], int16_t bufferLength) { +int16_t len; +int16_t i; +int16_t samples; +uint8_t channels; +long unsigned int sample_rate; +int16_t *outBuffer; +NeAACDecFrameInfo hInfo; + + if (!aacInitialized) { + len = NeAACDecInit (aacHandle, + buffer, bufferLength, &sample_rate, &channels); + if (len < 0) { + fprintf (stderr, "Cannot handle this frame\n"); + return 0; + } + + outBuffer = (int16_t *)NeAACDecDecode (aacHandle, + &hInfo, + &buffer [len], + (uint64_t)(bufferLength - len)); + aacInitialized = true; + } + else + outBuffer = (int16_t *)NeAACDecDecode (aacHandle, + &hInfo, + buffer, + (uint64_t)bufferLength); + + sample_rate = hInfo. samplerate; + samples = hInfo. samples; + if ((sample_rate == 24000) || + (sample_rate == 48000) || + (sample_rate != baudRate)) + baudRate = sample_rate; + +// fprintf (stderr, "bytes consumed %d\n", (int)(hInfo. bytesconsumed)); +// fprintf (stderr, "samplerate = %d, samples = %d, channels = %d, error = %d, sbr = %d\n", sample_rate, samples, +// hInfo. channels, +// hInfo. error, +// hInfo. sbr); +// fprintf (stderr, "header = %d\n", hInfo. header_type); + channels = hInfo. channels; + if (hInfo. error != 0) { + fprintf (stderr, "Warning: %s\n", + faacDecGetErrorMessage (hInfo. error)); + return 0; + } + + if (channels == 2 && corrector) { + int16_t amount; + for (i = 0; i < samples / 2; i ++) { + if (myConverter -> add (outBuffer [2 * i], + outBuffer [2 * i + 1], + tempBuffer, &amount)) { + ourSink -> putSamples (tempBuffer, amount); + } + } + } + else + if (channels == 2) + ourSink -> audioOut (outBuffer, samples / 2); + else + if (channels == 1) { + int16_t *buffer = (int16_t *)alloca (2 * samples); + int16_t i; + for (i = 0; i < samples; i ++) { + buffer [2 * i] = ((int16_t *)outBuffer) [i]; + buffer [2 * i + 1] = buffer [2 * i]; + } + ourSink -> audioOut (buffer, samples); + } + else + fprintf (stderr, "Cannot handle these channels\n"); + + return samples / 2; +} + +}; diff --git a/includes/backend/audio/mp2processor.h b/includes/backend/audio/mp2processor.h new file mode 100644 index 0000000..5e4070a --- /dev/null +++ b/includes/backend/audio/mp2processor.h @@ -0,0 +1,102 @@ +# +/****************************************************************************** +** kjmp2 -- a minimal MPEG-1 Audio Layer II decoder library ** +******************************************************************************* +** Copyright (C) 2006 Martin J. Fiedler ** +** ** +** This software is provided 'as-is', without any express or implied ** +** warranty. In no event will the authors be held liable for any damages ** +** arising from the use of this software. ** +** ** +** Permission is granted to anyone to use this software for any purpose, ** +** including commercial applications, and to alter it and redistribute it ** +** freely, subject to the following restrictions: ** +** 1. The origin of this software must not be misrepresented; you must not ** +** claim that you wrote the original software. If you use this software ** +** in a product, an acknowledgment in the product documentation would ** +** be appreciated but is not required. ** +** 2. Altered source versions must be plainly marked as such, and must not ** +** be misrepresented as being the original software. ** +** 3. This notice may not be removed or altered from any source ** +** distribution. ** +******************************************************************************/ +// +// This software is a rewrite of the original kjmp2 software, +// Rewriting in the form of a class +// for use in the sdr-j DAB/DAB+ receiver +// all rights remain where they belong + +#ifndef __MP2PROCESSOR__ +#define __MP2PROCESSOR__ + +#include +#include +#include +#include "frame-processor.h" +#include +#include +#include "ringbuffer.h" +#include "pad-handler.h" + +#define KJMP2_MAX_FRAME_SIZE 1440 // the maximum size of a frame +#define KJMP2_SAMPLES_PER_FRAME 1152 // the number of samples per frame + +// quantizer specification structure +struct quantizer_spec { + int32_t nlevels; + uint8_t grouping; + uint8_t cw_bits; +}; + +class RadioInterface; + +class mp2Processor: public QObject, public frameProcessor { +Q_OBJECT +public: + mp2Processor (RadioInterface *, + int16_t, + RingBuffer *, + QString); + ~mp2Processor (void); + void addtoFrame (std::vector); + void setFile (FILE *); + +private: + RadioInterface *myRadioInterface; + int16_t bitRate; + padHandler my_padhandler; + int32_t mp2sampleRate (uint8_t *); + int32_t mp2decodeFrame (uint8_t *, int16_t *); + RingBuffer *buffer; + int32_t baudRate; + void setSamplerate (int32_t); + struct quantizer_spec *read_allocation (int, int); + void read_samples (struct quantizer_spec *, int, int *); + int32_t get_bits (int32_t); + int16_t V [2][1024]; + int16_t Voffs; + int16_t N [64][32]; + struct quantizer_spec *allocation[2][32]; + int32_t scfsi[2][32]; + int32_t scalefactor[2][32][3]; + int32_t sample[2][32][3]; + int32_t U[512]; + + int32_t bit_window; + int32_t bits_in_window; + uint8_t *frame_pos; + uint8_t *MP2frame; + int16_t MP2framesize; + int16_t MP2Header_OK; + int16_t MP2headerCount; + int16_t MP2bitCount; + void addbittoMP2 (uint8_t *, uint8_t, int16_t); + int16_t numberofFrames; + int16_t errorFrames; +signals: + void show_frameErrors (int); + void newAudio (int, int); + void isStereo (bool); +}; +#endif + diff --git a/includes/backend/audio/mp4processor.h b/includes/backend/audio/mp4processor.h new file mode 100644 index 0000000..c19ab16 --- /dev/null +++ b/includes/backend/audio/mp4processor.h @@ -0,0 +1,98 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __MP4PROCESSOR__ +#define __MP4PROCESSOR__ +/* + * Handling superframes for DAB+ and delivering + * frames into the ffmpeg or faad decoding library + */ +// +#include "dab-constants.h" +#include +#include +#include "audio-base.h" +#include "frame-processor.h" +#include "faad-decoder.h" +#include "firecode-checker.h" +#include "reed-solomon.h" +#include +#include "pad-handler.h" + +class RadioInterface; + +class mp4Processor : public QObject, public frameProcessor { +Q_OBJECT +public: + mp4Processor (RadioInterface *, + int16_t, + RingBuffer *, + QString); + ~mp4Processor (void); + void addtoFrame (std::vector); +private: + RadioInterface *myRadioInterface; + padHandler my_padhandler; + bool processSuperframe (uint8_t [], int16_t); + void handle_aacFrame (uint8_t *, + int16_t, + uint8_t, + uint8_t, + uint8_t, + uint8_t, + bool*); + int16_t superFramesize; + int16_t blockFillIndex; + int16_t blocksInBuffer; + int16_t blockCount; + int16_t bitRate; + uint8_t *frameBytes; + uint8_t **RSMatrix; + int16_t RSDims; + int16_t au_start [10]; + int32_t baudRate; + + int32_t au_count; + int16_t au_errors; + int16_t errorRate; + firecode_checker fc; + reedSolomon my_rsDecoder; + uint8_t *outVector; +// and for the aac decoder + faadDecoder aacDecoder; + int16_t frameCount; + int16_t successFrames; + int16_t frameErrors; + int16_t rsErrors; + int16_t aacErrors; + int16_t aacFrames; + int16_t charSet; +signals: + void show_frameErrors (int); + void show_rsErrors (int); + void show_aacErrors (int); + void isStereo (bool); +}; + +#endif + + diff --git a/includes/backend/audio/neaacdec.h b/includes/backend/audio/neaacdec.h new file mode 100644 index 0000000..3769d3f --- /dev/null +++ b/includes/backend/audio/neaacdec.h @@ -0,0 +1,265 @@ +/* +** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding +** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com +** +** 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; either version 2 of the License, or +** (at your option) any later version. +** +** 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 for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +** +** Any non-GPL usage of this software or parts of this software is strictly +** forbidden. +** +** The "appropriate copyright message" mentioned in section 2c of the GPLv2 +** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com" +** +** Commercial non-GPL licensing of this software is possible. +** For more info contact Nero AG through Mpeg4AAClicense@nero.com. +** +** $Id: neaacdec.h,v 1.13 2009/01/26 23:51:15 menno Exp $ +**/ + +#ifndef __NEAACDEC_H__ +#define __NEAACDEC_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#if 1 +/* MACROS FOR BACKWARDS COMPATIBILITY */ +/* structs */ +#define faacDecHandle NeAACDecHandle +#define faacDecConfiguration NeAACDecConfiguration +#define faacDecConfigurationPtr NeAACDecConfigurationPtr +#define faacDecFrameInfo NeAACDecFrameInfo +/* functions */ +#define faacDecGetErrorMessage NeAACDecGetErrorMessage +#define faacDecSetConfiguration NeAACDecSetConfiguration +#define faacDecGetCurrentConfiguration NeAACDecGetCurrentConfiguration +#define faacDecInit NeAACDecInit +#define faacDecInit2 NeAACDecInit2 +#define faacDecInitDRM NeAACDecInitDRM +#define faacDecInitDAB NeAACDecInitDAB +#define faacDecPostSeekReset NeAACDecPostSeekReset +#define faacDecOpen NeAACDecOpen +#define faacDecClose NeAACDecClose +#define faacDecDecode NeAACDecDecode +#define AudioSpecificConfig NeAACDecAudioSpecificConfig +#endif + + +#ifdef _WIN32 + #pragma pack(push, 8) + #ifndef NEAACDECAPI + #define NEAACDECAPI __cdecl + #endif +#else + #ifndef NEAACDECAPI + #define NEAACDECAPI + #endif +#endif + +#define FAAD2_VERSION "2.7" + +/* object types for AAC */ +#define MAIN 1 +#define LC 2 +#define SSR 3 +#define LTP 4 +#define HE_AAC 5 +#define ER_LC 17 +#define ER_LTP 19 +#define LD 23 +#define DRM_ER_LC 27 /* special object type for DRM */ + +/* header types */ +#define RAW 0 +#define ADIF 1 +#define ADTS 2 +#define LATM 3 + +/* SBR signalling */ +#define NO_SBR 0 +#define SBR_UPSAMPLED 1 +#define SBR_DOWNSAMPLED 2 +#define NO_SBR_UPSAMPLED 3 + +/* library output formats */ +#define FAAD_FMT_16BIT 1 +#define FAAD_FMT_24BIT 2 +#define FAAD_FMT_32BIT 3 +#define FAAD_FMT_FLOAT 4 +#define FAAD_FMT_FIXED FAAD_FMT_FLOAT +#define FAAD_FMT_DOUBLE 5 + +/* Capabilities */ +#define LC_DEC_CAP (1<<0) /* Can decode LC */ +#define MAIN_DEC_CAP (1<<1) /* Can decode MAIN */ +#define LTP_DEC_CAP (1<<2) /* Can decode LTP */ +#define LD_DEC_CAP (1<<3) /* Can decode LD */ +#define ERROR_RESILIENCE_CAP (1<<4) /* Can decode ER */ +#define FIXED_POINT_CAP (1<<5) /* Fixed point */ + +/* Channel definitions */ +#define FRONT_CHANNEL_CENTER (1) +#define FRONT_CHANNEL_LEFT (2) +#define FRONT_CHANNEL_RIGHT (3) +#define SIDE_CHANNEL_LEFT (4) +#define SIDE_CHANNEL_RIGHT (5) +#define BACK_CHANNEL_LEFT (6) +#define BACK_CHANNEL_RIGHT (7) +#define BACK_CHANNEL_CENTER (8) +#define LFE_CHANNEL (9) +#define UNKNOWN_CHANNEL (0) + +/* DRM channel definitions */ +#define DRMCH_MONO 1 +#define DRMCH_STEREO 2 +#define DRMCH_SBR_MONO 3 +#define DRMCH_SBR_STEREO 4 +#define DRMCH_SBR_PS_STEREO 5 + + +/* A decode call can eat up to FAAD_MIN_STREAMSIZE bytes per decoded channel, + so at least so much bytes per channel should be available in this stream */ +#define FAAD_MIN_STREAMSIZE 768 /* 6144 bits/channel */ + + +typedef void *NeAACDecHandle; + +typedef struct mp4AudioSpecificConfig +{ + /* Audio Specific Info */ + unsigned char objectTypeIndex; + unsigned char samplingFrequencyIndex; + unsigned long samplingFrequency; + unsigned char channelsConfiguration; + + /* GA Specific Info */ + unsigned char frameLengthFlag; + unsigned char dependsOnCoreCoder; + unsigned short coreCoderDelay; + unsigned char extensionFlag; + unsigned char aacSectionDataResilienceFlag; + unsigned char aacScalefactorDataResilienceFlag; + unsigned char aacSpectralDataResilienceFlag; + unsigned char epConfig; + + char sbr_present_flag; + char forceUpSampling; + char downSampledSBR; +} mp4AudioSpecificConfig; + +typedef struct NeAACDecConfiguration +{ + unsigned char defObjectType; + unsigned long defSampleRate; + unsigned char outputFormat; + unsigned char downMatrix; + unsigned char useOldADTSFormat; + unsigned char dontUpSampleImplicitSBR; +} NeAACDecConfiguration, *NeAACDecConfigurationPtr; + +typedef struct NeAACDecFrameInfo +{ + unsigned long bytesconsumed; + unsigned long samples; + unsigned char channels; + unsigned char error; + unsigned long samplerate; + + /* SBR: 0: off, 1: on; upsample, 2: on; downsampled, 3: off; upsampled */ + unsigned char sbr; + + /* MPEG-4 ObjectType */ + unsigned char object_type; + + /* AAC header type; MP4 will be signalled as RAW also */ + unsigned char header_type; + + /* multichannel configuration */ + unsigned char num_front_channels; + unsigned char num_side_channels; + unsigned char num_back_channels; + unsigned char num_lfe_channels; + unsigned char channel_position[64]; + + /* PS: 0: off, 1: on */ + unsigned char ps; +} NeAACDecFrameInfo; + +char* NEAACDECAPI NeAACDecGetErrorMessage(unsigned char errcode); + +unsigned long NEAACDECAPI NeAACDecGetCapabilities(void); + +NeAACDecHandle NEAACDECAPI NeAACDecOpen(void); + +NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder); + +unsigned char NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder, + NeAACDecConfigurationPtr config); + +/* Init the library based on info from the AAC file (ADTS/ADIF) */ +long NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, + unsigned char *buffer, + unsigned long buffer_size, + unsigned long *samplerate, + unsigned char *channels); + +/* Init the library using a DecoderSpecificInfo */ +char NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, + unsigned char *pBuffer, + unsigned long SizeOfDecoderSpecificInfo, + unsigned long *samplerate, + unsigned char *channels); + +/* Init the library for DRM */ +char NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, + unsigned long samplerate, + unsigned char channels); + +char NEAACDECAPI NeAACDecInitDAB(NeAACDecHandle *hDecoder, + unsigned long samplerate, + unsigned char channels, + unsigned char sbr); + +void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, long frame); + +void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder); + +void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder, + NeAACDecFrameInfo *hInfo, + unsigned char *buffer, + unsigned long buffer_size); + +void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder, + NeAACDecFrameInfo *hInfo, + unsigned char *buffer, + unsigned long buffer_size, + void **sample_buffer, + unsigned long sample_buffer_size); + +char NEAACDECAPI NeAACDecAudioSpecificConfig(unsigned char *pBuffer, + unsigned long buffer_size, + mp4AudioSpecificConfig *mp4ASC); + +#ifdef _WIN32 + #pragma pack(pop) +#endif + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif diff --git a/includes/backend/charsets.h b/includes/backend/charsets.h new file mode 100644 index 0000000..c187cd9 --- /dev/null +++ b/includes/backend/charsets.h @@ -0,0 +1,50 @@ +# +/* + * Copyright (C) 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the SDR-J (JSDR). + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * This charset handling was kindly added by Przemyslaw Wegrzyn + * all rights acknowledged + */ +#ifndef __CHARSETS_H +#define __CHARSETS_H + +#include + +/* + * Codes assigned to character sets, as defined + * in ETSI TS 101 756 v1.6.1, section 5.2. + */ +typedef enum { + EbuLatin = 0x00, // Complete EBU Latin based repertoire - see annex C + UnicodeUcs2 = 0x06, + UnicodeUtf8 = 0x0F +} CharacterSet; + +/** + * Converts the null-terminated character string to QString, using a given character set. + * + * @param buffer null-terminated buffer to convert + * @param charset character set used in buffer + * @return converted QString + */ +QString toQStringUsingCharset(const char* buffer, CharacterSet charset, int size = -1); + +#endif // CHARSETS_H + diff --git a/includes/backend/converter-2.h b/includes/backend/converter-2.h new file mode 100644 index 0000000..3696e31 --- /dev/null +++ b/includes/backend/converter-2.h @@ -0,0 +1,155 @@ +# +/* + * Copyright (C) 2010, 2011, 2012 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the SDR-J. + * Many of the ideas as implemented in SDR-J are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +// special instantiation for pairs of int16_t +// to be used for the faad decoder +#ifndef __CONVERTER_2 +#define __CONVERTER_2 +// +// Very straightforward fractional resampler +#include "dab-constants.h" + +class converter_2 { +private: + int32_t rateIn; + int32_t rateOut; + int32_t blockLength; + int32_t width; + DSPCOMPLEX *buffer; + int32_t bufferP; + long double floatTime; + long double inPeriod; + long double outPeriod; +// +// sin (-a) = - sin (--a) +double sincPI (double a) { + if (a == 0) + return 1.0; + return sin (M_PI * a) / (M_PI * a); +} +// +// cos (-a) = cos (a) +double HannCoeff (double a, int16_t width) { +DSPFLOAT x = 2 * M_PI * (0.5 + a / width); + if (x < 0) + x = - x; + return 0.5 - 0.5 * cos (x); +} +// +// Shannon applied to floatTime +// We determine the entry in the table acting as zero +DSPCOMPLEX getInterpolate (double floatTime) { +int32_t index = (int32_t)(floor (floatTime * rateIn)); +int32_t i; +DSPCOMPLEX res = 0; +double localTime = floatTime - index * inPeriod; +// +// Due to rounding of the (floating) computation, it +// might happen that index + i is sometimes out of bounds + for (i = - width / 2; i < width / 2; i ++) { + if (index + i < 0 || index + i >= blockLength + width) + continue; + double ag = (localTime - i * inPeriod) / inPeriod; + double factor = HannCoeff (ag, width) * sincPI (ag); + res = res + DSPCOMPLEX (real (buffer [index + i]) * factor, + imag (buffer [index + i]) * factor); + } + + return res; +} +// +public: + converter_2 (int32_t rateIn, + int32_t rateOut, + int32_t blockLength, + int16_t width) { + this -> rateIn = rateIn; + this -> rateOut = rateOut; + this -> blockLength = blockLength; + this -> width = width; + buffer = new DSPCOMPLEX [blockLength + width]; + bufferP = 0; + inPeriod = 1.0 / rateIn; + outPeriod = 1.0 / rateOut; + fprintf (stderr, "converter from %d to %d\n", rateIn, rateOut); +// the first width / 2 samples are only used in the interpolation +// furthermore, they are neglected. So, we start with: + floatTime = width / 2 * inPeriod; +} + + ~converter_2 (void) { + delete [] buffer; +} +// +// The buffer consists of three parts +// width / 2 "old" values +// blockLength values that will be processed +// width / 2 "future" values +// +// Whenever the buffer filling reaches blockLength + width, +// we map the blockLength samples in the middle +bool add (int16_t in_re, int16_t in_im, + int16_t *out, int16_t *nOut) { +int32_t i; +int outP = 0; +double endTime; + + buffer [bufferP ++] = DSPCOMPLEX (in_re, in_im); + if (bufferP < blockLength + width) + return false; + + endTime = floatTime + blockLength * inPeriod; +// floatTime indicates the current time for the +// output samples, endtime is the time of the last +// input sample + while (floatTime < endTime ) { + DSPCOMPLEX temp = getInterpolate (floatTime); + out [2 * outP] = real (temp); + out [2 * outP + 1] = imag (temp); + outP += 1; + floatTime += outPeriod; + } +// +// shift the "width" samples at the end of the buffer +// The first "width / 2" samples of the buffer now are already processed +// but required for processing the next series + for (i = 0; i < width; i ++) + buffer [i] = buffer [blockLength + i]; +// +// adjust the begin and end time + floatTime -= outP * outPeriod; + bufferP = floatTime / inPeriod + width / 2; + *nOut = outP; + return true; +} + +int32_t getOutputSize (void) { + return rateOut * blockLength / rateIn; +} +}; + +#endif + diff --git a/includes/backend/data-backend.h b/includes/backend/data-backend.h new file mode 100644 index 0000000..23ca77c --- /dev/null +++ b/includes/backend/data-backend.h @@ -0,0 +1,75 @@ +# +/* + * Copyright (C) 2015 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __DATA_BACKEND__ +#define __DATA_BACKEND__ + +#include +#include +#include +#include "ringbuffer.h" +#include +#include +#include "dab-constants.h" +#include "virtual-backend.h" + +class dataProcessor; +class RadioInterface; +class protection; + +class dataBackend:public QThread, public virtualBackend { +Q_OBJECT +public: + dataBackend (RadioInterface *mr, + packetdata *d, + RingBuffer *dataBuffer, + QString picturesPath); + ~dataBackend (void); +int32_t process (int16_t *, int16_t); +void stopRunning (void); +private: + RadioInterface *myRadioInterface; + bool shortForm; + int16_t protLevel; + uint8_t DGflag; + int16_t FEC_scheme; + std::vector disperseVector; +void run (void); + volatile bool running; + int32_t countforInterleaver; + uint8_t * outV; + int16_t **interleaveData; + int16_t *Data; + protection *protectionHandler; + RingBuffer *Buffer; + dataProcessor *our_frameProcessor; + QSemaphore freeSlots; + QSemaphore usedSlots; + int16_t *theData [20]; + int16_t nextIn; + int16_t nextOut; + int fragmentSize; + int16_t bitRate; +}; + +#endif + diff --git a/includes/backend/data/data-processor.h b/includes/backend/data/data-processor.h new file mode 100644 index 0000000..f8c7513 --- /dev/null +++ b/includes/backend/data/data-processor.h @@ -0,0 +1,73 @@ +# +/* + * Copyright (C) 2015 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __DATA_PROCESSOR__ +#define __DATA_PROCESSOR__ + +#include +#include "frame-processor.h" +#include +#include +#include +#include "ringbuffer.h" + +class RadioInterface; +class uep_deconvolve; +class eep_deconvolve; +class virtual_dataHandler; +class packetdata; + +class dataProcessor:public QObject, public frameProcessor { +Q_OBJECT +public: + dataProcessor (RadioInterface *mr, + packetdata *pd, + RingBuffer *dataBuffer, + QString picturesPath); + ~dataProcessor (void); +void addtoFrame (uint8_t *); +private: + RadioInterface *myRadioInterface; + int16_t bitRate; + uint8_t DSCTy; + int16_t appType; + int16_t packetAddress; + uint8_t DGflag; + int16_t FEC_scheme; + RingBuffer* dataBuffer; + int16_t expectedIndex; + std::vector series; + uint8_t packetState; + int32_t streamAddress; // int since we init with -1 +// +// result handlers + void handleTDCAsyncstream (uint8_t *, int32_t); + void handlePackets (uint8_t *, int32_t); + void handlePacket (uint8_t *); + virtual_dataHandler *my_dataHandler; +// +signals: + void show_mscErrors (int); +}; + +#endif + diff --git a/includes/backend/data/mot-data.h b/includes/backend/data/mot-data.h new file mode 100644 index 0000000..fa7a368 --- /dev/null +++ b/includes/backend/data/mot-data.h @@ -0,0 +1,145 @@ +# +/* + * Copyright (C) 2015 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __MOT_HANDLER__ +#define __MOT_HANDLER__ +#include "dab-constants.h" +#include +#include +#include +#include +#ifdef TRY_EPG +#include "epgdec.h" +#endif + +class RadioInterface; + +typedef struct { + bool inUse; + int32_t ordernumber; + uint16_t transportId; + int32_t bodySize; + uint16_t contentType; + uint16_t contentsubType; + int16_t segmentSize; + int16_t numofSegments; + bool marked [100]; + QByteArray segments [100]; + QString name; +} motElement; + +class MOT_directory { +public: + uint16_t transportId; + uint8_t *dir_segments; + int16_t dir_segmentSize; + int16_t num_dirSegments; + int16_t dirSize; + int16_t numObjects; + motElement *dir_proper; + bool marked [512]; + MOT_directory (uint16_t transportId, + int16_t segmentSize, + int32_t dirSize, int16_t objects) { +int16_t i; + for (i = 0; i < 512; i ++) + marked [i] = false; + num_dirSegments = -1; + this -> transportId = transportId; + this -> dirSize = dirSize; + this -> numObjects = objects; + this -> dir_segmentSize = segmentSize; + dir_segments = new uint8_t [dirSize]; + dir_proper = new motElement [objects]; + for (i = 0; i < objects; i ++) + dir_proper [i]. ordernumber = -1; + } + + ~MOT_directory (void) { + delete [] dir_segments; + delete [] dir_proper; + } +}; + +class motHandler: public QObject { +Q_OBJECT +public: + motHandler (RadioInterface *, QString); + ~motHandler (void); +void process_mscGroup (uint8_t *, + uint8_t, + bool, + int16_t, + uint16_t); +void processHeader (int16_t transportId, + uint8_t *segment, + int32_t segmentSize, + bool lastFlag); +void processDirectory (int16_t transportId, + uint8_t *segment, + int32_t segmentSize, + bool lastFlag); +void directorySegment (uint16_t transportId, + uint8_t *segment, + int16_t segmentNumber, + int32_t segmentSize, + bool lastFlag); +void analyse_theDirectory (void); +int16_t get_dirEntry (int16_t number, + uint8_t *data, + uint32_t currentBase); + +void processSegment (int16_t transportId, + uint8_t *segment, + int16_t segmentNumber, + int32_t segmentSize, + bool lastFlag); + void my_help (void); +private: + motElement table [16]; + motElement *old_slide; + int16_t ordernumber; + MOT_directory *theDirectory; +#ifdef TRY_EPG + CEPGDecoder epgHandler; +#endif + motElement *getHandle (uint16_t transportId); + void newEntry (uint16_t transportId, + int16_t size, + int16_t contentType, + int16_t contentsubType, + QString name); + void newEntry (int16_t index, + uint16_t transportId, + int16_t size, + int16_t contentType, + int16_t contentsubType, + QString name); + bool isComplete (motElement *); + void handleComplete (motElement *); + void handle_epgTopElement (motElement *p); + void checkDir (QString &); + QString picturesPath; +signals: + void the_picture (QByteArray, int, QString); +}; +#endif diff --git a/includes/backend/data/mot-databuilder.h b/includes/backend/data/mot-databuilder.h new file mode 100644 index 0000000..5a3f529 --- /dev/null +++ b/includes/backend/data/mot-databuilder.h @@ -0,0 +1,41 @@ +# +/* + * Copyright (C) 2015 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef MOT_DATABUILDER +#define MOT_DATABUILDER +#include "dab-constants.h" +#include "virtual-datahandler.h" +#include + +class RadioInterface; +class motHandler; + +class mot_databuilder:public virtual_dataHandler { +public: + mot_databuilder (RadioInterface *, QString ); + ~mot_databuilder (void); +void add_mscDatagroup (std::vector); +private: +motHandler *my_motHandler; +}; +#endif + diff --git a/includes/backend/data/pad-handler.h b/includes/backend/data/pad-handler.h new file mode 100644 index 0000000..bda07a2 --- /dev/null +++ b/includes/backend/data/pad-handler.h @@ -0,0 +1,77 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __PAD_HANDLER__ +#define __PAD_HANDLER__ + +#include +#include +#include +#include + +class RadioInterface; +class motHandler; + +class padHandler: public QObject { +Q_OBJECT +public: + padHandler (RadioInterface *, QString); + ~padHandler (void); + void processPAD (uint8_t *, int16_t, uint8_t, uint8_t); +private: + RadioInterface *myRadioInterface; + void handle_variablePAD (uint8_t *, int16_t, uint8_t); + void handle_shortPAD (uint8_t *, int16_t, uint8_t); + void dynamicLabel (uint8_t *, int16_t, uint8_t); + void new_MSC_element (std::vector, int); + void add_MSC_element (std::vector); + void build_MSC_segment (std::vector, int); + bool pad_crc (uint8_t *, int16_t); + QString dynamicLabelText; + int16_t charSet; + motHandler *my_motHandler; + uint8_t last_appType; + bool mscGroupElement; + int xpadLength; + int16_t still_to_go; + std::vector shortpadData; + bool lastSegment; + bool firstSegment; + int16_t segmentNumber; +// dataGroupLength is set when having processed an appType 1 + int dataGroupLength; +// +// msc_dataGroupLength is used while assembling an msc_data group, +// in the end it should be equal or somewhat larger than dataGroupLength + int msc_dataGroupLength; + +// +// The msc_dataGroupBuffer is - as the name suggests - used for +// assembling the msc_data group. + std::vector msc_dataGroupBuffer; + +signals: + void showLabel (QString); + void show_motHandling (bool); +}; + +#endif diff --git a/includes/backend/data/virtual-datahandler.h b/includes/backend/data/virtual-datahandler.h new file mode 100644 index 0000000..6d476ee --- /dev/null +++ b/includes/backend/data/virtual-datahandler.h @@ -0,0 +1,41 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef __VIRTUAL_DATAHANDLER__ +#define __VIRTUAL_DATAHANDLER__ +#include "dab-constants.h" +#include +#include + + +class virtual_dataHandler:public QObject { +Q_OBJECT +public: + virtual_dataHandler (void); +virtual ~virtual_dataHandler (void); +virtual + void add_mscDatagroup (std::vector); +}; +#endif + + + diff --git a/includes/backend/eep-protection.h b/includes/backend/eep-protection.h new file mode 100644 index 0000000..44eb744 --- /dev/null +++ b/includes/backend/eep-protection.h @@ -0,0 +1,41 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __EEP_PROTECTION__ +#define __EEP_PROTECTION__ + +#include +#include +#include +#include "protection.h" + + class eep_protection: public protection { +public: + eep_protection (int16_t, int16_t); + ~eep_protection (void); +bool deconvolve (int16_t *, + int32_t, + uint8_t *); +}; + +#endif + diff --git a/includes/backend/fib-processor.h b/includes/backend/fib-processor.h new file mode 100644 index 0000000..256f29a --- /dev/null +++ b/includes/backend/fib-processor.h @@ -0,0 +1,189 @@ +# +/* + * Copyright (C) 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-TAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __FIB_PROCESSOR__ +#define __FIB_PROCESSOR__ +# +// +#include +#include +#include +#include "msc-handler.h" +#include + + struct dablabel { + QString label; + bool hasName; + }; + + typedef struct dablabel dabLabel; + + typedef struct subchannelmap channelMap; + +// from FIG1/2 + struct serviceid { + bool inUse; + uint32_t serviceId; + dabLabel serviceLabel; + int16_t language; + int16_t programType; + int16_t pNum; + }; + typedef struct serviceid serviceId; + +// The service component describes the actual service +// It really should be a union, the component data for +// audio and data are quite different + struct servicecomponents { + bool inUse; // just administration + int8_t TMid; // the transport mode + serviceId *service; // belongs to the service + int16_t componentNr; // component + + int16_t ASCTy; // used for audio + int16_t PS_flag; // use for both audio and packet + int16_t subchannelId; // used in both audio and packet + uint16_t SCId; // used in packet + uint8_t CAflag; // used in packet (or not at all) + int16_t DSCTy; // used in packet + uint8_t DGflag; // used for TDC + int16_t packetAddress; // used in packet + int16_t appType; // used in packet + bool is_madePublic; // used to make service visible + }; + + typedef struct servicecomponents serviceComponent; + + struct subchannelmap { + bool inUse; + int32_t SubChId; + int32_t startAddr; + int32_t Length; + bool shortForm; + int32_t protLevel; + int32_t bitRate; + int16_t language; + int16_t FEC_scheme; + }; + + struct { + QString ensembleName; + int32_t ensembleId; + uint8_t ecc_byte; + bool name_Present; + bool ecc_Present; + } ensemble_Descriptor; + +class RadioInterface; + +class fib_processor: public QObject { +Q_OBJECT +public: + fib_processor (RadioInterface *); + ~fib_processor (void); + + void setupforNewFrame (void); + void clearEnsemble (void); + bool syncReached (void); + void resetSync (void); + void setSelectedService (QString &); + uint8_t kindofService (QString &); + void dataforAudioService (int16_t, audiodata *); + void dataforDataService (int16_t, packetdata *); + void dataforAudioService (const QString &, + audiodata *, int16_t); + void dataforDataService (const QString &, + packetdata *, int16_t); + int32_t get_ensembleId (void); + QString get_ensembleName (void); + int32_t get_CIFcount (void); +protected: + void newFrame (void); + void process_FIB (uint8_t *, uint16_t); +private: + RadioInterface *myRadioInterface; + serviceId *findServiceId (int32_t); + serviceComponent *find_packetComponent (int16_t); + serviceComponent *find_serviceComponent (int32_t SId, int16_t SCId); + void bind_audioService (int8_t, + uint32_t, int16_t, + int16_t, int16_t, int16_t); + void bind_packetService (int8_t, + uint32_t, int16_t, + int16_t, int16_t, int16_t); + int32_t findServiceIdwithName (const QString &s); + int32_t CIFcount; + void process_FIG0 (uint8_t *); + void process_FIG1 (uint8_t *); + void FIG0Extension0 (uint8_t *); + void FIG0Extension1 (uint8_t *); + void FIG0Extension2 (uint8_t *); + void FIG0Extension3 (uint8_t *); + void FIG0Extension4 (uint8_t *); + void FIG0Extension5 (uint8_t *); + void FIG0Extension6 (uint8_t *); + void FIG0Extension7 (uint8_t *); + void FIG0Extension8 (uint8_t *); + void FIG0Extension9 (uint8_t *); + void FIG0Extension10 (uint8_t *); + void FIG0Extension11 (uint8_t *); + void FIG0Extension12 (uint8_t *); + void FIG0Extension13 (uint8_t *); + void FIG0Extension14 (uint8_t *); + void FIG0Extension15 (uint8_t *); + void FIG0Extension16 (uint8_t *); + void FIG0Extension17 (uint8_t *); + void FIG0Extension18 (uint8_t *); + void FIG0Extension19 (uint8_t *); + void FIG0Extension20 (uint8_t *); + void FIG0Extension21 (uint8_t *); + void FIG0Extension22 (uint8_t *); + void FIG0Extension23 (uint8_t *); + void FIG0Extension24 (uint8_t *); + void FIG0Extension25 (uint8_t *); + void FIG0Extension26 (uint8_t *); + + int16_t HandleFIG0Extension1 (uint8_t *, + int16_t, uint8_t); + int16_t HandleFIG0Extension2 (uint8_t *, + int16_t, uint8_t, uint8_t); + int16_t HandleFIG0Extension3 (uint8_t *, int16_t); + int16_t HandleFIG0Extension5 (uint8_t *, int16_t); + int16_t HandleFIG0Extension8 (uint8_t *, + int16_t, uint8_t); + int16_t HandleFIG0Extension13 (uint8_t *, + int16_t, uint8_t); + int32_t dateTime [8]; + channelMap subChannels [64]; + serviceComponent ServiceComps [64]; + serviceId listofServices [64]; + bool dateFlag; + bool isSynced; + QMutex fibLocker; +signals: + void addtoEnsemble (const QString &); + void nameofEnsemble (int, const QString &); + void changeinConfiguration (void); +}; + +#endif + diff --git a/includes/backend/fic-handler.h b/includes/backend/fic-handler.h new file mode 100644 index 0000000..3d1902c --- /dev/null +++ b/includes/backend/fic-handler.h @@ -0,0 +1,71 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +/* + * FIC data + */ +#ifndef __FIC_HANDLER__ +#define __FIC_HANDLER__ + +#include +#include +#include +#include "viterbi-768.h" +#include +#include "fib-processor.h" +#include "dab-params.h" + + +class RadioInterface; + +class ficHandler: public fib_processor { +Q_OBJECT +public: + ficHandler (RadioInterface *, uint8_t); + ~ficHandler (void); + void process_ficBlock (std::vector, int16_t); + void stop (void); + void reset (void); +private: + viterbi_768 myViterbi; + dabParams params; + uint8_t bitBuffer_out [768]; + int16_t ofdm_input [2304]; + bool punctureTable [3072 + 24]; + + void process_ficInput (int16_t); + int16_t index; + int16_t BitsperBlock; + int16_t ficno; + int16_t ficBlocks; + int16_t ficMissed; + int16_t ficRatio; + uint16_t convState; + uint8_t PRBS [768]; + uint8_t shiftRegister [9]; +signals: + void show_ficSuccess (bool); +}; + +#endif + + diff --git a/includes/backend/firecode-checker.h b/includes/backend/firecode-checker.h new file mode 100644 index 0000000..5dd4533 --- /dev/null +++ b/includes/backend/firecode-checker.h @@ -0,0 +1,46 @@ +# +/* -*- c++ -*- */ +/* + * Copyright 2004,2010 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio 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; either version 3, or (at your option) + * any later version. + * + * GNU Radio 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ +// +// This is a (partial) rewrite of the GNU radio code, for use +// within the DAB/DAB+ sdr-j receiver software +// all rights are acknowledged. +// +#ifndef FIRECODE_CHECKER +#define FIRECODE_CHECKER +#include + + +class firecode_checker { +public: + firecode_checker (void); + ~firecode_checker (void); +// error detection. x[0-1] contains parity, x[2-10] contains data + bool check (const uint8_t *x); // return true if firecode check is passed +private: + uint16_t tab[256]; + uint16_t run8(unsigned char regs[]); + static const uint8_t g[16]; +}; + +#endif + diff --git a/includes/backend/frame-processor.h b/includes/backend/frame-processor.h new file mode 100644 index 0000000..74b830a --- /dev/null +++ b/includes/backend/frame-processor.h @@ -0,0 +1,40 @@ +# +/* + * Copyright (C) 2010 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __FRAME_PROCESSOR__ +#define __FRAME_PROCESSOR__ +#include +#include +#include + +// +// virtual class, just for providing a common base +// for the real decoder classes + +class frameProcessor { +public: + frameProcessor (void); +virtual ~frameProcessor (void); +virtual void addtoFrame (std::vector); +}; +#endif + diff --git a/includes/backend/galois.h b/includes/backend/galois.h new file mode 100644 index 0000000..e514422 --- /dev/null +++ b/includes/backend/galois.h @@ -0,0 +1,55 @@ +# +/* + * Copyright (C) 2010, 2011, 2012 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __GALOIS +#define __GALOIS + +#include + +class galois { +private: + uint16_t mm; /* Bits per symbol */ + uint16_t gfpoly; + uint16_t codeLength; /* Symbols per block (= (1< + +#ifndef MALLOC + +#if defined(_WIN32) || defined(_WIN64) +#define MALLOC(a) _mm_malloc(a, 16) +#else +#include +#define MALLOC(a) memalign(16, a) +#endif + +#endif diff --git a/includes/backend/msc-handler.h b/includes/backend/msc-handler.h new file mode 100644 index 0000000..d87656d --- /dev/null +++ b/includes/backend/msc-handler.h @@ -0,0 +1,93 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __MSC_HANDLER__ +#define __MSC_HANDLER__ + +#include +#include +#include +#include +#include +#include +#include "dab-constants.h" +#include "ringbuffer.h" +#include "dab-params.h" + +class RadioInterface; +class virtualBackend; + +class mscHandler { +public: + mscHandler (RadioInterface *, + uint8_t, + QString); + ~mscHandler (void); + void process_mscBlock (std::vector, int16_t); + void set_audioChannel (audiodata *, + RingBuffer *); + void set_dataChannel (packetdata *, + RingBuffer *); +// +// This function should be called beore issuing a request +// to handle a service + void reset (void); +// +// This function will kill + void stop (void); +private: + RadioInterface *myRadioInterface; + RingBuffer *dataBuffer; + QString picturesPath; + dabParams params; + QMutex locker; + bool audioService; + std::vectortheBackends; + std::vector cifVector; + int16_t cifCount; + int16_t blkCount; + std::atomic work_to_be_done; + int16_t packetAddress; + int16_t appType; + int16_t ASCTy; + int16_t DSCTy; + int32_t startAddr; + int16_t Length; + bool shortForm; + int16_t protLevel; + uint8_t DGflag; + int16_t bitRate; + int16_t language; + int16_t type; + int16_t FEC_scheme; + int8_t dabModus; + int16_t BitsperBlock; + int16_t numberofblocksperCIF; + int16_t blockCount; + + int16_t **interleaveData; + int16_t interleaverIndex; +}; + +#endif + + diff --git a/includes/backend/parity.h b/includes/backend/parity.h new file mode 100644 index 0000000..f8a65f3 --- /dev/null +++ b/includes/backend/parity.h @@ -0,0 +1,36 @@ +/** + * static inline parity(int x) -- compute parity (up to 32 bits?) + */ + +/* Determine parity of argument: 1 = odd, 0 = even */ +#ifdef __i386__ +static inline int parityb(unsigned char x){ + __asm__ __volatile__ ("test %1,%1;setpo %0" : "=g"(x) : "r" (x)); + return x; +} +#else + +#if __cplusplus +extern "C" { +#endif +void partab_init(); +#if __cplusplus +}; +#endif + +static inline int parityb(unsigned char x){ + extern unsigned char Partab[256]; + extern int Parity_initialized; + if(!Parity_initialized){ + partab_init(); + } + return Partab[x]; +} +#endif + +static inline int parity(int x){ + /* Fold down to one byte */ + x ^= (x >> 16); + x ^= (x >> 8); + return parityb(x); +} diff --git a/includes/backend/protTables.h b/includes/backend/protTables.h new file mode 100644 index 0000000..f03b498 --- /dev/null +++ b/includes/backend/protTables.h @@ -0,0 +1,31 @@ +# +/* + * Copyright (C) 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the SDR-J (JSDR). + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +# +#ifndef PROTTABLES +#define PROTTABLES +#include + +int8_t *get_PCodes (int16_t); + +#endif + diff --git a/includes/backend/protection.h b/includes/backend/protection.h new file mode 100644 index 0000000..1f3cd4e --- /dev/null +++ b/includes/backend/protection.h @@ -0,0 +1,47 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * + * Simple base class for combining uep and eep deconvolvers + */ +#ifndef __PROTECTION__ +#define __PROTECTION__ + +#include +#include +#include "viterbi-768.h" + +extern uint8_t PI_X []; + +class protection: public viterbi_768 { +public: + protection (int16_t, int16_t); +virtual ~protection (void); +virtual bool deconvolve (int16_t *, int32_t, uint8_t *); +protected: + int16_t bitRate; + int32_t outSize; + std::vector viterbiBlock; + std::vector indexTable; +}; + +#endif + diff --git a/includes/backend/reed-solomon.h b/includes/backend/reed-solomon.h new file mode 100644 index 0000000..476ff4b --- /dev/null +++ b/includes/backend/reed-solomon.h @@ -0,0 +1,43 @@ +/* Include file to configure the RS codec for character symbols + * + * Copyright 2002, Phil Karn, KA9Q + * May be used under the terms of the GNU General Public License (GPL) + */ + +#ifndef __REED_SOLOMON +#define __REED_SOLOMON + +#include +#include "galois.h" + +class reedSolomon { +private: + galois myGalois; + uint16_t symsize; /* Bits per symbol */ + uint16_t codeLength; /* Symbols per block (= (1< +#include +#include + + +#define GALOIS_DEGREE 8 +#define ERROR_CORRECT 5 +#define START_J 0 + +class rscodec { +public: + // GF(2^m), error correction capability t, + // start_j is the starting exponent in the generator polynomial + rscodec (void); + ~rscodec (); +// decode shortened code + int16_t dec (const uint8_t *r, uint8_t *d, int16_t cutlen = 135); +// encode shortened code, cutlen bytes were shortened +// not used for the DAB+ decoding + void enc (const uint8_t *u, uint8_t *c, int16_t cutlen = 135); +private: + static const int16_t d_m = 8; // m + static const int16_t d_q = 1 << 8; // q = 2 ^ m +// primitive polynomial to generate GF(q) + static const int16_t d_p = 0435; +// starting exponent for generator polynomial, j + static const int16_t d_j = 0; +// +// LUT translating power form to polynomial form + int gexp [512]; +// LUT translating polynomial form to power form + int glog [512]; + +// all in power representations + int16_t add_poly (int16_t a, int16_t b); + int16_t add_power (int16_t a, int16_t b); + int16_t multiply_poly (int16_t a, int16_t b); // a*b + int16_t multiply_power (int16_t a, int16_t b); + int16_t divide_poly (int16_t a, int16_t b); // a/b + int16_t divide_power (int16_t a, int16_t b); + int16_t pow_poly (int16_t a, int16_t n); // a^n + int16_t pow_power (int16_t a, int16_t n); + int16_t power2poly (int16_t a); + int16_t poly2power (int16_t a); + int16_t inverse_poly (int16_t a); + int16_t inverse_power (int16_t a); + +// convert a polynomial representation to m-tuple representation +// returned in tuple, lowest degree first. +// tuple must have size d_m at minimum + void poly2tuple (int16_t a, uint8_t tuple[]); + void power2tuple (int16_t a, uint8_t tuple[]); + +// round mod algorithm, calculate a % n, n > 0, a is any integer, a % n >= 0 + int16_t round_mod (int16_t a, int16_t n); + +// u and c are in polynomial representation. This is more common in practice + void enc_poly (const uint16_t * u, uint16_t * c); + +// r and d are in polynomial representation. This is more common in practice + int16_t dec_poly (const uint16_t *r, uint16_t *d); + +// int d_m; // GF(2^m) +// dabp_galois d_gf; // Galois field + +// d_g[0] is the lowest exponent coefficient, +// d_g[2t-1] is the highest exponent coefficient, d_g[2t]=1 is not included + int *d_g; // generator g. + +// error correcting capability t, info length k, codeword length n, +// all measured in unit of GF(2^m) symbols + + int *d_reg; // registers for encoding + int *syndrome; // syndrome + int *d_euc [2]; // data structure for Euclidean computation + + void create_polynomials (int start_j); // initialize the generator polynomial g +}; + +#endif // DABP_RSCODE + diff --git a/includes/backend/uep-protection.h b/includes/backend/uep-protection.h new file mode 100644 index 0000000..7a70fa8 --- /dev/null +++ b/includes/backend/uep-protection.h @@ -0,0 +1,39 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __UEP_PROTECTION__ +#define __UEP_PROTECTION__ + +#include +#include +#include +#include "protection.h" + + class uep_protection: public protection { +public: + uep_protection (int16_t, int16_t); + ~uep_protection (void); +bool deconvolve (int16_t *, int32_t, uint8_t *); +}; + +#endif + diff --git a/includes/backend/virtual-backend.h b/includes/backend/virtual-backend.h new file mode 100644 index 0000000..a04a1a4 --- /dev/null +++ b/includes/backend/virtual-backend.h @@ -0,0 +1,49 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __VIRTUAL_BACKEND__ +#define __VIRTUAL_BACKEND__ + +#include +#include + +class RadioInterface; +class audioSink; + +#define CUSize (4 * 16) + +class virtualBackend { +public: + virtualBackend (int32_t, int16_t); +virtual ~virtualBackend (void); +virtual int32_t process (int16_t *, int16_t); +virtual void stopRunning (void); +virtual void stop (void); + int32_t startAddr (void); + int16_t Length (void); +protected: + int32_t startAddress; + int16_t segmentLength; +}; +#endif + + diff --git a/includes/backend/viterbi.h-old b/includes/backend/viterbi.h-old new file mode 100644 index 0000000..717dad4 --- /dev/null +++ b/includes/backend/viterbi.h-old @@ -0,0 +1,63 @@ +# +#ifndef __VITERBI__ +#define __VITERBI__ +/* + * Viterbi.h according to the SPIRAL project + */ +#include "dab-constants.h" + +// For our particular viterbi decoder, we have +class viterbi { +#define RATE 4 +#define NUMSTATES 64 +#define BITS_PER_BYTE 8 + +// decision_t is a BIT vector +typedef union { + uint8_t t [NUMSTATES / BITS_PER_BYTE]; + uint32_t w [NUMSTATES / 32]; + uint16_t s [NUMSTATES / 16]; + uint8_t c [NUMSTATES / 8]; +} decision_t __attribute__ ((aligned (16))); + +typedef union { + int16_t t[NUMSTATES]; +} metric_t __attribute__ ((aligned (16))); + +/* + * State info for instance of Viterbi decoder + */ + +struct v { +/* path metric buffer 1 */ + __attribute__ ((aligned (16))) metric_t metrics1; +/* path metric buffer 2 */ + __attribute__ ((aligned (16))) metric_t metrics2; +/* Pointers to path metrics, swapped on every bit */ + metric_t *old_metrics,*new_metrics; + decision_t *decisions; /* decisions */ +}; + +public: + viterbi (int16_t); + ~viterbi (void); + void deconvolve (int16_t *, uint8_t *); +private: + + struct v vp; + int16_t Branchtab [NUMSTATES / 2 * RATE] __attribute__ ((aligned (16))); + int16_t parity (int16_t); + void init_viterbi (struct v *, int16_t); + void update_viterbi_blk_GENERIC (struct v *, int16_t *, + int16_t); + + void chainback_viterbi (struct v *, uint8_t *, int16_t, uint16_t); + void BFLY (int32_t, int, int16_t *, + struct v *, decision_t *); + uint8_t *data; + int16_t *symbols; + int16_t frameBits; +}; + +#endif + diff --git a/includes/backend/viterbi_768/viterbi-768.h b/includes/backend/viterbi_768/viterbi-768.h new file mode 100644 index 0000000..0b74803 --- /dev/null +++ b/includes/backend/viterbi_768/viterbi-768.h @@ -0,0 +1,73 @@ +# +#ifndef __VITERBI_768__ +#define __VITERBI_768__ +/* + * Viterbi.h according to the SPIRAL project + */ +#include "dab-constants.h" + +// For our particular viterbi decoder, we have +#define RATE 4 +#define NUMSTATES 64 +#define DECISIONTYPE uint32_t +//#define DECISIONTYPE uint8_t +//#define DECISIONTYPE_BITSIZE 8 +#define DECISIONTYPE_BITSIZE 32 +#define COMPUTETYPE uint32_t + +//decision_t is a BIT vector +typedef union { + DECISIONTYPE t[NUMSTATES/DECISIONTYPE_BITSIZE]; + uint32_t w[NUMSTATES/32]; + uint16_t s[NUMSTATES/16]; + uint8_t c[NUMSTATES/8]; +} decision_t __attribute__ ((aligned (16))); + +typedef union { + COMPUTETYPE t[NUMSTATES]; +} metric_t __attribute__ ((aligned (16))); + +/* State info for instance of Viterbi decoder + */ + +struct v { +/* path metric buffer 1 */ + __attribute__ ((aligned (16))) metric_t metrics1; +/* path metric buffer 2 */ + __attribute__ ((aligned (16))) metric_t metrics2; +/* Pointers to path metrics, swapped on every bit */ + metric_t *old_metrics,*new_metrics; + decision_t *decisions; /* decisions */ +}; + +class viterbi_768 { +public: + viterbi_768 (int16_t, bool spiral = false); + ~viterbi_768 (void); + void deconvolve (int16_t *, uint8_t *); +private: + + bool spiral; + struct v vp; + COMPUTETYPE Branchtab [NUMSTATES / 2 * RATE] __attribute__ ((aligned (16))); +// int parityb (uint8_t); + int parity (int); + void partab_init (void); +// uint8_t Partab [256]; + void init_viterbi (struct v *, int16_t); + void update_viterbi_blk_GENERIC (struct v *, COMPUTETYPE *, + int16_t); + void update_viterbi_blk_SPIRAL (struct v *, COMPUTETYPE *, + int16_t); + void chainback_viterbi (struct v *, uint8_t *, int16_t, uint16_t); + struct v *viterbi_alloc (int32_t); + void BFLY (int32_t, int, COMPUTETYPE *, + struct v *, decision_t *); +// uint8_t *bits; + uint8_t *data; + COMPUTETYPE *symbols; + int16_t frameBits; +}; + +#endif + diff --git a/includes/country-codes.h b/includes/country-codes.h new file mode 100644 index 0000000..f925424 --- /dev/null +++ b/includes/country-codes.h @@ -0,0 +1,78 @@ + +#ifndef __COUNTRY_CODES__ +#define __COUNTRY_CODES__ + +#include + +struct country_codes { + uint8_t ecc; + uint8_t countryId; + const char *countryName; +} countryTable [] = { +{0xE0, 0x9, "Albania"}, +{0xE0, 0x2, "Algeria"}, +{0xE0, 0x3, "Andorra"}, +{0xE0, 0xA, "Austria"}, +{0xE4, 0x8, "Azores"}, +{0xE0, 0x6, "Belgium"}, +{0xE3, 0xF, "Belarus"}, +{0xE4, 0xF, "Bosnia"}, +{0xE0, 0x9, "Albania"}, +{0xE1, 0x8, "Bulgaria"}, +{0xE2, 0xE, "Canaries"}, +{0xE3, 0xC, "Croatia"}, +{0xE1, 0x2, "Cyprus"}, +{0xE2, 0x2, "Czech Republic"}, +{0xE1, 0x9, "Denmark"}, +{0xE0, 0xF, "Egypt"}, +{0xE4, 0x2, "Estonia"}, +{0xE1, 0x9, "Faroe"}, +{0xE1, 0x6, "Finland"}, +{0xE1, 0xF, "France"}, +{0xE0, 0xD, "Germany"}, +{0xE0, 0x1, "Germany"}, +{0xE1, 0xA, "Gibraltar"}, +{0xE1, 0x1, "Greece"}, +{0xE0, 0xB, "Hungary"}, +{0xE2, 0xA, "Iceland"}, +{0xE1, 0xB, "Iraq"}, +{0xE3, 0x2, "Ireland"}, +{0xE0, 0x4, "Israel"}, +{0xE0, 0x5, "Italy"}, +{0xE1, 0x5, "Jordan"}, +{0xE3, 0x9, "Latvia"}, +{0xE3, 0xA, "Lebanon"}, +{0xE1, 0xD, "Libya"}, +{0xE2, 0x9, "Liechtenstein"}, +{0xE2, 0xC, "Lithuania"}, +{0xE1, 0x7, "Luxembourg"}, +{0xE3, 0x4, "Macedonia"}, +{0xE4, 0x8, "Madeira"}, +{0xE0, 0xC, "Malta"}, +{0xE2, 0x1, "Morocco"}, +{0xE4, 0x1, "Moldova"}, +{0xE2, 0xB, "Monaco"}, +{0xE3, 0x1, "Montenegro"}, +{0xE3, 0x8, "Netherlands"}, +{0xE2, 0xF, "Norway"}, +{0xE2, 0x3, "Poland"}, +{0xE4, 0x8, "Portugal"}, +{0xE1, 0xE, "Romania"}, +{0xE0, 0x7, "Russian Federation"}, +{0xE1, 0x3, "San Marino"}, +{0xE2, 0xD, "Serbia"}, +{0xE4, 0x9, "Slovenia"}, +{0xE2, 0x5, "Slovak Republic"}, +{0xE2, 0xE, "Spain"}, +{0xE3, 0xE, "Sweden"}, +{0xE1, 0x4, "Switzerland"}, +{0xE2, 0x6, "Syria"}, +{0xE2, 0x7, "Tunisia"}, +{0xE3, 0x3, "Turkey"}, +{0xE4, 0x6, "Ukraine"}, +{0xE1, 0xC, "United Kingdom"}, +{0xE2, 0x4, "Vatican"}, +{0x00, 0x0, " "} +}; + +#endif diff --git a/includes/dab-constants.h b/includes/dab-constants.h new file mode 100644 index 0000000..d9dcd9c --- /dev/null +++ b/includes/dab-constants.h @@ -0,0 +1,356 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +// +// Common definitions and includes for +// the DAB decoder + +#ifndef __DAB_CONSTANTS__ +#define __DAB_CONSTANTS__ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef __FREEBSD__ +#include +#endif + +#ifdef __MINGW32__ +//#include "iostream.h" +#include "windows.h" +#else +#ifndef __FREEBSD__ +#include "alloca.h" +#endif +#include "dlfcn.h" +typedef void *HINSTANCE; +#endif + + +#ifndef M_PI +# define M_PI 3.14159265358979323846 /* pi */ +#endif +using namespace std; +// +#define Hz(x) (x) +#define Khz(x) (x * 1000) +#define KHz(x) (x * 1000) +#define kHz(x) (x * 1000) +#define Mhz(x) (Khz (x) * 1000) +#define MHz(x) (KHz (x) * 1000) +#define mHz(x) (kHz (x) * 1000) + +#define CURRENT_VERSION "1.0 alpha" + +#define DAB 0100 +#define DAB_PLUS 0101 + +#define AUDIO_SERVICE 0101 +#define PACKET_SERVICE 0102 +#define UNKNOWN_SERVICE 0100 + +#define INPUT_RATE 2048000 +#define BANDWIDTH 1536000 + +#define SYNCED 01 +#define UNSYNCED 04 +// +// 40 up shows good results +#define DIFF_LENGTH 60 +static inline +bool isIndeterminate (float x) { + return x != x; +} + +static inline +bool isInfinite (float x) { + return x == numeric_limits::infinity (); +} + +static inline +std::complex cmul (std::complex x, float y) { + return std::complex (real (x) * y, imag (x) * y); +} + +static inline +std::complex cdiv (std::complex x, float y) { + return std::complex (real (x) / y, imag (x) / y); +} + +static inline +float get_db (float x) { + return 20 * log10 ((x + 0.005) / (float)(256)); +} +// + +#define MINIMUM(x, y) ((x) < (y) ? x : y) +#define MAXIMUM(x, y) ((x) > (y) ? x : y) + +static inline +float jan_abs (std::complex z) { +float re = real (z); +float im = imag (z); + return (re < 0 ? -re : re) + + (im < 0 ? -im : im); +} + + +#define BAND_III 0100 +#define L_BAND 0101 + +// +// for service handling we define +class packetdata { +public: + bool defined; + QString serviceName; + int32_t serviceId; + int16_t subchId; + int16_t startAddr; + bool shortForm; + int16_t protLevel; + int16_t DSCTy; + int16_t length; + int16_t bitRate; + int16_t FEC_scheme; + int16_t DGflag; + int16_t appType; + int16_t compnr; + int16_t packetAddress; + packetdata (void) { + serviceName = ""; + defined = false; + } + ~packetdata (void) { + } +}; + +typedef struct { + bool defined; + QString serviceName; + int32_t serviceId; + int16_t subchId; + int16_t startAddr; + bool shortForm; + int16_t protLevel; + int16_t length; + int16_t bitRate; + int16_t ASCTy; + int16_t language; + int16_t programType; + int16_t compnr; +} audiodata; + +// just some locals +// +// generic, up to 16 bits +static inline +uint16_t getBits (uint8_t *d, int32_t offset, int16_t size) { +int16_t i; +uint16_t res = 0; + + for (i = 0; i < size; i ++) { + res <<= 1; + res |= (d [offset + i]) & 01; + } + return res; +} + +static inline +uint16_t getBits_1 (uint8_t *d, int32_t offset) { + return (d [offset] & 0x01); +} + +static inline +uint16_t getBits_2 (uint8_t *d, int32_t offset) { +uint16_t res = d [offset]; + res <<= 1; + res |= d [offset + 1]; + return res; +} + +static inline +uint16_t getBits_3 (uint8_t *d, int32_t offset) { +uint16_t res = d [offset]; + res <<= 1; + res |= d [offset + 1]; + res <<= 1; + res |= d [offset + 2]; + return res; +} + +static inline +uint16_t getBits_4 (uint8_t *d, int32_t offset) { +uint16_t res = d [offset]; + res <<= 1; + res |= d [offset + 1]; + res <<= 1; + res |= d [offset + 2]; + res <<= 1; + res |= d [offset + 3]; + return res; +} + +static inline +uint16_t getBits_5 (uint8_t *d, int32_t offset) { +uint16_t res = d [offset]; + res <<= 1; + res |= d [offset + 1]; + res <<= 1; + res |= d [offset + 2]; + res <<= 1; + res |= d [offset + 3]; + res <<= 1; + res |= d [offset + 4]; + return res; +} + +static inline +uint16_t getBits_6 (uint8_t *d, int32_t offset) { +uint16_t res = d [offset]; + res <<= 1; + res |= d [offset + 1]; + res <<= 1; + res |= d [offset + 2]; + res <<= 1; + res |= d [offset + 3]; + res <<= 1; + res |= d [offset + 4]; + res <<= 1; + res |= d [offset + 5]; + return res; +} + +static inline +uint16_t getBits_7 (uint8_t *d, int32_t offset) { +uint16_t res = d [offset]; + res <<= 1; + res |= d [offset + 1]; + res <<= 1; + res |= d [offset + 2]; + res <<= 1; + res |= d [offset + 3]; + res <<= 1; + res |= d [offset + 4]; + res <<= 1; + res |= d [offset + 5]; + res <<= 1; + res |= d [offset + 6]; + return res; +} + +static inline +uint16_t getBits_8 (uint8_t *d, int32_t offset) { +uint16_t res = d [offset]; + res <<= 1; + res |= d [offset + 1]; + res <<= 1; + res |= d [offset + 2]; + res <<= 1; + res |= d [offset + 3]; + res <<= 1; + res |= d [offset + 4]; + res <<= 1; + res |= d [offset + 5]; + res <<= 1; + res |= d [offset + 6]; + res <<= 1; + res |= d [offset + 7]; + return res; +} + + +static inline +uint32_t getLBits (uint8_t *d, + int32_t offset, int16_t amount) { +uint32_t res = 0; +int16_t i; + + for (i = 0; i < amount; i ++) { + res <<= 1; + res |= (d [offset + i] & 01); + } + return res; +} + +static inline +bool check_CRC_bits (uint8_t *in, int32_t size) { +static +const uint8_t crcPolynome [] = + {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}; // MSB .. LSB +int32_t i, f; +uint8_t b [16]; +int16_t Sum = 0; + + memset (b, 1, 16); + + for (i = size - 16; i < size; i ++) + in [i] ^= 1; + + for (i = 0; i < size; i++) { + if ((b [0] ^ in [i]) == 1) { + for (f = 0; f < 15; f++) + b [f] = crcPolynome [f] ^ b[f + 1]; + b [15] = 1; + } + else { + memmove (&b [0], &b[1], sizeof (uint8_t ) * 15); // Shift + b [15] = 0; + } + } + + for (i = 0; i < 16; i++) + Sum += b [i]; + + return Sum == 0; +} + +static inline +bool check_crc_bytes (uint8_t *msg, int32_t len) { +int i, j; +uint16_t accumulator = 0xFFFF; +uint16_t crc; +uint16_t genpoly = 0x1021; + + for (i = 0; i < len; i ++) { + int16_t data = msg [i] << 8; + for (j = 8; j > 0; j--) { + if ((data ^ accumulator) & 0x8000) + accumulator = ((accumulator << 1) ^ genpoly) & 0xFFFF; + else + accumulator = (accumulator << 1) & 0xFFFF; + data = (data << 1) & 0xFFFF; + } + } +// +// ok, now check with the crc that is contained +// in the au + crc = ~((msg [len] << 8) | msg [len + 1]) & 0xFFFF; + return (crc ^ accumulator) == 0; +} +#endif + diff --git a/includes/ofdm/freq-interleaver.h b/includes/ofdm/freq-interleaver.h new file mode 100644 index 0000000..ac41b5b --- /dev/null +++ b/includes/ofdm/freq-interleaver.h @@ -0,0 +1,49 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __FREQ_INTERLEAVER__ +#define __FREQ_INTERLEAVER__ +#include +#include +#include "dab-constants.h" +#include "dab-params.h" + +/** + * \class interLeaver + * Implements frequency interleaving according to section 14.6 + * of the DAB standard + */ +class interLeaver { +public: + interLeaver (uint8_t); + ~interLeaver (void); + int16_t mapIn (int16_t); +private: + dabParams p; + void createMapper (int16_t T_u, int16_t V1, + int16_t lwb, int16_t upb, + int16_t * v); + std::vector permTable; +}; + +#endif + diff --git a/includes/ofdm/ofdm-decoder.h b/includes/ofdm/ofdm-decoder.h new file mode 100644 index 0000000..981a914 --- /dev/null +++ b/includes/ofdm/ofdm-decoder.h @@ -0,0 +1,109 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __OFDM_DECODER__ +#define __OFDM_DECODER__ + +#include "dab-constants.h" +#ifdef __THREADED_DECODING +#include +#include +#include +#include +#include +#else +#include +#endif +#include +#include +#include "fft-handler.h" +#include "ringbuffer.h" +#include "phasetable.h" +#include "freq-interleaver.h" +#include "dab-params.h" + +class RadioInterface; +class ficHandler; +class mscHandler; + +#ifdef __THREADED_DECODING +class ofdmDecoder: public QThread { +#else +class ofdmDecoder: public QObject { +#endif +Q_OBJECT +public: + ofdmDecoder (RadioInterface *, + uint8_t, + int16_t, + ficHandler *, + mscHandler *); + ~ofdmDecoder (void); + void processBlock_0 (std::vector >); + void decodeFICblock (std::vector >, int32_t n); + void decodeMscblock (std::vector >, int32_t n); + int16_t get_snr (std::complex *); + void stop (void); + void reset (void); +#ifndef __THREADED_DECODING + void start (void); +#endif +private: + RadioInterface *myRadioInterface; + dabParams params; + fftHandler my_fftHandler; + ficHandler *my_ficHandler; + mscHandler *my_mscHandler; +#ifdef __THREADED_DECODING + void run (void); + std::atomic running; + std::complex **command; + int16_t amount; + int16_t currentBlock; + void processBlock_0 (void); + void decodeFICblock (int32_t n); + void decodeMscblock (int32_t n); + QSemaphore bufferSpace; + QWaitCondition commandHandler; + QMutex helper; +#endif + int32_t T_s; + int32_t T_u; + int32_t T_g; + int32_t nrBlocks; + int32_t carriers; + int16_t getMiddle (void); + std::vector> phaseReference; + std::vector ibits; + std::complex *fft_buffer; + interLeaver myMapper; + phaseTable *phasetable; + int32_t blockIndex; + int16_t snrCount; + int16_t snr; + int16_t maxSignal; +signals: + void show_snr (int); +}; + +#endif + + diff --git a/includes/ofdm/phasereference.h b/includes/ofdm/phasereference.h new file mode 100644 index 0000000..cf1a9fb --- /dev/null +++ b/includes/ofdm/phasereference.h @@ -0,0 +1,72 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __PHASEREFERENCE__ +#define __PHASEREFERENCE__ +#include +#include +#include +#include +#include "fft-handler.h" +#include "phasetable.h" +#include "dab-constants.h" +#include "dab-params.h" +#include "ringbuffer.h" +class RadioInterface; + +class phaseReference : public QObject, public phaseTable { +Q_OBJECT +public: + phaseReference (RadioInterface *, + uint8_t, +#ifdef IMPULSE_RESPONSE + RingBuffer *b, +#endif + int16_t, int16_t); + ~phaseReference (void); + int32_t findIndex (std::vector>); + int16_t estimate_CarrierOffset (std::vector>); + float estimate_FrequencyOffset (std::vector>); +// +// This one is used in the ofdm decoder + std::vector> refTable; +private: + fftHandler my_fftHandler; + dabParams params; +#ifdef IMPULSE_RESPONSE + RingBuffer *response; +#endif + std::vector phaseDifferences; + int16_t threshold; + int16_t diff_length; + int32_t T_u; + int16_t carriers; + + std::complex *fft_buffer; + int32_t fft_counter; + int32_t framesperSecond; + int32_t displayCounter; +signals: + void showImpulse (int); +}; +#endif + diff --git a/includes/ofdm/phasetable.h b/includes/ofdm/phasetable.h new file mode 100644 index 0000000..f8f1626 --- /dev/null +++ b/includes/ofdm/phasetable.h @@ -0,0 +1,49 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __PHASE_TABLE__ +#define __PHASE_TABLE__ + +#include +#include +#include "dab-constants.h" + +struct phasetableElement { + int32_t kmin, kmax; + int32_t i; + int32_t n; +}; + + +class phaseTable { +public: + phaseTable (int16_t); + ~phaseTable (void); + float get_Phi (int32_t); +private: + + struct phasetableElement *currentTable; + int16_t Mode; + int32_t h_table (int32_t i, int32_t j); +}; +#endif + diff --git a/includes/ofdm/sample-reader.h b/includes/ofdm/sample-reader.h new file mode 100644 index 0000000..9263c95 --- /dev/null +++ b/includes/ofdm/sample-reader.h @@ -0,0 +1,86 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#ifndef __SAMPLE_READER__ +#define __SAMPLE_READER__ +/* + * Reading the samples from the input device. Since it has its own + * "state", we embed it into its own class + */ +#include "dab-constants.h" +#include +#include +#include +#include +#include +#include "virtual-input.h" +#include "ringbuffer.h" +// +// Note: +// It was found that enlarging the buffersize to e.g. 8192 +// cannot be handled properly by the underlying system. +#define DUMPSIZE 4096 + +class RadioInterface; +class sampleReader : public QObject { +Q_OBJECT +public: + sampleReader (RadioInterface *mr, + virtualInput *theRig, + RingBuffer> *spectrumBuffer + ); + + ~sampleReader (void); + void setRunning (bool b); + float get_sLevel (void); + std::complex getSample (int32_t); + void getSamples (std::complex *v, + int16_t n, int32_t phase); + void startDumping (SNDFILE *); + void stopDumping (void); + void setSpectrum (bool); +private: + bool spectrum; + RadioInterface *myRadioInterface; + virtualInput *theRig; + RingBuffer> *spectrumBuffer; + std::vector> localBuffer; + int32_t localCounter; + int32_t bufferSize; + int32_t currentPhase; + std::complex *oscillatorTable; + std::atomic running; + int32_t bufferContent; + float sLevel; + int32_t sampleCount; + int32_t corrector; + bool dumping; + int16_t dumpIndex; + int16_t dumpScale; + int16_t dumpBuffer [DUMPSIZE]; + std::atomic dumpfilePointer; +signals: + void show_Spectrum (int); + void show_Corrector (int); +}; + +#endif diff --git a/includes/output/Qt-audio.h b/includes/output/Qt-audio.h new file mode 100644 index 0000000..18c6659 --- /dev/null +++ b/includes/output/Qt-audio.h @@ -0,0 +1,57 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB (formerly SDR-J, JSDR). + * Many of the ideas as implemented in Qt-DAB are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are acknowledged. + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef __QT_AUDIO__ +#define __QT_AUDIO__ +#include +#include +#include +#include "dab-constants.h" +#include "ringbuffer.h" +#include "audio-base.h" +#include "Qt-audiodevice.h" + +class Qt_Audio: public audioBase { +Q_OBJECT +public: + Qt_Audio (void); + ~Qt_Audio (void); + void stop (void); + void restart (void); + void audioOutput (float *, int32_t); +private: + void setParams (int32_t); + QAudioFormat AudioFormat; + QAudioOutput *theAudioOutput; + Qt_AudioDevice *theAudioDevice; + RingBuffer *Buffer; + QAudio::State currentState; + int32_t outputRate; + +private slots: + void handleStateChanged (QAudio::State newState); +}; +#endif diff --git a/includes/output/Qt-audiodevice.h b/includes/output/Qt-audiodevice.h new file mode 100644 index 0000000..53c12b7 --- /dev/null +++ b/includes/output/Qt-audiodevice.h @@ -0,0 +1,52 @@ + +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB (formerly SDR-J, JSDR). + * Many of the ideas as implemented in Qt-DAB are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are acknowledged. + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef __QT_AUDIODEVICE__ +#define __QT_AUDIODEVICE__ + +#include +#include +#include "dab-constants.h" +#include "ringbuffer.h" + +class Qt_AudioDevice : public QIODevice { +Q_OBJECT +public: + Qt_AudioDevice (RingBuffer *, QObject *); + ~Qt_AudioDevice (void); + + void start (void); + void stop (void); + + qint64 readData (char *data, qint64 maxlen); + qint64 writeData (const char *data, qint64 len); + +private: + RingBuffer *Buffer; +}; +#endif + diff --git a/includes/output/audio-base.h b/includes/output/audio-base.h new file mode 100644 index 0000000..d133770 --- /dev/null +++ b/includes/output/audio-base.h @@ -0,0 +1,60 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __AUDIO_BASE__ +#define __AUDIO_BASE__ +#include "dab-constants.h" +#include +#include +#include +#include +#include +#include "newconverter.h" +#include "ringbuffer.h" + + +class audioBase: public QObject { +Q_OBJECT +public: + audioBase (void); +virtual ~audioBase (void); +virtual void stop (void); +virtual void restart (void); +// + void audioOut (int16_t *, int32_t, int); + void startDumping (SNDFILE *); + void stopDumping (void); +private: + void audioOut_16000 (int16_t *, int32_t); + void audioOut_24000 (int16_t *, int32_t); + void audioOut_32000 (int16_t *, int32_t); + void audioOut_48000 (int16_t *, int32_t); + newConverter converter_16; + newConverter converter_24; + newConverter converter_32; + SNDFILE *dumpFile; + QMutex myLocker; +protected: +virtual void audioOutput (float *, int32_t); +}; +#endif + diff --git a/includes/output/audio-base.h-new b/includes/output/audio-base.h-new new file mode 100644 index 0000000..d133770 --- /dev/null +++ b/includes/output/audio-base.h-new @@ -0,0 +1,60 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __AUDIO_BASE__ +#define __AUDIO_BASE__ +#include "dab-constants.h" +#include +#include +#include +#include +#include +#include "newconverter.h" +#include "ringbuffer.h" + + +class audioBase: public QObject { +Q_OBJECT +public: + audioBase (void); +virtual ~audioBase (void); +virtual void stop (void); +virtual void restart (void); +// + void audioOut (int16_t *, int32_t, int); + void startDumping (SNDFILE *); + void stopDumping (void); +private: + void audioOut_16000 (int16_t *, int32_t); + void audioOut_24000 (int16_t *, int32_t); + void audioOut_32000 (int16_t *, int32_t); + void audioOut_48000 (int16_t *, int32_t); + newConverter converter_16; + newConverter converter_24; + newConverter converter_32; + SNDFILE *dumpFile; + QMutex myLocker; +protected: +virtual void audioOutput (float *, int32_t); +}; +#endif + diff --git a/includes/output/audio-base.h-old b/includes/output/audio-base.h-old new file mode 100644 index 0000000..f70e8da --- /dev/null +++ b/includes/output/audio-base.h-old @@ -0,0 +1,60 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __AUDIO_BASE__ +#define __AUDIO_BASE__ +#include "dab-constants.h" +#include +#include +#include +#include +#include +#include "fir-filters.h" +#include "ringbuffer.h" + + +class audioBase: public QObject { +Q_OBJECT +public: + audioBase (void); +virtual ~audioBase (void); +virtual void stop (void); +virtual void restart (void); +// + void audioOut (int16_t *, int32_t, int); + void startDumping (SNDFILE *); + void stopDumping (void); +private: + void audioOut_16000 (int16_t *, int32_t); + void audioOut_24000 (int16_t *, int32_t); + void audioOut_32000 (int16_t *, int32_t); + void audioOut_48000 (int16_t *, int32_t); + LowPassFIR f_16000; + LowPassFIR f_24000; + LowPassFIR f_32000; + SNDFILE *dumpFile; + QMutex myLocker; +protected: +virtual void audioOutput (float *, int32_t); +}; +#endif + diff --git a/includes/output/audiosink.h b/includes/output/audiosink.h new file mode 100644 index 0000000..12f8614 --- /dev/null +++ b/includes/output/audiosink.h @@ -0,0 +1,83 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Many of the ideas as implemented in Qt-DAB are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef __AUDIO_SINK +#define __AUDIO_SINK +#include +#include "dab-constants.h" +#include +#include +#include "audio-base.h" +#include "ringbuffer.h" + +class QComboBox; + +class audioSink : public audioBase { +public: + audioSink (int16_t); + ~audioSink (void); + bool setupChannels (QComboBox *); + void stop (void); + void restart (void); + bool selectDevice (int16_t); + bool selectDefaultDevice (void); + int32_t missed (void); +private: + int16_t numberofDevices (void); + QString outputChannelwithRate (int16_t, int32_t); + int16_t invalidDevice (void); + bool isValidDevice (int16_t); + int32_t cardRate (void); + + bool OutputrateIsSupported (int16_t, int32_t); + void audioOutput (float *, int32_t); + int32_t CardRate; + int16_t latency; + int32_t size; + bool portAudio; + bool writerRunning; + int16_t numofDevices; + int paCallbackReturn; + int16_t bufSize; + PaStream *ostream; + SNDFILE *dumpFile; + RingBuffer *_O_Buffer; + PaStreamParameters outputParameters; + + int16_t *outTable; + QStringList *InterfaceList; +protected: +static int paCallback_o (const void *input, + void *output, + unsigned long framesperBuffer, + const PaStreamCallbackTimeInfo *timeInfo, + PaStreamCallbackFlags statusFlags, + void *userData); +}; + +#endif + diff --git a/includes/output/audiosink.h-old b/includes/output/audiosink.h-old new file mode 100644 index 0000000..42709a8 --- /dev/null +++ b/includes/output/audiosink.h-old @@ -0,0 +1,99 @@ +# +/* + * Copyright (C) 2009, 2010, 2011 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the SDR-J. + * Many of the ideas as implemented in ESDR are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef __AUDIO_SINK +#define __AUDIO_SINK +#include +#include "dab-constants.h" +#include +#include +#include "audio-base.h" +#include "ringbuffer.h" +#include + +class audioSink : public audioBase { +Q_OBJECT +public: + audioSink (int16_t, +#ifdef GUI_7 + QComboBox *, +#else + QStringList *, +#endif + RingBuffer *); + ~audioSink (void); + void stop (void); + void restart (void); + bool selectDevice (QString); + bool selectDevice (int16_t); + bool selectDefaultDevice (void); +public slots: + bool set_streamSelector (int); +private: + int16_t numberofDevices (void); + QString outputChannelwithRate (int16_t, int32_t); + int16_t invalidDevice (void); + bool isValidDevice (int16_t); + int32_t cardRate (void); + + bool OutputrateIsSupported (int16_t, int32_t); + void audioOutput (float *, int32_t); +#ifdef GUI_7 + bool setupChannels (QComboBox *); +#else + bool setupChannels (QStringList *); +#endif + int32_t CardRate; + int16_t latency; + int32_t size; + bool portAudio; + bool writerRunning; + int16_t numofDevices; + int paCallbackReturn; + int16_t bufSize; + PaStream *ostream; + SNDFILE *dumpFile; + RingBuffer *_O_Buffer; + PaStreamParameters outputParameters; + + int16_t *outTable; +#ifdef GUI_7 + QComboBox *streamSelector; +#else + QStringList *InterfaceList; +#endif +protected: +static int paCallback_o (const void *input, + void *output, + unsigned long framesperBuffer, + const PaStreamCallbackTimeInfo *timeInfo, + PaStreamCallbackFlags statusFlags, + void *userData); +}; + +#endif + diff --git a/includes/output/fir-filters.h b/includes/output/fir-filters.h new file mode 100644 index 0000000..7f0121e --- /dev/null +++ b/includes/output/fir-filters.h @@ -0,0 +1,50 @@ +# +/* + * Copyright (C) 2010, 2011, 2012 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the SDR-J. + * Many of the ideas as implemented in SDR-J are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef __FIR_LOWPASSFILTER__ +#define __FIR_LOWPASSFILTER__ + +#include "dab-constants.h" + +class LowPassFIR { +public: + LowPassFIR (int16_t, // order + int32_t, // cutoff frequency + int32_t // samplerate + ); + ~LowPassFIR (void); + std::complex Pass (std::complex); + float Pass (float); +private: + int16_t filterSize; + std::complex *filterKernel; + std::complex *Buffer; + int16_t ip; +}; + +#endif + diff --git a/includes/output/newconverter.h b/includes/output/newconverter.h new file mode 100644 index 0000000..6a87227 --- /dev/null +++ b/includes/output/newconverter.h @@ -0,0 +1,60 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef __NEW_CONVERTER__ +#define __NEW_CONVERTER__ + +#include +#include +#include +#include +#include +#include +#include +#include "dab-constants.h" + +class newConverter { +private: + int32_t inRate; + int32_t outRate; + double ratio; + int32_t outputLimit; + int32_t inputLimit; + SRC_STATE *converter; + SRC_DATA *src_data; + std::vector inBuffer; + std::vector outBuffer; + int32_t inp; +public: + newConverter (int32_t inRate, int32_t outRate, + int32_t inSize); + + ~newConverter (void); + + bool convert (std::complex v, + std::complex *out, int32_t *amount); + +int32_t getOutputsize (void); +}; + +#endif + diff --git a/includes/output/rtp-streamer.h b/includes/output/rtp-streamer.h new file mode 100644 index 0000000..d812ff5 --- /dev/null +++ b/includes/output/rtp-streamer.h @@ -0,0 +1,68 @@ +# +/* + * Copyright (C) 2011, 2012, 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the SDR-J. + * Many of the ideas as implemented in SDR-J are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef __RTP_STREAMER +#define __RTP_STREAMER + +#include +#include +#include +#include "rtpsession.h" +#include "rtpsessionparams.h" +#include "rtpudpv4transmitter.h" +#include "rtpipv4address.h" +#include "rtptimeutilities.h" +#include "rtppacket.h" +#include "audio-base.h" + +using namespace jrtplib; + +class rtpStreamer : public audioBase { +Q_OBJECT +public: + rtpStreamer (QString name, int32_t port, + RingBuffer *); + ~rtpStreamer (void); + void audioOutput (float *, int); +private: + QString theName; + int32_t thePort; +RingBuffer *theBuffer; +RingBuffer *inBuffer; + RTPSession session; + RTPSessionParams sessionparams; + RTPUDPv4TransmissionParams transparams; + void sendBuffer (uint8_t *, int16_t); + float left [481]; + float right [481]; + uint8_t buffer [1024]; + int16_t fillP; + int16_t convIndex; + int mapTable_int [481]; + float mapTable_float [481]; +}; +#endif + diff --git a/includes/output/tcp-streamer.h b/includes/output/tcp-streamer.h new file mode 100644 index 0000000..98db5b8 --- /dev/null +++ b/includes/output/tcp-streamer.h @@ -0,0 +1,61 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Many of the ideas as implemented in Qt-DAB are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __TCP_STREAMER__ +#define __TCP_STREAMER__ + +#include "dab-constants.h" +#include "ringbuffer.h" +#include +#include +#include +#include +#include +#include +#include "audio-base.h" + +class tcpStreamer: public audioBase { +Q_OBJECT +public: + tcpStreamer (int32_t); + ~tcpStreamer (void); + void audioOutput (float *, int32_t); +private: + RingBuffer *buffer; + int32_t port; + QTcpServer streamer; + QTcpSocket *client; + QTcpSocket *streamerAddress; + QTimer watchTimer; + bool connected; +public slots: + void acceptConnection (void); + void processSamples (void); +signals: + void handleSamples (void); +}; +#endif + diff --git a/includes/scopes-qwt6/iqdisplay.h b/includes/scopes-qwt6/iqdisplay.h new file mode 100644 index 0000000..97559b0 --- /dev/null +++ b/includes/scopes-qwt6/iqdisplay.h @@ -0,0 +1,67 @@ +# +/* + * Copyright (C) 2008, 2009, 2010 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __IQDISPLAY__ +#define __IQDISPLAY__ + +#include "dab-constants.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "dab-constants.h" +/* + * for the waterfall display + */ + +class IQDisplay: public QObject, public QwtPlotSpectrogram { +Q_OBJECT +public: + IQDisplay (QwtPlot *, int16_t); + ~IQDisplay (void); +void DisplayIQ (std::complex *, float); +private: + int32_t x_amount; + std::vector plotData; + std::vector plot2; + std::vector > Points; + QwtPlot *plotgrid; + int _OutputRate; + int Radius; + int CycleCount; +private slots: +}; +#endif + diff --git a/includes/scopes-qwt6/scope.h b/includes/scopes-qwt6/scope.h new file mode 100644 index 0000000..58a70cc --- /dev/null +++ b/includes/scopes-qwt6/scope.h @@ -0,0 +1,146 @@ +# +/* + * Copyright (C) 2008, 2009, 2010 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the SDR-J. + * Many of the ideas as implemented in SDR-J are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __SCOPES +#define __SCOPES + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "spectrogramdata.h" + +class SpectrumViewer; +class WaterfallViewer; +class QwtLinearColorMap; +class QwtScaleWidget; +/* + * The stacked object is called the scope, it is built as a wrapper + * around the actual display mechanisms the waterfall and the + * spectrumviewer. + */ + +#define WATERFALL_MODE 0 +#define SPECTRUM_MODE 1 + +class Scope: public QObject { +Q_OBJECT +public: + Scope (QwtPlot *, uint16_t, uint16_t); + ~Scope (void); +void Display (double *, double *, double, int32_t); +void SelectView (uint8_t); +void setBitDepth (int16_t); +private: + QwtPlot *Plotter; + uint16_t Displaysize; + uint16_t Rastersize; + uint8_t CurrentWidget; + SpectrumViewer *Spectrum; + WaterfallViewer *Waterfall; + int16_t bitDepth; + float get_db (float); +private slots: + void leftClicked (int); + void rightClicked (int); +signals: + void clickedwithLeft (int); + void clickedwithRight (int); +}; + +/* + * for the waterfall display + */ +class WaterfallViewer: public QObject, public QwtPlotSpectrogram { +Q_OBJECT +public: + WaterfallViewer (QwtPlot *, uint16_t, uint16_t); + ~WaterfallViewer (); +void ViewWaterfall (double *, + double *, + double, + int32_t); +private: + SpectrogramData *WaterfallData; + QwtPlot *plotgrid; + uint16_t Displaysize; + uint16_t Rastersize; + double *plotData; + QwtPlotMarker *Marker; + uint16_t IndexforMarker; + QwtPlotPicker *lm_picker; + uint8_t OneofTwo; + QwtLinearColorMap *colorMap; + QwtScaleWidget *rightAxis; +private slots: + void leftMouseClick (const QPointF &); +signals: + void leftClicked (int); +}; +/* + * The spectrumDisplay + */ +class SpectrumViewer: public QObject { +Q_OBJECT +public: + SpectrumViewer (QwtPlot *, uint16_t); + ~SpectrumViewer (void); +void ViewSpectrum (double *, double *, double, int32_t); +void setBitDepth (int16_t); +private: + QwtPlot *plotgrid; + uint16_t Displaysize; + QwtPlotGrid *grid; + QwtPlotCurve *SpectrumCurve; + QwtPlotMarker *Marker; + uint32_t IndexforMarker; + QwtPlotPicker *lm_picker; + QwtPlotPicker *rm_picker; + QBrush *ourBrush; + int16_t bitDepth; + int32_t normalizer; + float get_db (float); +private slots: + void leftMouseClick (const QPointF &); + void rightMouseClick (const QPointF &); +signals: + void leftClicked (int); + void rightClicked (int); +}; +#endif + diff --git a/includes/scopes-qwt6/spectrogramdata.h b/includes/scopes-qwt6/spectrogramdata.h new file mode 100644 index 0000000..2924baa --- /dev/null +++ b/includes/scopes-qwt6/spectrogramdata.h @@ -0,0 +1,85 @@ +# +/* + * Copyright (C) 2010, 2011, 2012 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the SDR-J. + * Many of the ideas as implemented in SDR-J are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef __SPECTROGRAM +#define __SPECTROGRAM + +#include +#include +#include +#include + +class SpectrogramData: public QwtRasterData { +public: + double *data; // pointer to actual data + int left; // index of left most element in raster + int width; // raster width + int height; // rasterheigth + int datawidth; // width of matrix + int dataheight; // for now == rasterheigth + double max; + + SpectrogramData (double *data, int left, int width, int height, + int datawidth, double max): + QwtRasterData () { + this -> data = data; + this -> left = left; + this -> width = width; + this -> height = height; + this -> datawidth = datawidth; + this -> dataheight = height; + this -> max = max; + + setInterval (Qt::XAxis, QwtInterval (left, left + width)); + setInterval (Qt::YAxis, QwtInterval (0, height)); + setInterval (Qt::ZAxis, QwtInterval (0, max)); +} + +void initRaster (const QRectF &x, const QSize &raster) { + (void)x; + (void)raster; +} + +QwtInterval Interval (Qt::Axis x)const { + if (x == Qt::XAxis) + return QwtInterval (left, left + width); + return QwtInterval (0, max); +} + + ~SpectrogramData () { +} + +double value (double x, double y) const { +//fprintf (stderr, "x = %f, y = %f\n", x, y); + x = x - left; + x = x / width * datawidth; + return data [(int)y * datawidth + (int)x]; +} + +}; + +#endif + diff --git a/includes/various/Xtan2.h b/includes/various/Xtan2.h new file mode 100644 index 0000000..65523eb --- /dev/null +++ b/includes/various/Xtan2.h @@ -0,0 +1,35 @@ +# +// +// This LUT implementation of atan2 is a C++ translation of +// a Java discussion on the net +// http://www.java-gaming.org/index.php?topic=14647.0 + +#ifndef __COMP_ATAN +#define __COMP_ATAN + +#include +#include +#include +#include +#include +#include "dab-constants.h" +# +class compAtan { +public: + compAtan (void); + ~compAtan (void); + float atan2 (float, float); + float argX (std::complex); +private: + float *ATAN2_TABLE_PPY; + float *ATAN2_TABLE_PPX; + float *ATAN2_TABLE_PNY; + float *ATAN2_TABLE_PNX; + float *ATAN2_TABLE_NPY; + float *ATAN2_TABLE_NPX; + float *ATAN2_TABLE_NNY; + float *ATAN2_TABLE_NNX; + float Stretch; +}; + +#endif diff --git a/includes/various/band-handler.h b/includes/various/band-handler.h new file mode 100644 index 0000000..43b6d2e --- /dev/null +++ b/includes/various/band-handler.h @@ -0,0 +1,39 @@ +# +/* + * Copyright (C) 2013, 2014, 2015, 2016, 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __BANDHANDLER__ +#define __BANDHANDLER__ +#include +#include +#include +// +// a simple convenience class +// +class bandHandler { +public: + bandHandler (void); + ~bandHandler (void); +void setupChannels (QComboBox *s, uint8_t band); +int32_t Frequency (uint8_t band, QString Channel); +}; +#endif + diff --git a/includes/various/dab-params.h b/includes/various/dab-params.h new file mode 100644 index 0000000..7ca5a2f --- /dev/null +++ b/includes/various/dab-params.h @@ -0,0 +1,57 @@ +# +/* + * Copyright (C) 2013, 2014, 2015, 2016, 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB (formerly SDR-J, JSDR). + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __DAB_PARAMS__ +#define __DAB_PARAMS__ + +#include + +class dabParams { +public: + dabParams (uint8_t); + ~dabParams (void); + int16_t get_dabMode (void); + int16_t get_L (void); + int16_t get_carriers (void); + int16_t get_T_null (void); + int16_t get_T_s (void); + int16_t get_T_u (void); + int16_t get_T_g (void); + int32_t get_T_F (void); + int32_t get_carrierDiff (void); + int16_t get_CIFs (void); +private: + uint8_t dabMode; + int16_t L; + int16_t K; + int16_t T_null; + int32_t T_F; + int16_t T_s; + int16_t T_u; + int16_t T_g; + int16_t carrierDiff; + int16_t CIFs; +}; + +#endif + diff --git a/includes/various/fft-handler.h b/includes/various/fft-handler.h new file mode 100644 index 0000000..65950ed --- /dev/null +++ b/includes/various/fft-handler.h @@ -0,0 +1,70 @@ +/* + * + * Copyright (C) 2009 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _COMMON_FFT +#define _COMMON_FFT + +// Simple wrapper around fftwf +#include "dab-constants.h" +#include "dab-params.h" + +#define FFTW_MALLOC fftwf_malloc +#define FFTW_PLAN_DFT_1D fftwf_plan_dft_1d +#define FFTW_DESTROY_PLAN fftwf_destroy_plan +#define FFTW_FREE fftwf_free +#define FFTW_PLAN fftwf_plan +#define FFTW_EXECUTE fftwf_execute +#include + +/* + * a simple wrapper + */ + +class fftHandler { +public: + fftHandler (uint8_t); + ~fftHandler (void); + std::complex *getVector (void); + void do_FFT (void); + void do_IFFT (void); + private: + dabParams p; + int32_t fftSize; + std::complex *vector; + FFTW_PLAN plan; +}; + +class common_ifft { +public: + common_ifft (int32_t); + ~common_ifft(void); + std::complex *getVector(void); + void do_IFFT(void); + private: + int32_t fft_size; + std::complex *vector; + FFTW_PLAN plan; + void Scale(std::complex *); +}; +#endif + diff --git a/includes/various/ringbuffer.h b/includes/various/ringbuffer.h new file mode 100644 index 0000000..042a4fe --- /dev/null +++ b/includes/various/ringbuffer.h @@ -0,0 +1,321 @@ +# +/* + * $Id: pa_ringbuffer.c 1738 2011-08-18 11:47:28Z rossb $ + * Portable Audio I/O Library + * Ring Buffer utility. + * + * Author: Phil Burk, http://www.softsynth.com + * modified for SMP safety on Mac OS X by Bjorn Roche + * modified for SMP safety on Linux by Leland Lucius + * also, allowed for const where possible + * modified for multiple-byte-sized data elements by Sven Fischer + * + * Note that this is safe only for a single-thread reader and a + * single-thread writer. + * + * This program uses the PortAudio Portable Audio Library. + * For more information see: http://www.portaudio.com + * Copyright (c) 1999-2000 Ross Bencina and Phil Burk + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* + * + * Copyright (C) 2008, 2009, 2010 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * The ringbuffer here is a rewrite of the ringbuffer used in the PA code + * All rights remain with their owners + * This file is part of the SDR-J. + * Many of the ideas as implemented in SDR-J are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with ESDR; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#ifndef __RINGBUFFER__ +#define __RINGBUFFER__ +#include +#include +#include +#include +/* + * a simple ringbuffer, lockfree, however only for a + * single reader and a single writer. + * Mostly used for getting samples from or to the soundcard + */ +#if defined(__APPLE__) +# include + /* Here are the memory barrier functions. Mac OS X only provides + full memory barriers, so the three types of barriers are the same, + however, these barriers are superior to compiler-based ones. */ +# define PaUtil_FullMemoryBarrier() OSMemoryBarrier() +# define PaUtil_ReadMemoryBarrier() OSMemoryBarrier() +# define PaUtil_WriteMemoryBarrier() OSMemoryBarrier() +#elif defined(__GNUC__) + /* GCC >= 4.1 has built-in intrinsics. We'll use those */ +# if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) +# define PaUtil_FullMemoryBarrier() __sync_synchronize() +# define PaUtil_ReadMemoryBarrier() __sync_synchronize() +# define PaUtil_WriteMemoryBarrier() __sync_synchronize() + /* as a fallback, GCC understands volatile asm and "memory" to mean it + * should not reorder memory read/writes */ +# elif defined( __PPC__ ) +# define PaUtil_FullMemoryBarrier() asm volatile("sync":::"memory") +# define PaUtil_ReadMemoryBarrier() asm volatile("sync":::"memory") +# define PaUtil_WriteMemoryBarrier() asm volatile("sync":::"memory") +# elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || defined( __i686__ ) || defined( __x86_64__ ) +# define PaUtil_FullMemoryBarrier() asm volatile("mfence":::"memory") +# define PaUtil_ReadMemoryBarrier() asm volatile("lfence":::"memory") +# define PaUtil_WriteMemoryBarrier() asm volatile("sfence":::"memory") +# else +# ifdef ALLOW_SMP_DANGERS +# warning Memory barriers not defined on this system or system unknown +# warning For SMP safety, you should fix this. +# define PaUtil_FullMemoryBarrier() +# define PaUtil_ReadMemoryBarrier() +# define PaUtil_WriteMemoryBarrier() +# else +# error Memory barriers are not defined on this system. You can still compile by defining ALLOW_SMP_DANGERS, but SMP safety will not be guaranteed. +# endif +# endif +#else +# ifdef ALLOW_SMP_DANGERS +# warning Memory barriers not defined on this system or system unknown +# warning For SMP safety, you should fix this. +# define PaUtil_FullMemoryBarrier() +# define PaUtil_ReadMemoryBarrier() +# define PaUtil_WriteMemoryBarrier() +# else +# error Memory barriers are not defined on this system. You can still compile by defining ALLOW_SMP_DANGERS, but SMP safety will not be guaranteed. +# endif +#endif + +template +class RingBuffer { +private: + uint32_t bufferSize; +volatile uint32_t writeIndex; +volatile uint32_t readIndex; + uint32_t bigMask; + uint32_t smallMask; + char *buffer; +public: + RingBuffer (uint32_t elementCount) { + if (((elementCount - 1) & elementCount) != 0) + elementCount = 64 * 16384; /* default */ + + bufferSize = elementCount; + buffer = new char [2 * bufferSize * sizeof (elementtype)]; + writeIndex = 0; + readIndex = 0; + smallMask = (elementCount)- 1; + bigMask = (elementCount * 2) - 1; +} + + ~RingBuffer () { + delete[] buffer; +} + +/* + * functions for checking available data for reading and space + * for writing + */ +int32_t GetRingBufferReadAvailable (void) { + return (writeIndex - readIndex) & bigMask; +} + +int32_t ReadSpace (void){ + return GetRingBufferReadAvailable (); +} + +int32_t GetRingBufferWriteAvailable (void) { + return bufferSize - GetRingBufferReadAvailable (); +} + +int32_t WriteSpace (void) { + return GetRingBufferWriteAvailable (); +} + +void FlushRingBuffer () { + writeIndex = 0; + readIndex = 0; +} +/* ensure that previous writes are seen before we update the write index + (write after write) + */ +int32_t AdvanceRingBufferWriteIndex (int32_t elementCount) { + PaUtil_WriteMemoryBarrier(); + return writeIndex = (writeIndex + elementCount) & bigMask; +} + +/* ensure that previous reads (copies out of the ring buffer) are + * always completed before updating (writing) the read index. + * (write-after-read) => full barrier + */ +int32_t AdvanceRingBufferReadIndex (int32_t elementCount) { + PaUtil_FullMemoryBarrier(); + return readIndex = (readIndex + elementCount) & bigMask; +} + +/*************************************************************************** +** Get address of region(s) to which we can write data. +** If the region is contiguous, size2 will be zero. +** If non-contiguous, size2 will be the size of second region. +** Returns room available to be written or elementCount, whichever is smaller. +*/ +int32_t GetRingBufferWriteRegions (uint32_t elementCount, + void **dataPtr1, int32_t *sizePtr1, + void **dataPtr2, int32_t *sizePtr2 ) { +uint32_t index; +uint32_t available = GetRingBufferWriteAvailable (); + + if (elementCount > available) + elementCount = available; + +/* Check to see if write is not contiguous. */ + index = writeIndex & smallMask; + if ((index + elementCount) > bufferSize ) { + /* Write data in two blocks that wrap the buffer. */ + int32_t firstHalf = bufferSize - index; + *dataPtr1 = &buffer[index * sizeof(elementtype)]; + *sizePtr1 = firstHalf; + *dataPtr2 = &buffer [0]; + *sizePtr2 = elementCount - firstHalf; + } + else { // fits + *dataPtr1 = &buffer [index * sizeof(elementtype)]; + *sizePtr1 = elementCount; + *dataPtr2 = NULL; + *sizePtr2 = 0; + } + + if (available > 0) + PaUtil_FullMemoryBarrier(); /* (write-after-read) => full barrier */ + + return elementCount; +} + +/*************************************************************************** +** Get address of region(s) from which we can read data. +** If the region is contiguous, size2 will be zero. +** If non-contiguous, size2 will be the size of second region. +** Returns room available to be read or elementCount, whichever is smaller. +*/ +int32_t GetRingBufferReadRegions (uint32_t elementCount, + void **dataPtr1, int32_t *sizePtr1, + void **dataPtr2, int32_t *sizePtr2) { +uint32_t index; +uint32_t available = GetRingBufferReadAvailable (); /* doesn't use memory barrier */ + + if (elementCount > available) + elementCount = available; + +/* Check to see if read is not contiguous. */ + index = readIndex & smallMask; + if ((index + elementCount) > bufferSize) { + /* Write data in two blocks that wrap the buffer. */ + int32_t firstHalf = bufferSize - index; + *dataPtr1 = &buffer [index * sizeof(elementtype)]; + *sizePtr1 = firstHalf; + *dataPtr2 = &buffer [0]; + *sizePtr2 = elementCount - firstHalf; + } + else { + *dataPtr1 = &buffer [index * sizeof(elementtype)]; + *sizePtr1 = elementCount; + *dataPtr2 = NULL; + *sizePtr2 = 0; + } + + if (available) + PaUtil_ReadMemoryBarrier(); /* (read-after-read) => read barrier */ + + return elementCount; +} + +int32_t putDataIntoBuffer (const void *data, int32_t elementCount) { +int32_t size1, size2, numWritten; +void *data1; +void *data2; + + numWritten = GetRingBufferWriteRegions (elementCount, + &data1, &size1, + &data2, &size2 ); + if (size2 > 0) { + memcpy (data1, data, size1 * sizeof(elementtype)); + data = ((char *)data) + size1 * sizeof(elementtype); + memcpy (data2, data, size2 * sizeof(elementtype)); + } + else + memcpy (data1, data, size1 * sizeof(elementtype)); + + AdvanceRingBufferWriteIndex (numWritten ); + return numWritten; +} + +int32_t getDataFromBuffer (void *data, int32_t elementCount ) { +int32_t size1, size2, numRead; +void *data1; +void *data2; + + numRead = GetRingBufferReadRegions (elementCount, + &data1, &size1, + &data2, &size2 ); + if (size2 > 0) { + memcpy (data, data1, size1 * sizeof(elementtype)); + data = ((char *)data) + size1 * sizeof(elementtype); + memcpy (data, data2, size2 * sizeof(elementtype)); + } + else + memcpy (data, data1, size1 * sizeof(elementtype)); + + AdvanceRingBufferReadIndex (numRead ); + return numRead; +} + +int32_t skipDataInBuffer (uint32_t n_values) { +// ensure that we have the correct read and write indices + PaUtil_FullMemoryBarrier (); + if (n_values > GetRingBufferReadAvailable ()) + n_values = GetRingBufferReadAvailable (); + AdvanceRingBufferReadIndex (n_values); + return n_values; +} + +}; +#endif + diff --git a/includes/various/text-mapper.h b/includes/various/text-mapper.h new file mode 100644 index 0000000..b5230b0 --- /dev/null +++ b/includes/various/text-mapper.h @@ -0,0 +1,44 @@ +# +/* + * Copyright (C) 2013, 2014, 2015, 2016, 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB (formerly SDR-J, JSDR). + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +# +#ifndef __TEXT_MAPPER__ +#define __TEXT_MAPPER__ + +// +// simple convenience class + +#include "dab-constants.h" + + +class textMapper { +public: + textMapper (void); + ~textMapper (void); +const +char *get_programm_type_string (int16_t type); +const +char *get_programm_language_string (int16_t language); +}; + +#endif diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..d5d7518 --- /dev/null +++ b/main.cpp @@ -0,0 +1,146 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of dabradio (formerly SDR-J, JSDR). + * + * dabradio 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; either version 2 of the License, or + * (at your option) any later version. + * + * dabradio 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with dabradio; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Main program + */ +#include +#include +#include +#include +#include +#include +#include "dab-constants.h" +#include "radio.h" + +#define DEFAULT_INI ".dabradio.ini" + +#ifndef GITHASH +#define GITHASH " " +#endif + +QString fullPathfor (QString v) { +QString fileName; + + if (v == QString ("")) + return QString ("/tmp/xxx"); + + if (v. at (0) == QChar ('/')) // full path specified + return v; + + fileName = QDir::homePath (); + fileName. append ("/"); + fileName. append (v); + fileName = QDir::toNativeSeparators (fileName); + + if (!fileName. endsWith (".ini")) + fileName. append (".ini"); + + return fileName; +} + +void setTranslator (QString Language); + +int main (int argc, char **argv) { +QString initFileName = fullPathfor (QString (DEFAULT_INI)); +RadioInterface *MyRadioInterface; + +// Default values +QSettings *dabSettings; // ini file +int opt; +bool rawFile_flag = false; + + QCoreApplication::setOrganizationName ("Lazy Chair Computing"); + QCoreApplication::setOrganizationDomain ("Lazy Chair Computing"); + QCoreApplication::setApplicationName ("dabradio"); + QCoreApplication::setApplicationVersion (QString (CURRENT_VERSION) + " Git: " + GITHASH); + + while ((opt = getopt (argc, argv, "i:R")) != -1) { + switch (opt) { + case 'i': + initFileName = fullPathfor (QString (optarg)); + break; + + case 'R': + rawFile_flag = true; + break; + + default: + break; + } + } + + dabSettings = new QSettings (initFileName, QSettings::IniFormat); + +/* + * Before we connect control to the gui, we have to + * instantiate + */ + QApplication a (argc, argv); +// setting the language + QString locale = QLocale::system (). name (); + qDebug() << "main:" << "Detected system language" << locale; + setTranslator (locale); + + a. setWindowIcon (QIcon (":/qt-dab.ico")); + + MyRadioInterface = new RadioInterface (dabSettings, + rawFile_flag + ); + MyRadioInterface -> show (); + +#if QT_VERSION >= 0x050600 + QGuiApplication::setAttribute (Qt::AA_EnableHighDpiScaling); +#endif + a. exec (); +/* + * done: + */ + fprintf (stderr, "back in main program\n"); + fflush (stdout); + fflush (stderr); + qDebug ("It is done\n"); +// delete MyRadioInterface; + delete dabSettings; +} + +void setTranslator (QString Language) { +QTranslator *Translator = new QTranslator; + +// German is special (as always) + if ((Language == "de_AT") || (Language == "de_CH")) + Language = "de_DE"; +// +// what about Dutch? + bool TranslatorLoaded = + Translator -> load (QString(":/i18n/") + Language); + qDebug() << "main:" << "Set language" << Language; + QCoreApplication::installTranslator (Translator); + + if (!TranslatorLoaded) { + qDebug() << "main:" << "Error while loading language specifics" << Language << "use English \"en_GB\" instead"; + Language = "en_GB"; + } + + QLocale curLocale (QLocale ((const QString&)Language)); + QLocale::setDefault (curLocale); +} + diff --git a/newUser.txt b/newUser.txt new file mode 100644 index 0000000..c63d11c --- /dev/null +++ b/newUser.txt @@ -0,0 +1,2 @@ +JvanKatwijk + diff --git a/radio.cpp b/radio.cpp new file mode 100644 index 0000000..7cf6a58 --- /dev/null +++ b/radio.cpp @@ -0,0 +1,1097 @@ +# +/* + * Copyright (C) 2013, 2014, 2015, 2016, 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the dabradio (formerly SDR-J, JSDR). + * dabradio 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; either version 2 of the License, or + * (at your option) any later version. + * + * dabradio 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with dabradio; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "dab-constants.h" +#include +#include +#include +#include +#include "radio.h" +#include "band-handler.h" +#include "wavfiles.h" +#include "rawfiles.h" +#include "audiosink.h" +#include "spectrum-handler.h" +#ifdef HAVE_RTLSDR +#include "rtlsdr-handler.h" +#endif +#ifdef HAVE_SDRPLAY +#include "sdrplay-handler.h" +#endif +#ifdef HAVE_AIRSPY +#include "airspy-handler.h" +#endif +#include "ui_technical_data.h" + +std::vector get_cpu_times (void) { + std::ifstream proc_stat ("/proc/stat"); + proc_stat. ignore (5, ' '); // Skip the 'cpu' prefix. + std::vector times; + for (size_t time; proc_stat >> time; times. push_back (time)); + return times; +} + +bool get_cpu_times (size_t &idle_time, size_t &total_time) { + const std::vector cpu_times = get_cpu_times (); + if (cpu_times. size () < 4) + return false; + idle_time = cpu_times [3]; + total_time = std::accumulate (cpu_times. begin (), cpu_times. end (), 0); + return true; +} +/** + * We use the creation function merely to set up the + * user interface and make the connections between the + * gui elements and the handling agents. All real action + * is initiated by gui buttons + */ + + RadioInterface::RadioInterface (QSettings *Si, + bool rawFile_flag, + QWidget *parent): + QMainWindow (parent) { +int16_t latency; +int16_t k; +QString h; + + dabSettings = Si; + this -> rawFile_flag = rawFile_flag; + running. store (false); + scanning = false; + isSynced = UNSYNCED; + spectrumBuffer = new RingBuffer> (2 * 32768); + audioBuffer = new RingBuffer(16 * 32768); + +/** threshold is used in the phaseReference class + * as threshold for checking the validity of the correlation result + * 3 is a reasonable value + */ + threshold = + dabSettings -> value ("threshold", 3). toInt (); +// +// latency is used to allow different settings for different +// situations wrt the output buffering. For windows and the RPI +// this need to be a pretty large value (e.g. 5 to 10) + latency = + dabSettings -> value ("latency", 5). toInt (); + diff_length = + dabSettings -> value ("diff_length", DIFF_LENGTH). toInt (); + dabMode = dabSettings -> value ("dabMode", 1). toInt (); + if ((dabMode != 1) && (dabMode != 2)) + dabMode = 1; + + dataBuffer = new RingBuffer(32768); + currentName = QString (""); + + saveSlides = dabSettings -> value ("saveSlides", 1). toInt (); + showSlides = dabSettings -> value ("showPictures", 1). toInt (); + if (saveSlides != 0) + set_picturePath (); + +/////////////////////////////////////////////////////////////////////////// + +// The settings are done, now creation of the GUI parts + setupUi (this); +// + QString t = + dabSettings -> value ("dabBand", "VHF Band III"). toString (); + dabBand = t == "VHF Band III" ? BAND_III : L_BAND; + theBand. setupChannels (channelSelector, dabBand); + + dataDisplay = new QFrame (NULL); + techData. setupUi (dataDisplay); + show_data = false; +#ifdef __MINGW32__ + techData. cpuLabel -> hide (); + techData. cpuMonitor -> hide (); +#endif +// +// just sound out + soundOut = new audioSink (latency); + + ((audioSink *)soundOut) -> setupChannels (streamoutSelector); + streamoutSelector -> show (); + bool err; + h = dabSettings -> value ("soundchannel", "default"). toString (); + k = streamoutSelector -> findText (h); + if (k != -1) { + streamoutSelector -> setCurrentIndex (k); + err = !((audioSink *)soundOut) -> selectDevice (k); + } + + if ((k == -1) || err) + ((audioSink *)soundOut) -> selectDefaultDevice (); +// +// Showing a spectrum over the WiFi when running the dab software +// on an RPI 2 may not be a great success + spectrumHandler = new spectrumhandler (spectrumDisplay, + 64, // displaySize + spectrumBuffer); +// + QPalette p = techData. ficError_display -> palette (); + p. setColor (QPalette::Highlight, Qt::green); + techData. ficError_display -> setPalette (p); + techData. frameError_display -> setPalette (p); + techData. rsError_display -> setPalette (p); + techData. aacError_display -> setPalette (p); + techData. rsError_display -> hide (); + techData. aacError_display -> hide (); + techData. motAvailable -> + setStyleSheet ("QLabel {background-color : red}"); +// +// + ficBlocks = 0; + ficSuccess = 0; + pictureLabel = NULL; + syncedLabel -> + setStyleSheet ("QLabel {background-color : red}"); + + ensemble. setStringList (Services); + ensembleDisplay -> setModel (&ensemble); + Services << " "; + ensemble. setStringList (Services); + ensembleDisplay -> setModel (&ensemble); +// + connect (streamoutSelector, SIGNAL (activated (int)), + this, SLOT (set_streamSelector (int))); +// +// display the version + QString v = "dabradio -" + QString (CURRENT_VERSION); + QString versionText = "dabradio version: " + QString(CURRENT_VERSION); + versionText += " Build on: " + QString(__TIMESTAMP__) + QString (" ") + QString (GITHASH); + versionName -> setText (v); + versionName -> setToolTip (versionText); + +// and start the timer(s) +// The displaytimer is there to show the number of +// seconds running + displayTimer. setInterval (1000); + connect (&displayTimer, SIGNAL (timeout (void)), + this, SLOT (updateTimeDisplay (void))); + displayTimer. start (1000); + numberofSeconds = 0; +// +// timer for channel settings + channelTimer. setSingleShot (true); + channelTimer. setInterval (10000); +// timer for scanning + signalTimer. setSingleShot (true); + signalTimer. setInterval (10000); + connect (&signalTimer, SIGNAL (timeout (void)), + this, SLOT (No_Signal_Found (void))); + + inputDevice = setDevice (" "); + if (inputDevice == NULL) { + fprintf (stderr, "failure, no device\n"); + exit (1); + } + else + doStart (); +} +// +// when doStart is called, a device is available and selected +void RadioInterface::doStart (void) { +bool r = 0; +int32_t frequency; + + QString h = dabSettings -> value ("channel", "12C"). toString (); + int k = channelSelector -> findText (h); + if (k != -1) { + channelSelector -> setCurrentIndex (k); + } + frequency = theBand. Frequency (dabBand, + channelSelector -> currentText ()); + inputDevice -> setVFOFrequency (frequency); + r = inputDevice -> restartReader (); + qDebug ("Starting %d\n", r); + if (!r) { + QMessageBox::warning (this, tr ("Warning"), + tr ("Opening input stream failed\n")); + return; // give it another try + } +// Some buttons should not be touched before we have a device + + connect (showProgramData, SIGNAL (clicked (void)), + this, SLOT (toggle_show_data (void))); + connect (ensembleDisplay, SIGNAL (clicked (QModelIndex)), + this, SLOT (selectService (QModelIndex))); + connect (scanButton, SIGNAL (clicked (void)), + this, SLOT (set_Scanning (void))); + +// we avoided up till now connecting the channel selector +// to the slot since that function does a lot more than we +// want here + connect (channelSelector, SIGNAL (activated (const QString &)), + this, SLOT (selectChannel (const QString &))); +// +// It is time for some action + my_dabProcessor = new dabProcessor (this, + inputDevice, + dabMode, + threshold, + diff_length, + picturesPath, + spectrumBuffer + ); + + clearEnsemble (); // the display + my_dabProcessor -> start (); + running. store (true); +} + + RadioInterface::~RadioInterface (void) { + fprintf (stderr, "radioInterface is deleted\n"); +} + +void RadioInterface::dumpControlState (void) { + dabSettings -> setValue ("channel", + channelSelector -> currentText ()); + dabSettings -> setValue ("soundchannel", + streamoutSelector -> currentText ()); +} +// +/** + * \brief At the end, we might save some GUI values + * The QSettings could have been the class variable as well + * as the parameter + */ +// +// +///////////////////////////////////////////////////////////////////////////// +// If the ofdm processor has waited for a period of N frames +// to get a start of a synchronization, +// it sends a signal to the GUI handler +// If "scanning" is "on" we hop to the next frequency on +// the list + +void RadioInterface::signalTimer_out (void) { + No_Signal_Found (); +} +// +// No_Signal_Found might also come from the dabProcessor +void RadioInterface::No_Signal_Found (void) { + signalTimer. stop (); + if (!scanning) + return; + +// we stop the thread from running, +// Increment the frequency +// and restart + my_dabProcessor -> stop (); + while (!my_dabProcessor -> isFinished ()) + usleep (10000); + Increment_Channel (); + my_dabProcessor -> start (); + signalTimer. start (10000); +} +// + +void RadioInterface::set_Scanning (void) { + setStereo (false); + if (!running. load ()) + return; + + if (scanning) { + scanning = false; + fprintf (stderr, "scanning will stop\n"); + my_dabProcessor -> set_scanMode (false); + ensembleId -> display (0); + ensembleName -> setText (" "); + scanButton -> setText ("Scan band"); + return; + } + + scanning = true; +// +// the vector "services" is used to maintain the list of +// services in all ensembles that we find when scanning. +// services [0] is special in that it contains the name +// of the program being selected from the list. +// The location is always there when we did have a scan +// or are scanning + for (int i = 0; i < services. size (); i ++) + delete services [i]; + services. resize (1); + serviceDescriptor *ss = new serviceDescriptor (" ", " "); + services [0] = ss; // a dummy + + clearEnsemble (); + my_dabProcessor -> set_scanMode (true); + disconnect (channelSelector, SIGNAL (activated (const QString &)), + this, SLOT (selectChannel (const QString &))); + channelSelector -> setCurrentIndex (0); + int tunedFrequency = + theBand. Frequency (dabBand, channelSelector -> currentText ()); + inputDevice -> setVFOFrequency (tunedFrequency); + + connect (channelSelector, SIGNAL (activated (const QString &)), + this, SLOT (selectChannel (const QString &))); + scanButton -> setText ("scanning"); + signalTimer. start (10000); +} +// +// Increment channel is called during scanning. +// The approach taken here is to increment the current index +// in the combobox and select the new frequency. +// To avoid disturbance, we disconnect the combobox +// temporarily, since otherwise changing the channel would +// generate a signal +void RadioInterface::Increment_Channel (void) { +int32_t tunedFrequency; +int cc = channelSelector -> currentIndex (); + + cc += 1; + if (cc >= channelSelector -> count ()) { + if (scanning) { + set_Scanning (); + return; + } + cc = 0; + } +// To avoid reaction of the system on setting a different value + disconnect (channelSelector, SIGNAL (activated (const QString &)), + this, SLOT (selectChannel (const QString &))); + channelSelector -> setCurrentIndex (cc); + tunedFrequency = + theBand. Frequency (dabBand, channelSelector -> currentText ()); + inputDevice -> setVFOFrequency (tunedFrequency); + + connect (channelSelector, SIGNAL (activated (const QString &)), + this, SLOT (selectChannel (const QString &))); +} + +/////////////////////////////////////////////////////////////////////////// +/** + * clearEnsemble + * on changing settings, we clear all things in the gui + * related to the ensemble. + * The function is called from "deep" within the handling code + * Potentially a dangerous approach, since the fic handler + * might run in a separate thread and generate data to be displayed + */ +void RadioInterface::clearEnsemble (void) { +// +// it obviously means: stop processing + my_dabProcessor -> clearEnsemble (); + my_dabProcessor -> reset (); + clear_showElements (); +} + +// +// a slot, called by the fic/fib handlers +// little tricky, since we do not want the data here +// when setting the channel for selecting a service in +// the large list +void RadioInterface::addtoEnsemble (const QString &s) { + if (!scanning && (services. size () > 0)) + return; + + if (scanning) { + audiodata d; + QString t = s; + my_dabProcessor -> dataforAudioService (t, &d, 0); + serviceDescriptor *service; + if (d. defined) + service = + new serviceDescriptor (t, + channelSelector -> currentText(), + &d); + else + service = + new serviceDescriptor (t, + channelSelector -> currentText ()); + services. push_back (service); + } + + Services << s; + Services. removeDuplicates (); + ensemble. setStringList (Services); + ensembleDisplay -> setModel (&ensemble); +} + +// +/// a slot, called by the fib processor +void RadioInterface::nameofEnsemble (int id, const QString &v) { +QString s; + (void)v; + ensembleId -> display (id); + ensembleLabel = v; + ensembleName -> setText (v); + my_dabProcessor -> coarseCorrectorOff (); +} + +/////////////////////////////////////////////////////////////////////// + +/// called from the ofdmDecoder, which computed this for each frame +void RadioInterface::show_snr (int s) { + techData. snrDisplay -> display (s); +} + +// a slot called by the ofdmprocessor +void RadioInterface::set_CorrectorDisplay (int v) { + techData. correctorDisplay -> display (v); +} +/** + * \brief show_successRate + * a slot, called by the MSC handler to show the + * percentage of frames that could be handled + */ +void RadioInterface::show_frameErrors (int s) { + techData. frameError_display -> setValue (100 - 4 * s); +} + +void RadioInterface::show_rsErrors (int s) { + techData. rsError_display -> setValue (100 - 4 * s); +} + +void RadioInterface::show_aacErrors (int s) { + techData. aacError_display -> setValue (100 - 4 * s); +} + +void RadioInterface::show_ficSuccess (bool b) { + if (b) + ficSuccess ++; + if (++ficBlocks >= 100) { + techData. ficError_display -> setValue (ficSuccess); + ficSuccess = 0; + ficBlocks = 0; + } +} + +void RadioInterface::show_motHandling (bool b) { + if (b) { + techData. motAvailable -> + setStyleSheet ("QLabel {background-color : green}"); + } + else { + techData. motAvailable -> + setStyleSheet ("QLabel {background-color : red}"); + } +} + +/// just switch a color, obviously GUI dependent, but called +// from the ofdmprocessor +void RadioInterface::setSynced (char b) { + if (isSynced == b) + return; + + isSynced = b; + switch (isSynced) { + case SYNCED: + syncedLabel -> + setStyleSheet ("QLabel {background-color : green}"); + break; + + default: + syncedLabel -> + setStyleSheet ("QLabel {background-color : red}"); + break; + } +} + +// showLabel is triggered by the message handler +// the GUI may decide to ignore this +void RadioInterface::showLabel (QString s) { + if (running. load ()) + dynamicLabel -> setText (s); +} + +void RadioInterface::setStereo (bool s) { + if (s) + stereoLabel -> + setStyleSheet ("QLabel {background-color : green}"); + + else + stereoLabel -> + setStyleSheet ("QLabel {background-color : red}"); +} +// +////////////////////////////////////////////////////////////////////////// +// +void checkDir (QString &s) { +int16_t ind = s. lastIndexOf (QChar ('/')); +int16_t i; +QString dir; + if (ind == -1) // no slash, no directory + return; + + for (i = 0; i < ind; i ++) + dir. append (s [i]); + + if (QDir (dir). exists ()) + return; + QDir (). mkpath (dir); +} +// showMOT is triggered by the MOT handler, +// the GUI may decide to ignore the data sent +// since data is only sent whenever a data channel is selected +void RadioInterface::showMOT (QByteArray data, + int subtype, QString pictureName) { + const char *type; + if (!running. load ()) + return; + if (pictureLabel == NULL) + pictureLabel = new QLabel (NULL); + + type = subtype == 0 ? "GIF" : + subtype == 1 ? "JPG" : +// subtype == 1 ? "JPEG" : + subtype == 2 ? "BMP" : "PNG"; + + QPixmap p; + p. loadFromData (data, type); + if (saveSlides && (pictureName != QString (""))) { + pictureName = QDir::toNativeSeparators (pictureName); + FILE *x = fopen (pictureName. toLatin1 (). data (), "w+b"); + if (x == NULL) + fprintf (stderr, "cannot write file %s\n", + pictureName. toLatin1 (). data ()); + else { + fprintf (stderr, "going to write file %s\n", + pictureName. toLatin1 (). data ()); + (void)fwrite (data. data (), 1, data.length (), x); + fclose (x); + } + } + +// pictureLabel -> setFrameRect (QRect (0, 0, p. height (), p. width ())); + + if (showSlides) { + pictureLabel -> setPixmap (p); + pictureLabel -> show (); + } +} +// +// + +/** + * \brief changeinConfiguration + * No idea yet what to do, so just give up + * with what we were doing. The user will -eventually - + * see the new configuration from which he can select + */ +void RadioInterface::changeinConfiguration (void) { + if (running. load ()) { + soundOut -> stop (); + inputDevice -> stopReader (); + inputDevice -> resetBuffer (); + my_dabProcessor -> reset (); + } + clear_showElements (); +} +// +// In order to not overload with an enormous amount of +// signals, we trigger this function at most 10 times a second +// +void RadioInterface::newAudio (int amount, int rate) { + if (running. load ()) { + int16_t vec [amount]; + while (audioBuffer -> GetRingBufferReadAvailable () > amount) { + audioBuffer -> getDataFromBuffer (vec, amount); + soundOut -> audioOut (vec, amount, rate); + } + } +} + +// +// This function is only used in the Gui to clear +// the details of a selection +void RadioInterface::clear_showElements (void) { + Services = QStringList (); + ensemble. setStringList (Services); + ensembleDisplay -> setModel (&ensemble); + my_dabProcessor -> clearEnsemble (); + + ensembleLabel = QString (); + ensembleName -> setText (ensembleLabel); + dynamicLabel -> setText (""); + +// Then the various displayed items + ensembleName -> setText (" "); + + techData. frameError_display -> setValue (0); + techData. rsError_display -> setValue (0); + techData. aacError_display -> setValue (0); + techData. ficError_display -> setValue (0); + techData. ensemble -> setText (QString ("")); + techData. programName -> setText (QString ("")); + techData. frequency -> display (0); + techData. bitrateDisplay -> display (0); + techData. startAddressDisplay -> display (0); + techData. lengthDisplay -> display (0); + techData. subChIdDisplay -> display (0); +// techData. protectionlevelDisplay -> display (0); + techData. uepField -> setText (QString ("")); + techData. ASCTy -> setText (QString ("")); + techData. language -> setText (QString ("")); + techData. programType -> setText (QString ("")); + techData. motAvailable -> + setStyleSheet ("QLabel {background-color : red}"); + + techData. snrDisplay -> display (0); + if (pictureLabel != NULL) + delete pictureLabel; + pictureLabel = NULL; +} + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// + +/** + * \brief TerminateProcess + * Pretty critical, since there are many threads involved + * A clean termination is what is needed, regardless of the GUI + */ +void RadioInterface::TerminateProcess (void) { + running. store (false); +#ifdef DATA_STREAMER + fprintf (stderr, "going to close the dataStreamer\n"); + delete dataStreamer; +#endif + displayTimer. stop (); + signalTimer. stop (); + + if (inputDevice != NULL) + inputDevice -> stopReader (); // might be concurrent + if (my_dabProcessor != NULL) + my_dabProcessor -> stop (); // definitely concurrent + soundOut -> stop (); + dataDisplay -> hide (); +// everything should be halted by now + dumpControlState (); + delete soundOut; + if (inputDevice != NULL) + delete inputDevice; + fprintf (stderr, "going to delete dabProcessor\n"); + if (my_dabProcessor != NULL) + delete my_dabProcessor; + fprintf (stderr, "deleted dabProcessor\n"); + delete dataDisplay; +#ifdef HAVE_SPECTRUM + delete spectrumHandler; + delete spectrumBuffer; +#endif + if (pictureLabel != NULL) + delete pictureLabel; + pictureLabel = NULL; // signals may be pending, so careful + close (); + fprintf (stderr, ".. end the radio silences\n"); +} + +// +/** + * \brief selectChannel + * we assume that we are only here whenever the user + * tocuhed the channelSelector button + */ +void RadioInterface::selectChannel (QString s) { +int32_t tunedFrequency; +bool localRunning = running. load (); + + channelTimer. stop (); + setStereo (false); + if (scanning) + set_Scanning (); // switch it off + for (int i = 0; i < services. size (); i ++) + delete services [i]; + services. resize (0); + + if (localRunning) { + soundOut -> stop (); + inputDevice -> stopReader (); + } + + clear_showElements (); + + tunedFrequency = theBand. Frequency (dabBand, s); + inputDevice -> setVFOFrequency (tunedFrequency); + + if (localRunning) { + inputDevice -> restartReader (); + my_dabProcessor -> reset (); + running. store (true); + } + dabSettings -> setValue ("channel", s); +} + +static size_t previous_idle_time = 0; +static size_t previous_total_time = 0; + +void RadioInterface::updateTimeDisplay (void) { + numberofSeconds ++; + int16_t numberHours = numberofSeconds / 3600; + int16_t numberMinutes = (numberofSeconds / 60) % 60; + QString text = QString ("runtime "); + text. append (QString::number (numberHours)); + text. append (" hr, "); + text. append (QString::number (numberMinutes)); + text. append (" min"); + timeDisplay -> setText (text); +#ifndef __MINGW32__ + if ((numberofSeconds % 2) == 0) { + size_t idle_time, total_time; + get_cpu_times (idle_time, total_time); + const float idle_time_delta = idle_time - previous_idle_time; + const float total_time_delta = total_time - previous_total_time; + const float utilization = 100.0 * (1.0 - idle_time_delta / total_time_delta); + techData. cpuMonitor -> display (utilization); + previous_idle_time = idle_time; + previous_total_time = total_time; + } +#endif +} + +void RadioInterface::autoCorrector_on (void) { +// first the real stuff + clear_showElements (); + my_dabProcessor -> clearEnsemble (); + my_dabProcessor -> coarseCorrectorOn (); + my_dabProcessor -> reset (); +} + +/** + * \brief setDevice + * setDevice is called during the start up phase + * of the dab program, + */ +virtualInput *RadioInterface::setDevice (QString s) { +QString file; +virtualInput *inputDevice = NULL; +/// OK, everything quiet, now let us see what to do +#ifdef HAVE_AIRSPY + try { + inputDevice = new airspyHandler (dabSettings); + showButtons (); + spectrumHandler -> setBitDepth (inputDevice -> bitDepth ()); + return inputDevice; + } catch (int e) {} +#endif +#ifdef HAVE_SDRPLAY + try { + inputDevice = new sdrplayHandler (dabSettings); + showButtons (); + spectrumHandler -> setBitDepth (inputDevice -> bitDepth ()); + return inputDevice; + } catch (int e) {} +#endif +#ifdef HAVE_RTLSDR + try { + inputDevice = new rtlsdrHandler (dabSettings); + showButtons (); + spectrumHandler -> setBitDepth (inputDevice -> bitDepth ()); + return inputDevice; + } catch (int e) {} +#endif + if (rawFile_flag) { + file = QFileDialog::getOpenFileName (this, + tr ("Open file ..."), + QDir::homePath (), + tr ("raw data (*.iq)")); + file = QDir::toNativeSeparators (file); + try { + inputDevice = new rawFiles (file); + hideButtons (); + } catch (int e) { + QMessageBox::warning (this, tr ("Warning"), + tr ("file not found")); + return NULL; + } + } + else { // apparently ".sdr" files + file = QFileDialog::getOpenFileName (this, + tr ("Open file ..."), + QDir::homePath (), + tr ("raw data (*.sdr)")); + file = QDir::toNativeSeparators (file); + try { + inputDevice = new wavFiles (file); + hideButtons (); + } catch (int e) { + QMessageBox::warning (this, tr ("Warning"), + tr ("file not found")); + return NULL; + } + } + + spectrumHandler -> setBitDepth (inputDevice -> bitDepth ()); + return inputDevice; +} + +// Selecting a service is easy, the fib is asked to +// hand over the relevant data in two steps +void RadioInterface::selectService (QModelIndex s) { +QString currentProgram = ensemble. data (s, Qt::DisplayRole). toString (); + if (services. size () == 0) { // apparently a channel selected + selectService (currentProgram); + return; + } + if (scanning) // be polite, wait until we finished scanning + return; +// +// The complex part is if/when we have to select the channel where the +// service is to be found. + for (int i = 1; i < services. size (); i ++) { + if (services [i] -> name == currentProgram) { + QString channel = services [i] -> channel; + if (channel == channelSelector -> currentText ()) { + selectService (currentProgram); + return; + } + delete services [0]; + services [0] = new serviceDescriptor (currentProgram, + services [i] -> channel); + disconnect (channelSelector, + SIGNAL (activated (const QString &)), + this, SLOT (selectChannel (const QString &))); + int k = channelSelector -> findText (services [i] -> channel); + channelSelector -> setCurrentIndex (k); + int tunedFrequency = + theBand. Frequency (dabBand, services [i] -> channel); + inputDevice -> setVFOFrequency (tunedFrequency); + my_dabProcessor -> reset (); + connect (channelSelector, + SIGNAL (activated (const QString &)), + this, SLOT (selectChannel (const QString &))); + connect (&channelTimer, SIGNAL (timeout (void)), + this, SLOT (channelTimer_timeout (void))); + channelTimer. start (1000); + return; + } + } + fprintf (stderr, "big failure\n"); +} + +void RadioInterface::channelTimer_timeout (void) { +// so, we were looking for a channel. Let us see if +// it has provide dus with data +QString currentProgram = services [0] -> name; + + if (my_dabProcessor -> kindofService (currentProgram) != + AUDIO_SERVICE) + return; + selectService (currentProgram); +} + +// Might be called from the GUI as well as from an internal call +void RadioInterface::selectService (QString s) { + if ((my_dabProcessor -> kindofService (s) != AUDIO_SERVICE) && + (my_dabProcessor -> kindofService (s) != PACKET_SERVICE)) + return; + + my_dabProcessor -> reset_msc (); + currentName = s; + setStereo (false); +// soundOut -> stop (); + + dataDisplay -> hide (); + techData. rsError_display -> hide (); + techData. aacError_display -> hide (); + techData. motAvailable -> + setStyleSheet ("QLabel {background-color : red}"); + + int k = my_dabProcessor -> kindofService (s); + + switch (k) { + case AUDIO_SERVICE: + { audiodata d; + my_dabProcessor -> dataforAudioService (s, &d); + if (!d. defined) { + QMessageBox::warning (this, tr ("Warning"), + tr ("unknown bitrate for this program\n")); + return; + } + + show_techData (ensembleLabel, s, + (int32_t)(inputDevice -> getVFOFrequency () / 1000000.0), + &d); + + my_dabProcessor -> set_audioChannel (&d, audioBuffer); + for (int i = 1; i < 10; i ++) { + packetdata pd; + my_dabProcessor -> dataforDataService (s, &pd, i); + if (pd. defined) { + my_dabProcessor -> set_dataChannel (&pd, dataBuffer); + break; + } + } + + soundOut -> restart (); + showLabel (QString (" ")); + break; + } + + case PACKET_SERVICE: + { packetdata pd; + my_dabProcessor -> dataforDataService (s, &pd); + if ((!pd. defined) || + (pd. DSCTy == 0) || (pd. bitRate == 0)) { + fprintf (stderr, "d. DSCTy = %d, d. bitRate = %d\n", + pd. DSCTy, pd. bitRate); + QMessageBox::warning (this, tr ("sdr"), + tr ("still insufficient data for this service\n")); + + return; + } + my_dabProcessor -> set_dataChannel (&pd, dataBuffer); + switch (pd. DSCTy) { + default: + showLabel (QString ("unimplemented Data")); + break; + case 60: + showLabel (QString ("MOT partially implemented")); + break; + } + break; + } + + default: + QMessageBox::warning (this, tr ("Warning"), + tr ("unknown service\n")); + return; + } + + if (pictureLabel != NULL) + delete pictureLabel; + pictureLabel = NULL; +} +// + +void RadioInterface::showSpectrum (int32_t amount) { + if (spectrumHandler != NULL ) + spectrumHandler -> showSpectrum (amount, + inputDevice -> getVFOFrequency ()); +} + +void RadioInterface:: set_streamSelector (int k) { + ((audioSink *)(soundOut)) -> selectDevice (k); +} + +void RadioInterface::toggle_show_data (void) { + show_data = !show_data; + if (show_data) + dataDisplay -> show (); + else + dataDisplay -> hide (); +} + +void RadioInterface::showButtons (void) { + scanButton -> show (); + channelSelector -> show (); + techData. frequency -> show (); + +} + +void RadioInterface::hideButtons (void) { + scanButton -> hide (); + channelSelector -> hide (); + techData. frequency -> hide (); +} + +void RadioInterface::setSyncLost (void) { +} + +void RadioInterface::set_picturePath (void) { +QString defaultPath = QDir::tempPath (); + + if (defaultPath. endsWith ("/")) + defaultPath. append ("qt-pictures/"); + else + defaultPath. append ("/qt-pictures/"); + + picturesPath = + dabSettings -> value ("pictures", defaultPath). toString (); + + if ((picturesPath != "") && (!picturesPath. endsWith ("/"))) + picturesPath. append ("/"); + QDir testdir (picturesPath); + + if (!testdir. exists ()) + testdir. mkdir (picturesPath); +} + +void RadioInterface::show_techData (QString ensembleLabel, + QString serviceName, + int32_t Frequency, + audiodata *d) { + techData. ensemble -> setText (ensembleLabel); + techData. programName -> setText (serviceName); + techData. frequency -> display (Frequency); + techData. bitrateDisplay -> display (d -> bitRate); + techData. startAddressDisplay -> display (d -> startAddr); + techData. lengthDisplay -> display (d -> length); + techData. subChIdDisplay -> display (d -> subchId); + uint16_t h = d -> protLevel; + QString protL; + if (!d -> shortForm) { + protL = "EEP "; + protL. append (QString::number ((h & 03) + 1)); + if ((h & (1 << 2)) == 0) + protL. append ("-A"); + else + protL. append ("-B"); + } + else { + protL = "UEP "; + protL. append (QString::number (h)); + } + techData. uepField -> setText (protL); + techData. ASCTy -> setText (d -> ASCTy == 077 ? "DAB+" : "DAB"); + if (d -> ASCTy == 077) { + techData. rsError_display -> show (); + techData. aacError_display -> show (); + } + techData. language -> + setText (the_textMapper. + get_programm_language_string (d -> language)); + techData. programType -> + setText (the_textMapper. + get_programm_type_string (d -> programType)); + if (show_data) + dataDisplay -> show (); +} + +#include +void RadioInterface::closeEvent (QCloseEvent *event) { + + QMessageBox::StandardButton resultButton = + QMessageBox::question (this, "dabRadio", + tr("Are you sure?\n"), + QMessageBox::No | QMessageBox::Yes, + QMessageBox::Yes); + if (resultButton != QMessageBox::Yes) { + event -> ignore(); + } else { + TerminateProcess (); + event -> accept (); + } +} + diff --git a/radio.h b/radio.h new file mode 100644 index 0000000..c8714b5 --- /dev/null +++ b/radio.h @@ -0,0 +1,197 @@ +# +/* + * Copyright (C) 2013, 2014, 2015, 2016, 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the dab3 (formerly SDR-J, JSDR). + * + * dab3 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; either version 2 of the License, or + * (at your option) any later version. + * + * dab3 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with dab3; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Main program + */ + +#ifndef __RADIO_DAB3__ +#define __RADIO_DAB3__ + +#include "dab-constants.h" +#include +#include +#include +#include +#include +#include +#include +#include "ui_dabradio.h" +#include "dab-processor.h" +#include "ringbuffer.h" +#include "band-handler.h" +#include "text-mapper.h" +class QSettings; +class virtualInput; +class audioBase; +class common_fft; + +#include "ui_technical_data.h" + +class spectrumhandler; + +/* + * GThe main gui object. It inherits from + * QDialog and the generated form + */ + +class serviceDescriptor { +public: +QString name; +QString channel; +int32_t serviceId; +uint8_t shortForm; +uint8_t protLevel; +int32_t bitRate; +int32_t startAddr; +int32_t length; + + serviceDescriptor (QString name, QString channel, audiodata *d) { + this -> name = name; + this -> channel = channel; + this -> serviceId = d -> serviceId; + this -> shortForm = d -> shortForm; + this -> protLevel = d -> protLevel; + this -> bitRate = d -> bitRate; + this -> startAddr = d -> startAddr; + this -> length = d -> length; + } + serviceDescriptor (QString name, QString channel) { + this -> name = name; + this -> channel = channel; + this -> serviceId = 0; + this -> shortForm = 0; + this -> protLevel = 0; + this -> bitRate = 0; + this -> startAddr = 0; + this -> length = 0; + } + ~serviceDescriptor (void) {} +}; + + +class RadioInterface: public QMainWindow, + private Ui_dabradio { +Q_OBJECT +public: + RadioInterface (QSettings *, + bool , + QWidget *parent = NULL); + ~RadioInterface (void); + +private: + QSettings *dabSettings; + QString deviceName; + Ui_technical_data techData; +private: + void clear_showElements (void); + void set_picturePath (void); + void Increment_Channel (void); + void hideButtons (void); + void showButtons (void); + virtualInput *setDevice (QString); + void doStart (void); + void dumpControlState (void); + bool rawFile_flag; + std::vector services; + uint8_t dabBand; + uint8_t dabMode; + bool thereisSound; + uint8_t isSynced; + int16_t threshold; + int16_t diff_length; + bandHandler theBand; + std::atomic running; + bool scanning; + virtualInput *inputDevice; + textMapper the_textMapper; + dabProcessor *my_dabProcessor; + audioBase *soundOut; + RingBuffer *audioBuffer; + RingBuffer *dataBuffer; + bool autoCorrector; + QLabel *pictureLabel; + bool saveSlides; + bool showSlides; + QFrame *dataDisplay; + bool show_data; + + QStringList soundChannels; + QStringListModel ensemble; + QStringList Services; + QString ensembleLabel; + QTimer displayTimer; + QTimer signalTimer; + QTimer channelTimer; + QString currentName; + bool has_presetName; + int32_t numberofSeconds; + int16_t ficBlocks; + int16_t ficSuccess; + spectrumhandler *spectrumHandler; + RingBuffer> *spectrumBuffer; + + QString picturesPath; +public slots: + void set_Scanning (void); + void set_CorrectorDisplay (int); + void clearEnsemble (void); + void addtoEnsemble (const QString &); + void nameofEnsemble (int, const QString &); + void show_frameErrors (int); + void show_rsErrors (int); + void show_aacErrors (int); + void show_ficSuccess (bool); + void show_snr (int); + void setSynced (char); + void showLabel (QString); + void showMOT (QByteArray, int, QString); + void changeinConfiguration (void); + void newAudio (int, int); +// + void show_techData (QString, + QString, + int32_t, + audiodata *); + + void setStereo (bool); + void set_streamSelector (int); + void No_Signal_Found (void); + void show_motHandling (bool); + void setSyncLost (void); + void showSpectrum (int); + void closeEvent (QCloseEvent *event); + +// Somehow, these must be connected to the GUI +private slots: + void toggle_show_data (void); + void TerminateProcess (void); + void selectChannel (QString); + void updateTimeDisplay (void); + void signalTimer_out (void); + void autoCorrector_on (void); + + void channelTimer_timeout (void); + void selectService (QModelIndex); + void selectService (QString); +}; +#endif + diff --git a/resources.qrc b/resources.qrc new file mode 100644 index 0000000..abd6ce9 --- /dev/null +++ b/resources.qrc @@ -0,0 +1,10 @@ + + + i18n/de_DE.qm + i18n/it_IT.qm + i18n/hu_HU.qm + dabradio.ico + AUTHORS + COPYING + + diff --git a/screenshot_dabradio.png b/screenshot_dabradio.png new file mode 100644 index 0000000..2ebdd22 Binary files /dev/null and b/screenshot_dabradio.png differ diff --git a/src/backend/audio-backend.cpp b/src/backend/audio-backend.cpp new file mode 100644 index 0000000..82323ba --- /dev/null +++ b/src/backend/audio-backend.cpp @@ -0,0 +1,198 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#include "dab-constants.h" +#include "audio-backend.h" +#include "mp2processor.h" +#include "mp4processor.h" +#include "eep-protection.h" +#include "uep-protection.h" +#include "radio.h" +// +// Interleaving is - for reasons of simplicity - done +// inline rather than through a special class-object +// +// fragmentsize == Length * CUSize + audioBackend::audioBackend (RadioInterface *mr, + audiodata *d, + RingBuffer *buffer, + QString picturesPath): + virtualBackend (d -> startAddr, + d -> length), + outV (d -> bitRate * 24) +#ifdef __THREADED_BACKEND + ,freeSlots (20) +#endif + { +int32_t i, j; + this -> myRadioInterface = mr; + this -> dabModus = d -> ASCTy == 077 ? DAB_PLUS : DAB; + this -> fragmentSize = d -> length * CUSize; + this -> bitRate = d -> bitRate; + this -> shortForm = d -> shortForm; + this -> protLevel = d -> protLevel; + + this -> audioBuffer = buffer; + + interleaveData = new int16_t *[16]; // max size + for (i = 0; i < 16; i ++) { + interleaveData [i] = new int16_t [fragmentSize]; + memset (interleaveData [i], 0, fragmentSize * sizeof (int16_t)); + } + + countforInterleaver = 0; + interleaverIndex = 0; + + if (shortForm) + protectionHandler = new uep_protection (bitRate, + protLevel); + else + protectionHandler = new eep_protection (bitRate, + protLevel); +// + if (dabModus == DAB) + our_dabProcessor = new mp2Processor (myRadioInterface, + bitRate, + audioBuffer, + picturesPath); + else + if (dabModus == DAB_PLUS) + our_dabProcessor = new mp4Processor (myRadioInterface, + bitRate, + audioBuffer, + picturesPath); + else // cannot happen + our_dabProcessor = new frameProcessor (); + + fprintf (stderr, "we now have %s\n", dabModus == DAB_PLUS ? "DAB+" : "DAB"); + tempX. resize (fragmentSize); + + uint8_t shiftRegister [9]; + disperseVector. resize (24 * bitRate); + memset (shiftRegister, 1, 9); + for (i = 0; i < bitRate * 24; i ++) { + uint8_t b = shiftRegister [8] ^ shiftRegister [4]; + for (j = 8; j > 0; j--) + shiftRegister [j] = shiftRegister [j - 1]; + shiftRegister [0] = b; + disperseVector [i] = b; + } +#ifdef __THREADED_BACKEND +// for local buffering the input, we have + nextIn = 0; + nextOut = 0; + for (i = 0; i < 20; i ++) + theData [i] = new int16_t [fragmentSize]; + running. store (true); + start (); +#endif +} + + audioBackend::~audioBackend (void) { +int16_t i; +#ifdef __THREADED_BACKEND + running. store (false); + while (this -> isRunning ()) + usleep (1); +#endif + delete protectionHandler; + delete our_dabProcessor; + for (i = 0; i < 16; i ++) + delete[] interleaveData [i]; + delete [] interleaveData; +#ifdef __THREADED_BACKEND + for (i = 0; i < 20; i ++) + delete [] theData [i]; +#endif +} + +int32_t audioBackend::process (int16_t *v, int16_t cnt) { + +#ifdef __THREADED_BACKEND + while (!freeSlots. tryAcquire (1, 200)) + if (!running) + return 0; + memcpy (theData [nextIn], v, fragmentSize * sizeof (int16_t)); + nextIn = (nextIn + 1) % 20; + usedSlots. release (); +#else + processSegment (v); +#endif + return 1; +} + + +const int16_t interleaveMap [] = {0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15}; +void audioBackend::processSegment (int16_t *Data) { +int16_t i, j; + + for (i = 0; i < fragmentSize; i ++) { + tempX [i] = interleaveData [(interleaverIndex + + interleaveMap [i & 017]) & 017][i]; + interleaveData [interleaverIndex][i] = Data [i]; + } + + interleaverIndex = (interleaverIndex + 1) & 0x0F; +#ifdef __THREADED_BACKEND + nextOut = (nextOut + 1) % 20; + freeSlots. release (); +#endif + +// only continue when de-interleaver is filled + if (countforInterleaver <= 15) { + countforInterleaver ++; + return; + } + + protectionHandler -> deconvolve (tempX. data (), + fragmentSize, + outV. data ()); +// +// and the energy dispersal + for (i = 0; i < bitRate * 24; i ++) + outV [i] ^= disperseVector [i]; + + our_dabProcessor -> addtoFrame (outV); +} + +#ifdef __THREADED_BACKEND +void audioBackend::run (void) { + + while (running. load ()) { + while (!usedSlots. tryAcquire (1, 200)) + if (!running) + return; + processSegment (theData [nextOut]); + } +} +#endif + +// It might take a msec for the task to stop +void audioBackend::stopRunning (void) { +#ifdef __THREADED_BACKEND + running = false; + while (this -> isRunning ()) + usleep (1); +// myAudioSink -> stop (); +#endif +} + diff --git a/src/backend/audio/faad-decoder.cpp b/src/backend/audio/faad-decoder.cpp new file mode 100644 index 0000000..05c0f68 --- /dev/null +++ b/src/backend/audio/faad-decoder.cpp @@ -0,0 +1,173 @@ +# +/* + * Copyright (C) 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +#include "faad-decoder.h" +#include "neaacdec.h" +#include "radio.h" + + faadDecoder::faadDecoder (RadioInterface *mr, + RingBuffer *buffer) { + this -> audioBuffer = buffer; + aacCap = NeAACDecGetCapabilities (); + aacHandle = NeAACDecOpen (); + aacConf = NeAACDecGetCurrentConfiguration (aacHandle); + aacInitialized = false; + baudRate = 48000; + connect (this, SIGNAL (newAudio (int, int)), + mr, SLOT (newAudio (int, int))); +} + + faadDecoder::~faadDecoder (void) { + NeAACDecClose (aacHandle); +} + +int get_aac_channel_configuration (int16_t m_mpeg_surround_config, + uint8_t aacChannelMode) { + + switch(m_mpeg_surround_config) { + case 0: // no surround + return aacChannelMode ? 2 : 1; + case 1: // 5.1 + return 6; + case 2: // 7.1 + return 7; + default: + return -1; + } +} + +bool faadDecoder::initialize (uint8_t dacRate, + uint8_t sbrFlag, + int16_t mpegSurround, + uint8_t aacChannelMode) { +long unsigned int sample_rate; +uint8_t channels; +/* AudioSpecificConfig structure (the only way to select 960 transform here!) + * + * 00010 = AudioObjectType 2 (AAC LC) + * xxxx = (core) sample rate index + * xxxx = (core) channel config + * 100 = GASpecificConfig with 960 transform + * + * SBR: implicit signaling sufficient - libfaad2 + * automatically assumes SBR on sample rates <= 24 kHz + * => explicit signaling works, too, but is not necessary here + * + * PS: implicit signaling sufficient - libfaad2 + * therefore always uses stereo output (if PS support was enabled) + * => explicit signaling not possible, as libfaad2 does not + * support AudioObjectType 29 (PS) + */ + + int core_sr_index = + dacRate ? (sbrFlag ? 6 : 3) : + (sbrFlag ? 8 : 5); // 24/48/16/32 kHz + int core_ch_config = get_aac_channel_configuration (mpegSurround, + aacChannelMode); + if (core_ch_config == -1) { + printf ("Unrecognized mpeg surround config (ignored): %d\n", + mpegSurround); + return false; + } + + uint8_t asc[2]; + asc[0] = 0b00010 << 3 | core_sr_index >> 1; + asc[1] = (core_sr_index & 0x01) << 7 | core_ch_config << 3 | 0b100; + long int init_result = NeAACDecInit2 (aacHandle, + asc, + sizeof (asc), + &sample_rate, + &channels); + if (init_result != 0) { +/* If some error initializing occured, skip the file */ + printf ("Error initializing decoder library: %s\n", + NeAACDecGetErrorMessage (-init_result)); + NeAACDecClose (aacHandle); + return false; + } + return true; +} + +int16_t faadDecoder::MP42PCM (uint8_t dacRate, + uint8_t sbrFlag, + int16_t mpegSurround, + uint8_t aacChannelMode, + uint8_t buffer [], + int16_t bufferLength) { +int16_t samples; +long unsigned int sampleRate; +int16_t *outBuffer; +NeAACDecFrameInfo hInfo; +uint8_t channels; + + if (!aacInitialized) { + if (!initialize (dacRate, sbrFlag, mpegSurround, aacChannelMode)) + return 0; + aacInitialized = true; + } + + outBuffer = (int16_t *)NeAACDecDecode (aacHandle, + &hInfo, buffer, bufferLength); + sampleRate = hInfo. samplerate; + + samples = hInfo. samples; + if ((sampleRate == 24000) || + (sampleRate == 32000) || + (sampleRate == 48000) || + (sampleRate != (long unsigned)baudRate)) + baudRate = sampleRate; + +// fprintf (stderr, "bytes consumed %d\n", (int)(hInfo. bytesconsumed)); +// fprintf (stderr, "samplerate = %d, samples = %d, channels = %d, error = %d, sbr = %d\n", sampleRate, samples, +// hInfo. channels, +// hInfo. error, +// hInfo. sbr); +// fprintf (stderr, "header = %d\n", hInfo. header_type); + channels = hInfo. channels; + if (hInfo. error != 0) { + fprintf (stderr, "Warning: %s\n", + faacDecGetErrorMessage (hInfo. error)); + return 0; + } + + if (channels == 2) { + audioBuffer -> putDataIntoBuffer (outBuffer, samples); + if (audioBuffer -> GetRingBufferReadAvailable () > sampleRate / 8) + newAudio (samples, sampleRate); + } + else + if (channels == 1) { + int16_t *buffer = (int16_t *)alloca (2 * samples); + int16_t i; + for (i = 0; i < samples; i ++) { + buffer [2 * i] = ((int16_t *)outBuffer) [i]; + buffer [2 * i + 1] = buffer [2 * i]; + } + audioBuffer -> putDataIntoBuffer (buffer, samples); + if (audioBuffer -> GetRingBufferReadAvailable () > sampleRate / 8) + newAudio (samples, sampleRate); + } + else + fprintf (stderr, "Cannot handle these channels\n"); + + return samples; +} + diff --git a/src/backend/audio/mp2processor.cpp b/src/backend/audio/mp2processor.cpp new file mode 100644 index 0000000..bbede9c --- /dev/null +++ b/src/backend/audio/mp2processor.cpp @@ -0,0 +1,656 @@ +/****************************************************************************** +** kjmp2 -- a minimal MPEG-1/2 Audio Layer II decoder library ** +** version 1.1 ** +******************************************************************************* +** Copyright (C) 2006-2013 Martin J. Fiedler ** +** ** +** This software is provided 'as-is', without any express or implied ** +** warranty. In no event will the authors be held liable for any damages ** +** arising from the use of this software. ** +** ** +** Permission is granted to anyone to use this software for any purpose, ** +** including commercial applications, and to alter it and redistribute it ** +** freely, subject to the following restrictions: ** +** 1. The origin of this software must not be misrepresented; you must not ** +** claim that you wrote the original software. If you use this software ** +** in a product, an acknowledgment in the product documentation would ** +** be appreciated but is not required. ** +** 2. Altered source versions must be plainly marked as such, and must not ** +** be misrepresented as being the original software. ** +** 3. This notice may not be removed or altered from any source ** +** distribution. ** +******************************************************************************/ + +// +// Code adapted of the original code: +// - it is made into a class for use within the framework +// of the sdr-j DAB/DAB+ software +// +#include "mp2processor.h" +#include "radio.h" +#include "pad-handler.h" + +#ifdef _MSC_VER + #define FASTCALL __fastcall +#else + #define FASTCALL +#endif + +//////////////////////////////////////////////////////////////////////////////// +// TABLES AND CONSTANTS // +//////////////////////////////////////////////////////////////////////////////// + +// mode constants +#define STEREO 0 +#define JOINT_STEREO 1 +#define DUAL_CHANNEL 2 +#define MONO 3 + +// sample rate table +static +const unsigned short sample_rates[8] = { + 44100, 48000, 32000, 0, // MPEG-1 + 22050, 24000, 16000, 0 // MPEG-2 +}; + +// bitrate table +static +const short bitrates[28] = { + 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, // MPEG-1 + 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160 // MPEG-2 +}; + +// scale factor base values (24-bit fixed-point) +static +const int scf_base [3] = {0x02000000, 0x01965FEA, 0x01428A30}; + +// synthesis window +static +const int D[512] = { + 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,-0x00001, + -0x00001,-0x00001,-0x00001,-0x00002,-0x00002,-0x00003,-0x00003,-0x00004, + -0x00004,-0x00005,-0x00006,-0x00006,-0x00007,-0x00008,-0x00009,-0x0000A, + -0x0000C,-0x0000D,-0x0000F,-0x00010,-0x00012,-0x00014,-0x00017,-0x00019, + -0x0001C,-0x0001E,-0x00022,-0x00025,-0x00028,-0x0002C,-0x00030,-0x00034, + -0x00039,-0x0003E,-0x00043,-0x00048,-0x0004E,-0x00054,-0x0005A,-0x00060, + -0x00067,-0x0006E,-0x00074,-0x0007C,-0x00083,-0x0008A,-0x00092,-0x00099, + -0x000A0,-0x000A8,-0x000AF,-0x000B6,-0x000BD,-0x000C3,-0x000C9,-0x000CF, + 0x000D5, 0x000DA, 0x000DE, 0x000E1, 0x000E3, 0x000E4, 0x000E4, 0x000E3, + 0x000E0, 0x000DD, 0x000D7, 0x000D0, 0x000C8, 0x000BD, 0x000B1, 0x000A3, + 0x00092, 0x0007F, 0x0006A, 0x00053, 0x00039, 0x0001D,-0x00001,-0x00023, + -0x00047,-0x0006E,-0x00098,-0x000C4,-0x000F3,-0x00125,-0x0015A,-0x00190, + -0x001CA,-0x00206,-0x00244,-0x00284,-0x002C6,-0x0030A,-0x0034F,-0x00396, + -0x003DE,-0x00427,-0x00470,-0x004B9,-0x00502,-0x0054B,-0x00593,-0x005D9, + -0x0061E,-0x00661,-0x006A1,-0x006DE,-0x00718,-0x0074D,-0x0077E,-0x007A9, + -0x007D0,-0x007EF,-0x00808,-0x0081A,-0x00824,-0x00826,-0x0081F,-0x0080E, + 0x007F5, 0x007D0, 0x007A0, 0x00765, 0x0071E, 0x006CB, 0x0066C, 0x005FF, + 0x00586, 0x00500, 0x0046B, 0x003CA, 0x0031A, 0x0025D, 0x00192, 0x000B9, + -0x0002C,-0x0011F,-0x00220,-0x0032D,-0x00446,-0x0056B,-0x0069B,-0x007D5, + -0x00919,-0x00A66,-0x00BBB,-0x00D16,-0x00E78,-0x00FDE,-0x01148,-0x012B3, + -0x01420,-0x0158C,-0x016F6,-0x0185C,-0x019BC,-0x01B16,-0x01C66,-0x01DAC, + -0x01EE5,-0x02010,-0x0212A,-0x02232,-0x02325,-0x02402,-0x024C7,-0x02570, + -0x025FE,-0x0266D,-0x026BB,-0x026E6,-0x026ED,-0x026CE,-0x02686,-0x02615, + -0x02577,-0x024AC,-0x023B2,-0x02287,-0x0212B,-0x01F9B,-0x01DD7,-0x01BDD, + 0x019AE, 0x01747, 0x014A8, 0x011D1, 0x00EC0, 0x00B77, 0x007F5, 0x0043A, + 0x00046,-0x003E5,-0x00849,-0x00CE3,-0x011B4,-0x016B9,-0x01BF1,-0x0215B, + -0x026F6,-0x02CBE,-0x032B3,-0x038D3,-0x03F1A,-0x04586,-0x04C15,-0x052C4, + -0x05990,-0x06075,-0x06771,-0x06E80,-0x0759F,-0x07CCA,-0x083FE,-0x08B37, + -0x09270,-0x099A7,-0x0A0D7,-0x0A7FD,-0x0AF14,-0x0B618,-0x0BD05,-0x0C3D8, + -0x0CA8C,-0x0D11D,-0x0D789,-0x0DDC9,-0x0E3DC,-0x0E9BD,-0x0EF68,-0x0F4DB, + -0x0FA12,-0x0FF09,-0x103BD,-0x1082C,-0x10C53,-0x1102E,-0x113BD,-0x116FB, + -0x119E8,-0x11C82,-0x11EC6,-0x120B3,-0x12248,-0x12385,-0x12467,-0x124EF, + 0x1251E, 0x124F0, 0x12468, 0x12386, 0x12249, 0x120B4, 0x11EC7, 0x11C83, + 0x119E9, 0x116FC, 0x113BE, 0x1102F, 0x10C54, 0x1082D, 0x103BE, 0x0FF0A, + 0x0FA13, 0x0F4DC, 0x0EF69, 0x0E9BE, 0x0E3DD, 0x0DDCA, 0x0D78A, 0x0D11E, + 0x0CA8D, 0x0C3D9, 0x0BD06, 0x0B619, 0x0AF15, 0x0A7FE, 0x0A0D8, 0x099A8, + 0x09271, 0x08B38, 0x083FF, 0x07CCB, 0x075A0, 0x06E81, 0x06772, 0x06076, + 0x05991, 0x052C5, 0x04C16, 0x04587, 0x03F1B, 0x038D4, 0x032B4, 0x02CBF, + 0x026F7, 0x0215C, 0x01BF2, 0x016BA, 0x011B5, 0x00CE4, 0x0084A, 0x003E6, + -0x00045,-0x00439,-0x007F4,-0x00B76,-0x00EBF,-0x011D0,-0x014A7,-0x01746, + 0x019AE, 0x01BDE, 0x01DD8, 0x01F9C, 0x0212C, 0x02288, 0x023B3, 0x024AD, + 0x02578, 0x02616, 0x02687, 0x026CF, 0x026EE, 0x026E7, 0x026BC, 0x0266E, + 0x025FF, 0x02571, 0x024C8, 0x02403, 0x02326, 0x02233, 0x0212B, 0x02011, + 0x01EE6, 0x01DAD, 0x01C67, 0x01B17, 0x019BD, 0x0185D, 0x016F7, 0x0158D, + 0x01421, 0x012B4, 0x01149, 0x00FDF, 0x00E79, 0x00D17, 0x00BBC, 0x00A67, + 0x0091A, 0x007D6, 0x0069C, 0x0056C, 0x00447, 0x0032E, 0x00221, 0x00120, + 0x0002D,-0x000B8,-0x00191,-0x0025C,-0x00319,-0x003C9,-0x0046A,-0x004FF, + -0x00585,-0x005FE,-0x0066B,-0x006CA,-0x0071D,-0x00764,-0x0079F,-0x007CF, + 0x007F5, 0x0080F, 0x00820, 0x00827, 0x00825, 0x0081B, 0x00809, 0x007F0, + 0x007D1, 0x007AA, 0x0077F, 0x0074E, 0x00719, 0x006DF, 0x006A2, 0x00662, + 0x0061F, 0x005DA, 0x00594, 0x0054C, 0x00503, 0x004BA, 0x00471, 0x00428, + 0x003DF, 0x00397, 0x00350, 0x0030B, 0x002C7, 0x00285, 0x00245, 0x00207, + 0x001CB, 0x00191, 0x0015B, 0x00126, 0x000F4, 0x000C5, 0x00099, 0x0006F, + 0x00048, 0x00024, 0x00002,-0x0001C,-0x00038,-0x00052,-0x00069,-0x0007E, + -0x00091,-0x000A2,-0x000B0,-0x000BC,-0x000C7,-0x000CF,-0x000D6,-0x000DC, + -0x000DF,-0x000E2,-0x000E3,-0x000E3,-0x000E2,-0x000E0,-0x000DD,-0x000D9, + 0x000D5, 0x000D0, 0x000CA, 0x000C4, 0x000BE, 0x000B7, 0x000B0, 0x000A9, + 0x000A1, 0x0009A, 0x00093, 0x0008B, 0x00084, 0x0007D, 0x00075, 0x0006F, + 0x00068, 0x00061, 0x0005B, 0x00055, 0x0004F, 0x00049, 0x00044, 0x0003F, + 0x0003A, 0x00035, 0x00031, 0x0002D, 0x00029, 0x00026, 0x00023, 0x0001F, + 0x0001D, 0x0001A, 0x00018, 0x00015, 0x00013, 0x00011, 0x00010, 0x0000E, + 0x0000D, 0x0000B, 0x0000A, 0x00009, 0x00008, 0x00007, 0x00007, 0x00006, + 0x00005, 0x00005, 0x00004, 0x00004, 0x00003, 0x00003, 0x00002, 0x00002, + 0x00002, 0x00002, 0x00001, 0x00001, 0x00001, 0x00001, 0x00001, 0x00001 +}; + + +///////////// Table 3-B.2: Possible quantization per subband /////////////////// + +// quantizer lookup, step 1: bitrate classes +static uint8_t quant_lut_step1[2][16] = { + // 32, 48, 56, 64, 80, 96,112,128,160,192,224,256,320,384 <- bitrate + { 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, // mono + // 16, 24, 28, 32, 40, 48, 56, 64, 80, 96,112,128,160,192 <- BR / chan + { 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2 } // stereo +}; + +// quantizer lookup, step 2: bitrate class, sample rate -> B2 table idx, sblimit +#define QUANT_TAB_A (27 | 64) // Table 3-B.2a: high-rate, sblimit = 27 +#define QUANT_TAB_B (30 | 64) // Table 3-B.2b: high-rate, sblimit = 30 +#define QUANT_TAB_C 8 // Table 3-B.2c: low-rate, sblimit = 8 +#define QUANT_TAB_D 12 // Table 3-B.2d: low-rate, sblimit = 12 + +static +const char quant_lut_step2 [3][4] = { + // 44.1 kHz, 48 kHz, 32 kHz + { QUANT_TAB_C, QUANT_TAB_C, QUANT_TAB_D }, // 32 - 48 kbit/sec/ch + { QUANT_TAB_A, QUANT_TAB_A, QUANT_TAB_A }, // 56 - 80 kbit/sec/ch + { QUANT_TAB_B, QUANT_TAB_A, QUANT_TAB_B }, // 96+ kbit/sec/ch +}; + +// quantizer lookup, step 3: B2 table, subband -> nbal, row index +// (upper 4 bits: nbal, lower 4 bits: row index) +static +uint8_t quant_lut_step3 [3][32] = { + // low-rate table (3-B.2c and 3-B.2d) + { 0x44,0x44, // SB 0 - 1 + 0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34 // SB 2 - 12 + }, + // high-rate table (3-B.2a and 3-B.2b) + { 0x43,0x43,0x43, // SB 0 - 2 + 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, // SB 3 - 10 + 0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31, // SB 11 - 22 + 0x20,0x20,0x20,0x20,0x20,0x20,0x20 // SB 23 - 29 + }, + // MPEG-2 LSR table (B.2 in ISO 13818-3) + { 0x45,0x45,0x45,0x45, // SB 0 - 3 + 0x34,0x34,0x34,0x34,0x34,0x34,0x34, // SB 4 - 10 + 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24, // SB 11 - + 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24 // - 29 + } +}; + +// quantizer lookup, step 4: table row, allocation[] value -> quant table index +static +const char quant_lut_step4 [6][16] = { + { 0, 1, 2, 17 }, + { 0, 1, 2, 3, 4, 5, 6, 17 }, + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17 }, + { 0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 }, + { 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17 }, + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } +}; + +// quantizer table +static +struct quantizer_spec quantizer_table [17] = { + { 3, 1, 5 }, // 1 + { 5, 1, 7 }, // 2 + { 7, 0, 3 }, // 3 + { 9, 1, 10 }, // 4 + { 15, 0, 4 }, // 5 + { 31, 0, 5 }, // 6 + { 63, 0, 6 }, // 7 + { 127, 0, 7 }, // 8 + { 255, 0, 8 }, // 9 + { 511, 0, 9 }, // 10 + { 1023, 0, 10 }, // 11 + { 2047, 0, 11 }, // 12 + { 4095, 0, 12 }, // 13 + { 8191, 0, 13 }, // 14 + { 16383, 0, 14 }, // 15 + { 32767, 0, 15 }, // 16 + { 65535, 0, 16 } // 17 +}; + + +//////////////////////////////////////////////////////////////////////////////// +// The initialization is now done in the constructor +// (J van Katwijk) +//////////////////////////////////////////////////////////////////////////////// + + mp2Processor::mp2Processor (RadioInterface *mr, + int16_t bitRate, + RingBuffer *buffer, + QString picturesPath): + my_padhandler (mr, picturesPath) { +int16_t i, j; +int16_t *nPtr = &N [0][0]; + + // compute N[i][j] + for (i = 0; i < 64; i ++) + for (j = 0; j < 32; ++j) + *nPtr++ = (int16_t) (256.0 * + cos(((16 + i) * ((j << 1) + 1)) * + 0.0490873852123405)); + + // perform local initialization: + for (i = 0; i < 2; ++i) + for (j = 1023; j >= 0; j--) + V [i][j] = 0; + + myRadioInterface = mr; + this -> buffer = buffer; + this -> bitRate = bitRate; + connect (this, SIGNAL (show_frameErrors (int)), + mr, SLOT (show_frameErrors (int))); + connect (this, SIGNAL (newAudio (int, int)), + mr, SLOT (newAudio (int, int))); + connect (this, SIGNAL (isStereo (bool)), + mr, SLOT (setStereo (bool))); + + Voffs = 0; + baudRate = 48000; // default for DAB + MP2framesize = 24 * bitRate; // may be changed + MP2frame = new uint8_t [2 * MP2framesize]; + MP2Header_OK = 0; + MP2headerCount = 0; + MP2bitCount = 0; + numberofFrames = 0; + errorFrames = 0; +} + + mp2Processor::~mp2Processor (void) { + delete[] MP2frame; +} +// + +#define valid(x) ((x == 48000) || (x == 24000)) +void mp2Processor::setSamplerate (int32_t rate) { + if (baudRate == rate) + return; + if (!valid (rate)) + return; +// ourSink -> setMode (0, rate); + baudRate = rate; +} + +//////////////////////////////////////////////////////////////////////////////// +// INITIALIZATION: is moved into the constructor for the class +// // +//////////////////////////////////////////////////////////////////////////////// + +int32_t mp2Processor::mp2sampleRate (uint8_t *frame) { + if (!frame) + return 0; + if (( frame[0] != 0xFF) // no valid syncword? + || ((frame[1] & 0xF6) != 0xF4) // no MPEG-1/2 Audio Layer II? + || ((frame[2] - 0x10) >= 0xE0)) // invalid bitrate? + return 0; + return sample_rates[(((frame[1] & 0x08) >> 1) ^ 4) // MPEG-1/2 switch + + ((frame[2] >> 2) & 3)]; // actual rate +} + + +//////////////////////////////////////////////////////////////////////////////// +// DECODE HELPER FUNCTIONS // +//////////////////////////////////////////////////////////////////////////////// + +struct quantizer_spec* mp2Processor::read_allocation(int sb, int b2_table) { + int table_idx = quant_lut_step3[b2_table][sb]; + table_idx = quant_lut_step4[table_idx & 15][get_bits(table_idx >> 4)]; + return table_idx ? (&quantizer_table[table_idx - 1]) : 0; +} + + +void mp2Processor::read_samples (struct quantizer_spec *q, + int scalefactor, int *sample) { +int idx, adj, scale; +register int val; + + if (!q) { + // no bits allocated for this subband + sample[0] = sample[1] = sample[2] = 0; + return; + } + +// resolve scalefactor + if (scalefactor == 63) { + scalefactor = 0; + } else { + adj = scalefactor / 3; + scalefactor = (scf_base[scalefactor % 3] + ((1 << adj) >> 1)) >> adj; + } + + // decode samples + adj = q -> nlevels; + if (q -> grouping) { // decode grouped samples + val = get_bits (q -> cw_bits); + sample[0] = val % adj; + val /= adj; + sample[1] = val % adj; + sample[2] = val / adj; + } else { // decode direct samples + for (idx = 0; idx < 3; ++idx) + sample[idx] = get_bits(q->cw_bits); + } + + // postmultiply samples + scale = 65536 / (adj + 1); + adj = ((adj + 1) >> 1) - 1; + for (idx = 0; idx < 3; ++idx) { + // step 1: renormalization to [-1..1] + val = (adj - sample[idx]) * scale; + // step 2: apply scalefactor + sample[idx] = ( val * (scalefactor >> 12) // upper part + + ((val * (scalefactor & 4095) + 2048) >> 12)) // lower part + >> 12; // scale adjust + } +} + + +#define show_bits(bit_count) (bit_window >> (24 - (bit_count))) + +int32_t mp2Processor::get_bits (int32_t bit_count) { +//int32_t result = show_bits (bit_count); +int32_t result = bit_window >> (24 - bit_count); + + bit_window = (bit_window << bit_count) & 0xFFFFFF; + bits_in_window -= bit_count; + while (bits_in_window < 16) { + bit_window |= (*frame_pos++) << (16 - bits_in_window); + bits_in_window += 8; + } + return result; +} + + +//////////////////////////////////////////////////////////////////////////////// +// FRAME DECODE FUNCTION // +//////////////////////////////////////////////////////////////////////////////// + +int32_t mp2Processor::mp2decodeFrame (uint8_t *frame, int16_t *pcm) { +uint32_t bit_rate_index_minus1; +uint32_t sampling_frequency; +uint32_t padding_bit; +uint32_t mode; +uint32_t frame_size; +int32_t bound, sblimit; +int32_t sb, ch, gr, part, idx, nch, i, j, sum; +int32_t table_idx; + + numberofFrames ++; + if (numberofFrames >= 25) { + show_frameErrors (errorFrames); + numberofFrames = 0; + errorFrames = 0; + } + +// check for valid header: syncword OK, MPEG-Audio Layer 2 + if (( frame[0] != 0xFF) // no valid syncword? + || ((frame[1] & 0xF6) != 0xF4) // no MPEG-1/2 Audio Layer II? + || ((frame[2] - 0x10) >= 0xE0)) { // invalid bitrate? + errorFrames ++; + return 0; + } + + + // set up the bitstream reader + bit_window = frame [2] << 16; + bits_in_window = 8; + frame_pos = &frame[3]; + + // read the rest of the header + bit_rate_index_minus1 = get_bits(4) - 1; + if (bit_rate_index_minus1 > 13) + return 0; // invalid bit rate or 'free format' + + sampling_frequency = get_bits(2); + if (sampling_frequency == 3) + return 0; + + if ((frame[1] & 0x08) == 0) { // MPEG-2 + sampling_frequency += 4; + bit_rate_index_minus1 += 14; + } + + padding_bit = get_bits(1); + get_bits(1); // discard private_bit + mode = get_bits(2); + +// parse the mode_extension, set up the stereo bound + if (mode == JOINT_STEREO) + bound = (get_bits(2) + 1) << 2; + else { + get_bits(2); + bound = (mode == MONO) ? 0 : 32; + } + emit isStereo ((mode == JOINT_STEREO) || (mode == STEREO)); + +// discard the last 4 bits of the header and the CRC value, if present + get_bits(4); + if ((frame [1] & 1) == 0) + get_bits(16); + +// compute the frame size + frame_size = (144000 * bitrates[bit_rate_index_minus1] + / sample_rates [sampling_frequency]) + padding_bit; + + if (!pcm) + return frame_size; // no decoding + +// prepare the quantizer table lookups + if (sampling_frequency & 4) { + // MPEG-2 (LSR) + table_idx = 2; + sblimit = 30; + } else { + // MPEG-1 + table_idx = (mode == MONO) ? 0 : 1; + table_idx = quant_lut_step1[table_idx][bit_rate_index_minus1]; + table_idx = quant_lut_step2[table_idx][sampling_frequency]; + sblimit = table_idx & 63; + table_idx >>= 6; + } + + if (bound > sblimit) + bound = sblimit; + + // read the allocation information + for (sb = 0; sb < bound; ++sb) + for (ch = 0; ch < 2; ++ch) + allocation[ch][sb] = read_allocation(sb, table_idx); + + for (sb = bound; sb < sblimit; ++sb) + allocation[0][sb] = + allocation[1][sb] = read_allocation (sb, table_idx); + + // read scale factor selector information + nch = (mode == MONO) ? 1 : 2; + for (sb = 0; sb < sblimit; ++sb) { + for (ch = 0; ch < nch; ++ch) + if (allocation [ch][sb]) + scfsi [ch][sb] = get_bits (2); + + if (mode == MONO) + scfsi[1][sb] = scfsi[0][sb]; + } + + // read scale factors + for (sb = 0; sb < sblimit; ++sb) { + for (ch = 0; ch < nch; ++ch) { + if (allocation[ch][sb]) { + switch (scfsi[ch][sb]) { + case 0: scalefactor[ch][sb][0] = get_bits(6); + scalefactor[ch][sb][1] = get_bits(6); + scalefactor[ch][sb][2] = get_bits(6); + break; + case 1: scalefactor[ch][sb][0] = + scalefactor[ch][sb][1] = get_bits(6); + scalefactor[ch][sb][2] = get_bits(6); + break; + case 2: scalefactor[ch][sb][0] = + scalefactor[ch][sb][1] = + scalefactor[ch][sb][2] = get_bits(6); + break; + case 3: scalefactor[ch][sb][0] = get_bits(6); + scalefactor[ch][sb][1] = + scalefactor[ch][sb][2] = get_bits(6); + break; + } + } + } + if (mode == MONO) + for (part = 0; part < 3; ++part) + scalefactor[1][sb][part] = scalefactor[0][sb][part]; + } + +// coefficient input and reconstruction + for (part = 0; part < 3; ++part) { + for (gr = 0; gr < 4; ++gr) { +// read the samples + for (sb = 0; sb < bound; ++sb) + for (ch = 0; ch < 2; ++ch) + read_samples (allocation[ch][sb], + scalefactor[ch][sb][part], + &sample[ch][sb][0]); + for (sb = bound; sb < sblimit; ++sb) { + read_samples (allocation[0][sb], + scalefactor[0][sb][part], + &sample[0][sb][0]); + for (idx = 0; idx < 3; ++idx) + sample[1][sb][idx] = sample[0][sb][idx]; + } + + for (ch = 0; ch < 2; ++ch) + for (sb = sblimit; sb < 32; ++sb) + for (idx = 0; idx < 3; ++idx) + sample[ch][sb][idx] = 0; + +// synthesis loop + for (idx = 0; idx < 3; ++idx) { +// shifting step + Voffs = table_idx = (Voffs - 64) & 1023; + + for (ch = 0; ch < 2; ++ch) { +// matrixing + for (i = 0; i < 64; ++i) { + sum = 0; + for (j = 0; j < 32; ++j) // 8b*15b=23b + sum += N[i][j] * sample[ch][j][idx]; +// intermediate value is 28 bit (23 + 5), clamp to 14b +// + V [ch][table_idx + i] = (sum + 8192) >> 14; + } + +// construction of U + for (i = 0; i < 8; ++i) + for (j = 0; j < 32; ++j) { + U [(i << 6) + j] + = V [ch][(table_idx + (i << 7) + j) & 1023]; + U [(i << 6) + j + 32] = + V [ch][(table_idx + (i << 7) + j + 96) & 1023]; + } + +// apply window + for (i = 0; i < 512; ++i) + U [i] = (U [i] * D [i] + 32) >> 6; + +// output samples + for (j = 0; j < 32; ++j) { + sum = 0; + for (i = 0; i < 16; ++i) + sum -= U [(i << 5) + j]; + sum = (sum + 8) >> 4; + if (sum < -32768) + sum = -32768; + if (sum > 32767) + sum = 32767; + pcm[(idx << 6) | (j << 1) | ch] = (uint16_t) sum; + } + } // end of synthesis channel loop + } // end of synthesis sub-block loop +// adjust PCM output pointer: decoded 3 * 32 = 96 stereo samples + pcm += 192; + } // decoding of the granule finished + } + return frame_size; +} + +// +// bits to MP2 frames, amount is amount of bits +void mp2Processor::addtoFrame (std::vector v) { +int16_t i, j; +int16_t lf = baudRate == 48000 ? MP2framesize : 2 * MP2framesize; +int16_t amount = MP2framesize; +uint8_t help [24 * bitRate / 8]; +int16_t vLength = 24 * bitRate / 8; + + for (i = 0; i < 24 * bitRate / 8; i ++) { + help [i] = 0; + for (j = 0; j < 8; j ++) { + help [i] <<= 1; + help [i] |= v [8 * i + j] & 01; + } + } + { uint8_t L0 = help [vLength - 1]; + uint8_t L1 = help [vLength - 2]; + int16_t down = bitRate * 1000 >= 56000 ? 4 : 2; + my_padhandler. processPAD (help, vLength - 2 - down - 1, L1, L0); + } + + for (i = 0; i < amount; i ++) { + if (MP2Header_OK == 2) { + addbittoMP2 (MP2frame, v [i], MP2bitCount ++); + if (MP2bitCount >= lf) { + int16_t sample_buf [KJMP2_SAMPLES_PER_FRAME * 2]; + if (mp2decodeFrame (MP2frame, sample_buf)) { + buffer -> putDataIntoBuffer (sample_buf, + 2 * (int32_t)KJMP2_SAMPLES_PER_FRAME); + if (buffer -> GetRingBufferReadAvailable () > baudRate / 8) + newAudio (2 * (int32_t)KJMP2_SAMPLES_PER_FRAME, + baudRate); + } + + MP2Header_OK = 0; + MP2headerCount = 0; + MP2bitCount = 0; + } + } else + if (MP2Header_OK == 0) { +// apparently , we are not in sync yet + if (v [i] == 01) { + if (++ MP2headerCount == 12) { + MP2bitCount = 0; + for (j = 0; j < 12; j ++) + addbittoMP2 (MP2frame, 1, MP2bitCount ++); + MP2Header_OK = 1; + } + } + else + MP2headerCount = 0; + } + else + if (MP2Header_OK == 1) { + addbittoMP2 (MP2frame, v [i], MP2bitCount ++); + if (MP2bitCount == 24) { + setSamplerate (mp2sampleRate (MP2frame)); + MP2Header_OK = 2; + } + } + } + +} + +void mp2Processor::addbittoMP2 (uint8_t *v, uint8_t b, int16_t nm) { +uint8_t byte = v [nm / 8]; +int16_t bitnr = 7 - (nm & 7); +uint8_t newbyte = (01 << bitnr); + + if (b == 0) + byte &= ~newbyte; + else + byte |= newbyte; + v [nm / 8] = byte; +} + diff --git a/src/backend/audio/mp4processor.cpp b/src/backend/audio/mp4processor.cpp new file mode 100644 index 0000000..a74cbad --- /dev/null +++ b/src/backend/audio/mp4processor.cpp @@ -0,0 +1,324 @@ +# +/* + * Copyright (C) 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************ + * may 15 2015. A real improvement on the code + * is the addition from Stefan Poeschel to create a + * header for the aac that matches, really a big help!!!! + ************************************************************************ + */ +#include "mp4processor.h" +#include "radio.h" +// +#include +#include "charsets.h" +#include "pad-handler.h" + +// +/** + * \class mp4Processor is the main handler for the aac frames + * the class proper processes input and extracts the aac frames + * that are processed by the "faadDecoder" class + */ + mp4Processor::mp4Processor (RadioInterface *mr, + int16_t bitRate, + RingBuffer *b, + QString picturesPath) + :my_padhandler (mr, picturesPath), + my_rsDecoder (8, 0435, 0, 1, 10), + aacDecoder (mr, b) { + + myRadioInterface = mr; + connect (this, SIGNAL (show_frameErrors (int)), + mr, SLOT (show_frameErrors (int))); + connect (this, SIGNAL (show_rsErrors (int)), + mr, SLOT (show_rsErrors (int))); + connect (this, SIGNAL (show_aacErrors (int)), + mr, SLOT (show_aacErrors (int))); + connect (this, SIGNAL (isStereo (bool)), + mr, SLOT (setStereo (bool))); + this -> bitRate = bitRate; // input rate + + superFramesize = 110 * (bitRate / 8); + RSDims = bitRate / 8; + frameBytes = new uint8_t [RSDims * 120]; // input + outVector = new uint8_t [RSDims * 110]; + blockFillIndex = 0; + blocksInBuffer = 0; + frameCount = 0; + frameErrors = 0; + aacErrors = 0; + aacFrames = 0; + successFrames = 0; + rsErrors = 0; +} + + mp4Processor::~mp4Processor (void) { + delete[] frameBytes; + delete[] outVector; +} + +/** + * \brief addtoFrame + * + * a DAB+ superframe consists of 5 consecutive DAB frames + * we add vector for vector to the superframe. Once we have + * 5 lengths of "old" frames, we check + * Note that the packing in the entry vector is still one bit + * per Byte, nbits is the number of Bits (i.e. containing bytes) + * the function adds nbits bits, packed in bytes, to the frame + */ +void mp4Processor::addtoFrame (std::vector V) { +int16_t i, j; +uint8_t temp = 0; +int16_t nbits = 24 * bitRate; + + for (i = 0; i < nbits / 8; i ++) { // in bytes + temp = 0; + for (j = 0; j < 8; j ++) + temp = (temp << 1) | (V [i * 8 + j] & 01); + frameBytes [blockFillIndex * nbits / 8 + i] = temp; + } +// + blocksInBuffer ++; + blockFillIndex = (blockFillIndex + 1) % 5; +// +/** + * we take the last five blocks to look at + */ + if (blocksInBuffer >= 5) { +/// first, we show the "successrate" + if (++frameCount >= 25) { + frameCount = 0; + show_frameErrors (frameErrors); + frameErrors = 0; + } + +/** + * starting for real: check the fire code + * if the firecode is OK, we handle the frame + * and adjust the buffer here for the next round + */ + if (fc. check (&frameBytes [blockFillIndex * nbits / 8]) && + (processSuperframe (frameBytes, + blockFillIndex * nbits / 8))) { +// since we processed a full cycle of 5 blocks, we just start a +// new sequence, beginning with block blockFillIndex + blocksInBuffer = 0; + if (++successFrames > 25) { + show_rsErrors (rsErrors); + successFrames = 0; + rsErrors = 0; + } + } + else { +/** + * we were wrong, virtual shift to left in block sizes + */ + blocksInBuffer = 4; + frameErrors ++; + } + } +} + +/** + * \brief processSuperframe + * + * First, we know the firecode checker gave green light + * We correct the errors using RS + */ +bool mp4Processor::processSuperframe (uint8_t frameBytes [], int16_t base) { +uint8_t num_aus; +int16_t i, j, k; +uint8_t rsIn [120]; +uint8_t rsOut [110]; +uint8_t dacRate; +uint8_t sbrFlag; +uint8_t aacChannelMode; +uint8_t psFlag; +uint16_t mpegSurround; +int32_t tmp; + +/** + * apply reed-solomon error repar + * OK, what we now have is a vector with RSDims * 120 uint8_t's + * the superframe, containing parity bytes for error repair + * take into account the interleaving that is applied. + */ + for (j = 0; j < RSDims; j ++) { + int16_t ler = 0; + for (k = 0; k < 120; k ++) + rsIn [k] = frameBytes [(base + j + k * RSDims) % (RSDims * 120)]; + ler = my_rsDecoder. dec (rsIn, rsOut, 135); + if (ler < 0) { + rsErrors ++; + return false; + } + for (k = 0; k < 110; k ++) + outVector [j + k * RSDims] = rsOut [k]; + } + +// bits 0 .. 15 is firecode +// bit 16 is unused + dacRate = (outVector [2] >> 6) & 01; // bit 17 + sbrFlag = (outVector [2] >> 5) & 01; // bit 18 + aacChannelMode = (outVector [2] >> 4) & 01; // bit 19 + psFlag = (outVector [2] >> 3) & 01; // bit 20 + mpegSurround = (outVector [2] & 07); // bits 21 .. 23 + + switch (2 * dacRate + sbrFlag) { + default: // cannot happen + case 0: + num_aus = 4; + au_start [0] = 8; + au_start [1] = outVector [3] * 16 + (outVector [4] >> 4); + au_start [2] = (outVector [4] & 0xf) * 256 + + outVector [5]; + au_start [3] = outVector [6] * 16 + + (outVector [7] >> 4); + au_start [4] = 110 * (bitRate / 8); + break; +// + case 1: + num_aus = 2; + au_start [0] = 5; + au_start [1] = outVector [3] * 16 + + (outVector [4] >> 4); + au_start [2] = 110 * (bitRate / 8); + break; +// + case 2: + num_aus = 6; + au_start [0] = 11; + au_start [1] = outVector [3] * 16 + (outVector [4] >> 4); + au_start [2] = (outVector [4] & 0xf) * 256 + outVector [ 5]; + au_start [3] = outVector [6] * 16 + (outVector [7] >> 4); + au_start [4] = (outVector [7] & 0xf) * 256 + outVector [8]; + au_start [5] = outVector [9] * 16 + (outVector [10] >> 4); + au_start [6] = 110 * (bitRate / 8); + break; +// + case 3: + num_aus = 3; + au_start [0] = 6; + au_start [1] = outVector [3] * 16 + (outVector [4] >> 4); + au_start [2] = (outVector [4] & 0xf) * 256 + outVector [5]; + au_start [3] = 110 * (bitRate / 8); + break; + } +/** + * OK, the result is N * 110 * 8 bits (still single bit per byte!!!) + * extract the AU's, and prepare a buffer, with the sufficient + * lengthy for conversion to PCM samples + */ + for (i = 0; i < num_aus; i ++) { + int16_t aac_frame_length; + +/// sanity check 1 + if (au_start [i + 1] < au_start [i]) { +// fprintf (stderr, "%d %d (%d)\n", au_start [i], au_start [i + 1], i); +// should not happen, all errors were corrected + return false; + } + + aac_frame_length = au_start [i + 1] - au_start [i] - 2; +// just a sanity check + if ((aac_frame_length >= 960) || (aac_frame_length < 0)) { + fprintf (stderr, "aac_frame_length = %d\n", aac_frame_length); +// return false; + } + +// but first the crc check + if (check_crc_bytes (&outVector [au_start [i]], + aac_frame_length)) { + bool err; +// +// first handle the pad data if any + if (((outVector [au_start [i + 0]] >> 5) & 07) == 4) { + + int16_t count = outVector [au_start [i] + 1]; + uint8_t buffer [count]; + memcpy (buffer, &outVector [au_start [i] + 2], count); + uint8_t L0 = buffer [count - 1]; + uint8_t L1 = buffer [count - 2]; + my_padhandler. processPAD (buffer, count - 3, L1, L0); + } +// +// then handle the audio + + uint8_t theAudioUnit [2 * 960 + 10]; // sure, large enough + + memcpy (theAudioUnit, + &outVector [au_start [i]], aac_frame_length); + memset (&theAudioUnit [aac_frame_length], 0, 10); + + int tmp = aacDecoder. MP42PCM (dacRate, + sbrFlag, + mpegSurround, + aacChannelMode, + theAudioUnit, + aac_frame_length); + err = tmp == 0; + emit isStereo (!err); +// handle_aacFrame (&outVector [au_start [i]], +// aac_frame_length, +// dacRate, +// sbrFlag, +// mpegSurround, +// aacChannelMode, +// &err); + if (err) + aacErrors ++; + if (++aacFrames > 25) { + show_aacErrors (aacErrors); + aacErrors = 0; + aacFrames = 0; + } + } + else { + fprintf (stderr, "CRC failure with dab+ frame %d (%d)\n", + i, num_aus); + } + } + return true; +} + +void mp4Processor::handle_aacFrame (uint8_t *v, + int16_t frame_length, + uint8_t dacRate, + uint8_t sbrFlag, + uint8_t mpegSurround, + uint8_t aacChannelMode, + bool *error) { +uint8_t theAudioUnit [2 * 960 + 10]; // sure, large enough + + memcpy (theAudioUnit, v, frame_length); + memset (&theAudioUnit [frame_length], 0, 10); + + int tmp = aacDecoder. MP42PCM (dacRate, + sbrFlag, + mpegSurround, + aacChannelMode, + theAudioUnit, + frame_length); + *error = tmp == 0; +} + diff --git a/src/backend/audio/mp4processor.cpp-old b/src/backend/audio/mp4processor.cpp-old new file mode 100644 index 0000000..cdb89d0 --- /dev/null +++ b/src/backend/audio/mp4processor.cpp-old @@ -0,0 +1,379 @@ +# +/* + * Copyright (C) 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the SDR-J (JSDR). + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * superframer for the SDR-J DAB+ receiver + * This processor handles the whole DAB+ specific part + ************************************************************************ + * may 15 2015. A real improvement on the code + * is the addition from Stefan Poeschel to create a + * header for the aac that matches, really a big help!!!! + ************************************************************************ + */ +#include "mp4processor.h" +#include +#include "gui.h" +// +#include "charsets.h" +#include "faad-decoder.h" +#include "pad-handler.h" +/** + * \brief simple, inline coded, crc checker + */ +bool dabPlus_crc (uint8_t *msg, int16_t len) { +int i, j; +uint16_t accumulator = 0xFFFF; +uint16_t crc; +uint16_t genpoly = 0x1021; + + for (i = 0; i < len; i ++) { + int16_t data = msg [i] << 8; + for (j = 8; j > 0; j--) { + if ((data ^ accumulator) & 0x8000) + accumulator = ((accumulator << 1) ^ genpoly) & 0xFFFF; + else + accumulator = (accumulator << 1) & 0xFFFF; + data = (data << 1) & 0xFFFF; + } + } +// +// ok, now check with the crc that is contained +// in the au + crc = ~((msg [len] << 8) | msg [len + 1]) & 0xFFFF; + return (crc ^ accumulator) == 0; +} + +/** + * \class mp4Processor is the main handler for the aac frames + * the class proper processes input and extracts the aac frames + * that are processed by the "faadDecoder" class + */ + mp4Processor::mp4Processor (RadioInterface *mr, + audioSink *as, + FILE *errorLog, + int16_t bitRate):my_padhandler (mr) { + + myRadioInterface = mr; + connect (this, SIGNAL (show_successRate (int)), + mr, SLOT (show_successRate (int))); + connect (this, SIGNAL (showLabel (QString)), + mr, SLOT (showLabel (QString))); + ourSink = as; + this -> bitRate = bitRate; // input rate + + superFramesize = 110 * (bitRate / 8); + RSDims = bitRate / 8; + frameBytes = new uint8_t [RSDims * 120]; // input + outVector = new uint8_t [RSDims * 110]; + blockFillIndex = 0; + blocksInBuffer = 0; +// + aacDecoder = new faadDecoder (ourSink); + frameCount = 0; + frameErrors = 0; +// +// error display + au_count = 0; + au_errors = 0; + this -> errorLog = errorLog; +} + + mp4Processor::~mp4Processor (void) { + delete aacDecoder; + delete[] frameBytes; + delete[] outVector; +} + +/** + * \brief addtoFrame + * + * a DAB+ superframe consists of 5 consecutive DAB frames + * we add vector for vector to the superframe. Once we have + * 5 lengths of "old" frames, we check + * Note that the packing in the entry vector is still one bit + * per Byte, nbits is the number of Bits (i.e. containing bytes) + * the function adds nbits bits, packed in bytes, to the frame + */ +void mp4Processor::addtoFrame (uint8_t *V, int16_t nbits) { +int16_t i, j; +uint8_t temp = 0; + + for (i = 0; i < nbits / 8; i ++) { // in bytes + temp = 0; + for (j = 0; j < 8; j ++) + temp = (temp << 1) | (V [i * 8 + j] & 01); + frameBytes [blockFillIndex * nbits / 8 + i] = temp; + } +// + blocksInBuffer ++; + blockFillIndex = (blockFillIndex + 1) % 5; +// +/** + * we take the last five blocks to look at + */ + if (blocksInBuffer >= 5) { +/// first, we show the "successrate" + if (++frameCount >= 25) { + frameCount = 0; + show_successRate (4 * (25 - frameErrors)); + frameErrors = 0; + } + +/** + * starting for real: check the fire code + * if the firecode is OK, we handle the frame + * and adjust the buffer here for the next round + */ + if (fc. check (&frameBytes [blockFillIndex * nbits / 8]) && + (processSuperframe (frameBytes, + blockFillIndex * nbits / 8))) { +// since we processed a full cycle of 5 blocks, we just start a +// new sequence, beginning with block blockFillIndex + blocksInBuffer = 0; + } + else { +/** + * we were wrong, virtual shift to left in block sizes + */ + blocksInBuffer = 4; + frameErrors ++; + } + } +} + +/** + * \brief processSuperframe + * + * First, we we that the firecode checker gace green light + * However, that does not mean that the values defining the + * the sizes and positions of the aac frames are correct + * When we see an obvious incorrect value, we let the + * function fail and report that in the errorLog file + * (which is usually /dev/null). + */ +bool mp4Processor::processSuperframe (uint8_t frameBytes [], int16_t bo) { +uint8_t num_aus; +int16_t i, j, k; +int16_t nErrors = 0; +uint8_t rsIn [120]; +uint8_t rsOut [110]; +uint8_t dacRate; +uint8_t sbrFlag; +uint8_t aacChannelMode; +uint8_t psFlag; +uint16_t mpegSurround; +int32_t outSamples = 0; +int32_t tmp; + +// bits 0 .. 15 is firecode +// bit 16 is unused + dacRate = (frameBytes [bo + 2] >> 6) & 01; // bit 17 + sbrFlag = (frameBytes [bo + 2] >> 5) & 01; // bit 18 + aacChannelMode = (frameBytes [bo + 2] >> 4) & 01; // bit 19 + psFlag = (frameBytes [bo + 2] >> 3) & 01; // bit 20 + mpegSurround = (frameBytes [bo + 2] & 07); // bits 21 .. 23 + + switch (2 * dacRate + sbrFlag) { + default: // cannot happen + fprintf (errorLog, "serious error in frame 1 (%d) (%d)\n", + ++au_errors, au_count); + return false; + + case 0: + num_aus = 4; + au_start [0] = 8; + au_start [1] = frameBytes [bo + 3] * 16 + + (frameBytes [bo + 4] >> 4); + au_start [2] = (frameBytes [bo + 4] & 0xf) * 256 + + frameBytes [bo + 5]; + au_start [3] = frameBytes [bo + 6] * 16 + + (frameBytes [bo + 7] >> 4); + au_start [4] = 110 * (bitRate / 8); + if ((au_start [3] >= au_start [4]) || + (au_start [2] >= au_start [3]) || + (au_start [1] >= au_start [2])) { + fprintf (errorLog, "serious error in frame 2 (%d) (%d) %d %d %d %d %d\n", + ++au_errors, au_count, + au_start [0], + au_start [1], + au_start [2], + au_start [3], + au_start [4]); + return false; + } + break; +// + case 1: + num_aus = 2; + au_start [0] = 5; + au_start [1] = frameBytes [bo + 3] * 16 + + (frameBytes [bo + 4] >> 4); + au_start [2] = 110 * (bitRate / 8); + if ((au_start [1] < au_start [0]) || + (au_start [1] >= au_start [2])) { + fprintf (errorLog, "serious error in frame 3 (%d) (%d) %d %d %d\n", + ++au_errors, au_count, + au_start [0], + au_start [1], + au_start [2]); +; + return false; + } + break; +// + case 2: + num_aus = 6; + au_start [0] = 11; + au_start [1] = frameBytes [bo + 3] * 16 + + (frameBytes [bo + 4] >> 4); + au_start [2] = (frameBytes [bo + 4] & 0xf) * 256 + + frameBytes [bo + 5]; + au_start [3] = frameBytes [bo + 6] * 16 + + (frameBytes [bo + 7] >> 4); + au_start [4] = (frameBytes [bo + 7] & 0xf) * 256 + + frameBytes [bo + 8]; + au_start [5] = frameBytes [bo + 9] * 16 + + (frameBytes [bo + 10] >> 4); + au_start [6] = 110 * (bitRate / 8); + + if ((au_start [5] >= au_start [6]) || + (au_start [4] >= au_start [5]) || + (au_start [3] >= au_start [4]) || + (au_start [2] >= au_start [3]) || + (au_start [1] >= au_start [2])) { + fprintf (errorLog, "serious error in frame 4 (%d) (%d) %d %d %d %d %d %d %d\n", + ++au_errors, au_count, + au_start [0], + au_start [1], + au_start [2], + au_start [3], + au_start [4], + au_start [5], + au_start [6]); + return false; + } + break; +// + case 3: + num_aus = 3; + au_start [0] = 6; + au_start [1] = frameBytes [bo + 3] * 16 + + (frameBytes [bo + 4] >> 4); + au_start [2] = (frameBytes [bo + 4] & 0xf) * 256 + + frameBytes [bo + 5]; + au_start [3] = 110 * (bitRate / 8); + if ((au_start [2] >= au_start [3]) || + (au_start [1] >= au_start [2])) { + fprintf (errorLog, "serious error in frame 5 (%d) (%d) %d %d %d %d\n", + ++au_errors, au_count, + au_start [0], + au_start [1], + au_start [2], + au_start [3]); + return false; + } + break; + } +/** + * apply reed-solomon error repar + * OK, what we now have is a vector with RSDims * 120 uint8_t's + * the superframe, containing parity bytes for error repair + * take into account the interleaving that is applied. + */ + for (j = 0; j < RSDims; j ++) { + for (k = 0; k < 120; k ++) + rsIn [k] = frameBytes [(bo + j + k * RSDims) % (RSDims * 120)]; + nErrors += rsDecoder. dec (rsIn, rsOut); + for (k = 0; k < 110; k ++) + outVector [j + k * RSDims] = rsOut [k]; + } +/** + * OK, the result is N * 110 * 8 bits (still single bit per byte!!!) + * extract the AU's, and prepare a buffer, with the sufficient + * lengthy for conversion to PCM samples + */ + for (i = 0; i < num_aus; i ++) { + int16_t aac_frame_length; + au_count ++; + uint8_t theAU [2 * 960 + 10]; // sure, large enough + memset (theAU, 0, sizeof (theAU)); + +/// sanity check 1 + if (au_start [i + 1] < au_start [i]) { + fprintf (errorLog, "%d %d\n", au_start [i + 1], au_start [i]); + return false; + } + +/** + * Note that the length can be erroneous, so we check + * its sanity + */ + aac_frame_length = au_start [i + 1] - au_start [i] - 2; + if ((aac_frame_length >= 2 * 960) || (aac_frame_length < 0)) { + fprintf (errorLog, "serious error in frame 6 (%d) (%d) frame_length = %d\n", + ++au_errors, + au_count, aac_frame_length); + return false; + } +/// but first the crc check + if (dabPlus_crc (&outVector [au_start [i]], + aac_frame_length)) { +/** + * create a real aac vector, starting with the newly created + * header + */ + memcpy (theAU, + &outVector [au_start [i]], + aac_frame_length * sizeof (uint8_t)); +/** + * see if we have a PAD + */ + if (((theAU [0] >> 5) & 07) == 4) + my_padhandler. processPAD (theAU); +/** + * just a few bytes extra, such that the decoder can look + * beyond the last byte + */ + for (j = aac_frame_length; + j < aac_frame_length + 10; j ++) + theAU [j] = 0; + tmp = aacDecoder -> MP42PCM (dacRate, + sbrFlag, + mpegSurround, + aacChannelMode, + theAU, + aac_frame_length); + if (tmp == 0) + frameErrors ++; + else + outSamples += tmp; + } + else { + au_errors ++; + fprintf (errorLog, "CRC failure with dab+ frame (error %d)\n", + au_errors); + } + } +// fprintf (stderr, "%d samples good for %d nsec of music\n", +// outSamples, outSamples * 1000 / 48); +// + return true; +} + diff --git a/src/backend/audio/newconverter.cpp b/src/backend/audio/newconverter.cpp new file mode 100644 index 0000000..80ca4e4 --- /dev/null +++ b/src/backend/audio/newconverter.cpp @@ -0,0 +1,85 @@ +# +/* + * Copyright (C) 2011, 2012, 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "newconverter.h" + + newConverter::newConverter (int32_t inRate, int32_t outRate, + int32_t inSize) { +int err; + this -> inRate = inRate; + this -> outRate = outRate; + inputLimit = inSize; + ratio = double(outRate) / inRate; + fprintf (stderr, "ratio = %f\n", ratio); + outputLimit = inSize * ratio; +// converter = src_new (SRC_SINC_BEST_QUALITY, 2, &err); +// converter = src_new (SRC_LINEAR, 2, &err); + converter = src_new (SRC_SINC_MEDIUM_QUALITY, 2, &err); + src_data = new SRC_DATA; + inBuffer = new float [2 * inputLimit + 20]; + outBuffer = new float [2 * outputLimit + 20]; + src_data-> data_in = inBuffer; + src_data-> data_out = outBuffer; + src_data-> src_ratio = ratio; + src_data-> end_of_input = 0; + inp = 0; +} + + newConverter::~newConverter (void) { + src_delete (converter); + delete [] inBuffer; + delete [] outBuffer; + delete src_data; +} + +bool newConverter::convert (DSPCOMPLEX v, + DSPCOMPLEX *out, int32_t *amount) { +int32_t i; +int32_t framesOut; +int res; + + inBuffer [2 * inp] = real (v); + inBuffer [2 * inp + 1] = imag (v); + inp ++; + if (inp < inputLimit) + return false; + + src_data -> input_frames = inp; + src_data -> output_frames = outputLimit + 10; + res = src_process (converter, src_data); + if (res != 0) { + fprintf (stderr, "error %s\n", src_strerror (res)); + return false; + } + inp = 0; + framesOut = src_data -> output_frames_gen; + for (i = 0; i < framesOut; i ++) + out [i] = DSPCOMPLEX (outBuffer [2 * i], outBuffer [2 * i + 1]); + *amount = framesOut; + return true; +} + +int32_t newConverter::getOutputsize (void) { + return outputLimit; +} + diff --git a/src/backend/charsets.cpp b/src/backend/charsets.cpp new file mode 100644 index 0000000..2f9d688 --- /dev/null +++ b/src/backend/charsets.cpp @@ -0,0 +1,99 @@ +# +/* + * Copyright (C) 2015 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * This charset handling was kindly added by Przemyslaw Wegrzyn + * all rights acknowledged + */ +#include "charsets.h" +#include +/** + * This table maps "EBU Latin" charset to corresponding + * Unicode (UCS2-encoded) characters. + * See ETSI TS 101 756 v1.6.1, Annex C + */ +static const unsigned short ebuLatinToUcs2[] = { +/* 0x00 - 0x07 */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, +/* 0x08 - 0x0f */ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, +/* 0x10 - 0x17 */ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, +/* 0x18 - 0x1f */ 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x2d, + +/* 0x20 - 0x27 */ 0x20, 0x21, 0x22, 0x23, 0xa4, 0x25, 0x26, 0x27, +/* 0x28 - 0x2f */ 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, +/* 0x30 - 0x37 */ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, +/* 0x38 - 0x3f */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, +/* 0x40 - 0x47 */ 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, +/* 0x48 - 0x4f */ 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, +/* 0x50 - 0x57 */ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, +/* 0x58 - 0x5f */ 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x2015, 0x5f, +/* 0x60 - 0x67 */ 0x2551, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, +/* 0x68 - 0x6f */ 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, +/* 0x70 - 0x77 */ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, +/* 0x78 - 0x7f */ 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0xaf, 0x7f, + +/* 0x80 - 0x87 */ 0xe1, 0xe0, 0xe9, 0xe8, 0xed, 0xec, 0xf3, 0xf2, +/* 0x88 - 0x8f */ 0xfa, 0xf9, 0xd1, 0xc7, 0x015e, 0xdf, 0xa1, 0x0132, +/* 0x90 - 0x97 */ 0xe2, 0xe4, 0xea, 0xeb, 0xee, 0xef, 0xf4, 0xf6, +/* 0x98 - 0x9f */ 0xfb, 0xfc, 0xf1, 0xe7, 0x015f, 0x011f, 0x0131, 0x0133, +/* 0xa0 - 0xa7 */ 0xaa, 0x03b1, 0xa9, 0x2030, 0x011e, 0x011b, 0x0148, 0x0151, +/* 0xa8 - 0xaf */ 0x03c0, 0x20ac, 0xa3, 0x24, 0x2190, 0x2191, 0x2192, 0x2193, +/* 0xb0 - 0xb7 */ 0xba, 0xb9, 0xb2, 0xb3, 0xb1, 0x0130, 0x0144, 0x0171, +/* 0xb8 - 0xbf */ 0xb5, 0xbf, 0xf7, 0xb0, 0xbc, 0xbd, 0xbe, 0xa7, +/* 0xc0 - 0xc7 */ 0xc1, 0xc0, 0xc9, 0xc8, 0xcd, 0xcc, 0xd3, 0xd2, +/* 0xc8 - 0xcf */ 0xda, 0xd9, 0x0158, 0x010c, 0x0160, 0x017d, 0xd0, 0x13f, +/* 0xd0 - 0xd7 */ 0xc2, 0xc4, 0xca, 0xcb, 0xce, 0xcf, 0xd4, 0xd6, +/* 0xd8 - 0xdf */ 0xdb, 0xdc, 0x0159, 0x010d, 0x0161, 0x017e, 0x0111, 0x0140, +/* 0xe0 - 0xe7 */ 0x00c3, 0x00c5, 0x00c6, 0x0152, 0x0177, 0xdd, 0xd5, 0xd8, +/* 0xe8 - 0xef */ 0xde, 0x014a, 0x0154, 0x0106, 0x015a, 0x0179, 0x0166, 0xf0, +/* 0xf0 - 0xf7 */ 0xe3, 0xe5, 0xe6, 0x0153, 0x0175, 0xfd, 0xf5, 0xf8, +/* 0xf8 - 0xff */ 0xfe, 0x014b, 0x0155, 0x0107, 0x015b, 0x017a, 0x0167, 0xff +}; + +QString toQStringUsingCharset (const char* buffer, + CharacterSet charset, int size) { +QString s; +uint16_t length = 0; +uint16_t i; + + if(size == -1) + length = strlen(buffer); + else + length = size; + + switch (charset) { + case UnicodeUcs2: + s = QString::fromUtf16 ((const ushort*) buffer, length); + break; + + case UnicodeUtf8: + s = QString::fromUtf8 (buffer, length); + break; + + case EbuLatin: + default: + s = QString(); + for (i = 0; i < length; i++) { + s [i] = QChar (ebuLatinToUcs2 [((uint8_t*) buffer)[i]]); + } + } + + return s; +} + diff --git a/src/backend/data-backend.cpp b/src/backend/data-backend.cpp new file mode 100644 index 0000000..a7cc350 --- /dev/null +++ b/src/backend/data-backend.cpp @@ -0,0 +1,169 @@ +# +/* + * Copyright (C) 2015 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#include "dab-constants.h" +#include "radio.h" +#include "frame-processor.h" +#include "data-backend.h" +#include "eep-protection.h" +#include "uep-protection.h" +#include "data-processor.h" + +// Interleaving is - for reasons of simplicity - done +// inline rather than through a special class-object +// We could make a single handler for interleaving +// and deconvolution, but it is a pretty simple operation +// so for now keep it in-line +// +// The main function of this class is to assemble the +// MSCdatagroups and dispatch to the appropriate handler +// +// fragmentsize == Length * CUSize + dataBackend::dataBackend(RadioInterface *mr, + packetdata *d, + RingBuffer *dataBuffer, + QString picturesPath) : + virtualBackend (d -> startAddr, + d -> length), + freeSlots (20) { +int32_t i, j; + + this -> myRadioInterface = mr; + this -> fragmentSize = d -> length * CUSize; + this -> bitRate = d -> bitRate; + this -> protLevel = d -> protLevel; + our_frameProcessor = new dataProcessor (mr, + d, + dataBuffer, + picturesPath); + nextIn = 0; + nextOut = 0; + for (i = 0; i < 20; i ++) + theData [i] = new int16_t [fragmentSize]; + + outV = new uint8_t [24 * bitRate]; + interleaveData = new int16_t *[16]; // the size + for (i = 0; i < 16; i ++) { + interleaveData [i] = new int16_t [fragmentSize]; + memset (interleaveData [i], 0, fragmentSize * sizeof (int16_t)); + } + countforInterleaver = 0; +// +// The handling of the depuncturing and deconvolution is +// shared with that of the audio + if (d -> shortForm) + protectionHandler = new uep_protection (bitRate, + d -> protLevel); + else + protectionHandler = new eep_protection (bitRate, + d -> protLevel); +// + uint8_t shiftRegister [9]; + disperseVector. resize (24 * bitRate); +// and the energy dispersal + memset (shiftRegister, 1, 9); + for (i = 0; i < bitRate * 24; i ++) { + uint8_t b = shiftRegister [8] ^ shiftRegister [4]; + for (j = 8; j > 0; j--) + shiftRegister [j] = shiftRegister [j - 1]; + shiftRegister [0] = b; + disperseVector[i] = b; + } + + start (); +} + + dataBackend::~dataBackend (void) { +int16_t i; + running = false; + while (this -> isRunning ()) + usleep (1); + delete protectionHandler; + for (i = 0; i < 16; i ++) + delete[] interleaveData [i]; + for (i = 0; i < 20; i ++) + delete [] theData [i]; + delete[] interleaveData; + delete outV; +} + +int32_t dataBackend::process (int16_t *v, int16_t cnt) { + (void)cnt; + while (!freeSlots. tryAcquire (1, 200)) + if (!running) + return 0; + memcpy (theData [nextIn], v, fragmentSize * sizeof (int16_t)); + nextIn = (nextIn + 1) % 20; + usedSlots. release (); + return 1; +} + +const int16_t interleaveMap[] = {0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15}; + +void dataBackend::run (void) { +int16_t countforInterleaver = 0; +int16_t interleaverIndex = 0; +int16_t tempX [fragmentSize]; +int16_t i, j; + + running = true; + while (running) { + while (!usedSlots. tryAcquire (1, 200)) + if (!running) + return; + +// memcpy (Data, theData [nextOut], fragmentSize * sizeof (int16_t)); + + for (i = 0; i < fragmentSize; i ++) { + tempX [i] = interleaveData [(interleaverIndex + + interleaveMap [i & 017]) & 017][i]; + interleaveData [interleaverIndex][i] = theData [nextOut] [i]; + } + nextOut = (nextOut + 1) % 20; + freeSlots. release (); + + interleaverIndex = (interleaverIndex + 1) & 0x0F; + +// only continue when de-interleaver is filled + if (countforInterleaver <= 15) { + countforInterleaver ++; + continue; + } +// + protectionHandler -> deconvolve (tempX, fragmentSize, outV); + + for (i = 0; i < bitRate * 24; i ++) + outV [i] ^= disperseVector [i]; +// What we get here is a long sequence (24 * bitrate) of bits, not packed +// but forming a DAB packet +// we hand it over to make an MSC data group + our_frameProcessor -> addtoFrame (outV); + } +} + +// It might take a msec for the task to stop +void dataBackend::stopRunning (void) { + running = false; + while (this -> isRunning ()) + usleep (100); +} +// diff --git a/src/backend/data/data-processor.cpp b/src/backend/data/data-processor.cpp new file mode 100644 index 0000000..2686d98 --- /dev/null +++ b/src/backend/data/data-processor.cpp @@ -0,0 +1,196 @@ +# +/* + * Copyright (C) 2015 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#include "dab-constants.h" +#include "radio.h" +#include "data-processor.h" +#include "virtual-datahandler.h" +#include "mot-databuilder.h" + +// \class dataProcessor +// The main function of this class is to assemble the +// MSCdatagroups and dispatch to the appropriate handler +// +// fragmentsize == Length * CUSize + dataProcessor::dataProcessor (RadioInterface *mr, + packetdata *pd, + RingBuffer *dataBuffer, + QString picturesPath) { + this -> myRadioInterface = mr; + this -> bitRate = pd -> bitRate; + this -> DSCTy = pd -> DSCTy; + this -> appType = pd -> appType; + this -> packetAddress = pd -> packetAddress; + this -> DGflag = pd -> DGflag; + this -> FEC_scheme = pd -> FEC_scheme; + this -> dataBuffer = dataBuffer; + this -> expectedIndex = 0; + switch (DSCTy) { + default: + my_dataHandler = new virtual_dataHandler (); + break; + + case 60: + my_dataHandler = new mot_databuilder (mr, picturesPath); + break; + } + + packetState = 0; +} + + dataProcessor::~dataProcessor (void) { + delete my_dataHandler; +} + + +void dataProcessor::addtoFrame (uint8_t *outV) { +// There is - obviously - some exception, that is +// when the DG flag is on and there are no datagroups for DSCTy5 + if ((this -> DSCTy == 5) && + (this -> DGflag)) // no datagroups + handleTDCAsyncstream (outV, 24 * bitRate); + else + handlePackets (outV, 24 * bitRate); +} +// +// While for a full mix data and audio there will be a single packet in a +// data compartment, for an empty mix, there may be many more +void dataProcessor::handlePackets (uint8_t *data, int32_t length) { + while (true) { + int32_t pLength = (getBits_2 (data, 0) + 1) * 24 * 8; + if (length < pLength) // be on the safe side + return; + handlePacket (data); + length -= pLength; + if (length < 2) + return; + data = &(data [pLength]); + } +} +// +// Handle a single DAB packet: +// Note, although not yet encountered, the standard says that +// there may be multiple streams, to be identified by +// the address. For the time being we only handle a single +// stream!!!! +void dataProcessor::handlePacket (uint8_t *data) { +int32_t packetLength = (getBits_2 (data, 0) + 1) * 24; +int16_t continuityIndex = getBits_2 (data, 2); +int16_t firstLast = getBits_2 (data, 4); +int16_t address = getBits (data, 6, 10); +uint16_t command = getBits_1 (data, 16); +int32_t usefulLength = getBits_7 (data, 17); +int32_t i; +// if (usefulLength > 0) +// fprintf (stderr, "CI = %d, address = %d, usefulLength = %d\n", +// continuityIndex, address, usefulLength); + + if (continuityIndex != expectedIndex) { + expectedIndex = 0; + return; + } +// + expectedIndex = (expectedIndex + 1 ) % 4; + (void)command; + + if (!check_CRC_bits (data, packetLength * 8)) { + return; + } + + if (address == 0) + return; // padding packet +// + if (packetAddress != address) // sorry + return; + +// assemble the full MSC datagroup + + if (packetState == 0) { // waiting for a start + if (firstLast == 02) { // first packet + packetState = 1; + series. resize (usefulLength * 8); + for (i = 0; i < series. size (); i ++) + series [i] = data [24 + i]; + } + else + if (firstLast == 03) { // single packet, mostly padding + series. resize (usefulLength * 8); + for (i = 0; i < series. size (); i ++) + series [i] = data [24 + i]; + my_dataHandler -> add_mscDatagroup (series); + } + else + series. resize (0); // packetState remains 0 + } + else + if (packetState == 01) { // within a series + if (firstLast == 0) { // intermediate packet + int32_t currentLength = series. size (); + series. resize (currentLength + 8 * usefulLength); + for (i = 0; i < 8 * usefulLength; i ++) + series [currentLength + i] = data [24 + i]; + } + else + if (firstLast == 01) { // last packet + int32_t currentLength = series. size (); + series. resize (currentLength + 8 * usefulLength); + for (i = 0; i < 8 * usefulLength; i ++) + series [currentLength + i] = data [24 + i]; + + my_dataHandler -> add_mscDatagroup (series); + packetState = 0; + } + else + if (firstLast == 02) { // first packet, previous one erroneous + packetState = 1; + series. resize (usefulLength * 8); + for (i = 0; i < series. size (); i ++) + series [i] = data [24 + i]; + } + else { + packetState = 0; + series. resize (0); + } + } +} +// +// +// Really no idea what to do here +void dataProcessor::handleTDCAsyncstream (uint8_t *data, int32_t length) { +int16_t packetLength = (getBits_2 (data, 0) + 1) * 24; +int16_t continuityIndex = getBits_2 (data, 2); +int16_t firstLast = getBits_2 (data, 4); +int16_t address = getBits (data, 6, 10); +uint16_t command = getBits_1 (data, 16); +int16_t usefulLength = getBits_7 (data, 17); + + (void) length; + (void) packetLength; + (void) continuityIndex; + (void) firstLast; + (void) address; + (void) command; + (void) usefulLength; + if (!check_CRC_bits (data, packetLength * 8)) + return; +} +// diff --git a/src/backend/data/mot-data.cpp b/src/backend/data/mot-data.cpp new file mode 100644 index 0000000..2b77e86 --- /dev/null +++ b/src/backend/data/mot-data.cpp @@ -0,0 +1,495 @@ +# +/* + * Copyright (C) 2015 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "mot-data.h" +#include "radio.h" +#include +// +// First attempt to do "something" with the MOT data +// +// Two cases +// The "single item" case, where an item is made up of an +// header together with a body +// The "directory" case, where a directory of files is maintained +// to form together a slideshow or a website +// + motHandler::motHandler (RadioInterface *mr, + QString picturesPath) { +int16_t i, j; + + this -> picturesPath = picturesPath; +// For "non-directory" MOT's, we have a descriptortable + for (i = 0; i < 16; i ++) { + table [i]. ordernumber = -1; + for (j = 0; j < 100; j ++) + table [i]. marked [j] = false; + } + ordernumber = 1; + theDirectory = NULL; + old_slide = NULL; + connect (this, SIGNAL (the_picture (QByteArray, int, QString)), + mr, SLOT (showMOT (QByteArray, int, QString))); +} + + motHandler::~motHandler (void) { +} + +void motHandler::process_mscGroup (uint8_t *data, + uint8_t groupType, + bool lastSegment, + int16_t segmentNumber, + uint16_t transportId) { +uint32_t segmentSize = ((data [0] & 0x1F) << 8) | data [1]; + + if ((segmentNumber == 0) && (groupType == 3)) // header + processHeader (transportId, &data [2], segmentSize, lastSegment); + else + if (groupType == 4) + processSegment (transportId, &data [2], segmentNumber, + segmentSize, lastSegment); + else + if ((segmentNumber == 0) && (groupType == 6)) // MOT directory + processDirectory (transportId, &data [2], segmentSize, lastSegment); + else + if (groupType == 6) // fields for MOT directory + directorySegment (transportId, &data [2], + segmentNumber, segmentSize, lastSegment); +} + +// +// Process a regular header, i.e. a type 3 +// This strongly resembles the newEntry method that +// creates a header for an item in a directory +void motHandler::processHeader (int16_t transportId, + uint8_t *segment, + int32_t segmentSize, + bool lastFlag) { +uint32_t headerSize = + ((segment [3] & 0x0F) << 9) | (segment [4]) | (segment [5] >> 7); +uint32_t bodySize = + (segment [0] << 20) | (segment [1] << 12) | + (segment [2] << 4 ) | ((segment [3] & 0xF0) >> 4); +uint8_t contentType = ((segment [5] >> 1) & 0x3F); +uint16_t contentsubType = ((segment [5] & 0x01) << 8) | segment [6]; +int32_t pointer = 7; +QString name = QString (""); + +// If we had a header with that transportId, do not do anything + if (getHandle (transportId) != NULL) { + return; + } + + while (pointer < headerSize) { + uint8_t PLI = (segment [pointer] & 0300) >> 6; + uint8_t paramId = (segment [pointer] & 077); + uint16_t length; + switch (PLI) { + case 00: + pointer += 1; + break; + + case 01: + pointer += 2; + break; + + case 02: + pointer += 5; + break; + + case 03: + if ((segment [pointer + 1] & 0200) != 0) { + length = (segment [pointer + 1] & 0177) << 8 | + segment [pointer + 2]; + pointer += 3; + } + else { + length = segment [pointer + 1] & 0177; + pointer += 2; + } + if (paramId == 12) { + int16_t i; + for (i = 0; i < length - 1; i ++) + name. append (segment [pointer + i + 1]); + } + pointer += length; + } + } + if (getHandle (transportId) != NULL) + return; + + newEntry (transportId, bodySize, contentType, contentsubType, name); +} +// +// type 4 is a segment. These segments are only useful is +// the header for the transportId is known +void motHandler::processSegment (int16_t transportId, + uint8_t *bodySegment, + int16_t segmentNumber, + int32_t segmentSize, + bool lastFlag) { +int32_t i; + + motElement *handle = getHandle (transportId); + if (handle == NULL) // cannot happen + return; + + if (handle -> marked [segmentNumber]) {// copy that we already have + return; + } + +// Note that the last segment may have a different size + if (!lastFlag && (handle -> segmentSize == -1)) + handle -> segmentSize = segmentSize; +// +// If we only have a "last" segment, we do not need to register +// the segment size +// sanity check + if (segmentNumber * handle -> segmentSize + segmentSize > + handle -> bodySize) + return; + + handle -> segments [segmentNumber]. resize (segmentSize); + for (i = 0; i < segmentSize; i ++) + handle -> segments [segmentNumber][i] = bodySegment [i]; + + handle -> marked [segmentNumber] = true; + if (lastFlag) + handle -> numofSegments = segmentNumber + 1; + + if (isComplete (handle)) + handleComplete (handle); +} +// +// we have data for all directory entries +void motHandler::handleComplete (motElement *p) { +int16_t i; + +QByteArray result; + for (i = 0; i < p -> numofSegments; i ++) + result. append (p -> segments [i]); + + if (p -> contentType == 7) { + std::vector epgData (result. begin (), result. end ()); +#ifdef TRY_EPG + QString realName = picturesPath; + realName. append (p -> name); + realName = QDir::toNativeSeparators (realName); + fprintf (stderr, "epgdata being handled\n"); + epgHandler. decode (epgData, realName); +#endif + return; + } + + if (p -> contentType != 2) { + if (p -> name != QString ("")) { + QString realName = picturesPath; + realName. append (p -> name); + realName = QDir::toNativeSeparators (realName); + fprintf (stderr, "going to write file %s\n", + realName. toUtf8 (). data ()); + checkDir (realName); + FILE *x = fopen (realName. toUtf8 (). data (), "wb"); + if (x == NULL) + fprintf (stderr, "cannot write file %s\n", + realName. toUtf8 (). data ()); + else { + (void)fwrite (result. data (), 1, p -> bodySize, x); + fclose (x); + } + } + return; + } +// MOT slide + if (old_slide != NULL) { + for (i = 0; i < p -> numofSegments; i ++) { + p -> marked [i] = false; + p -> segments [i]. clear (); + } + } + + QString realName = picturesPath; + if (p -> name == QString ("")) + realName. append (QString ("no name")); + else + realName. append (p -> name); + realName = QDir::toNativeSeparators (realName); + checkDir (realName); + the_picture (result, p -> contentsubType, realName); + old_slide = p; +} + +void motHandler::checkDir (QString &s) { +int16_t ind = s. lastIndexOf (QChar ('/')); +int16_t i; +QString dir; + if (ind == -1) // no slash, no directory + return; + + for (i = 0; i < ind; i ++) + dir. append (s [i]); + + if (QDir (dir). exists ()) + return; + QDir (). mkpath (dir); +} + +bool motHandler::isComplete (motElement *p) { +int16_t i; + + if (p -> numofSegments == -1) + return false; + for (i = 0; i < p -> numofSegments; i ++) { +// fprintf (stderr, "segment [%d] = %d\n", i, p -> marked [i]); + if (!(p -> marked [i])) + return false; + } + + return true; +} + +motElement *motHandler::getHandle (uint16_t transportId) { +int16_t i; +// +// we first look for the "free" MOT slides, then +// for the carrousel + for (i = 0; i < 16; i ++) + if (table [i]. ordernumber != -1 && + table [i]. transportId == transportId) + return &table [i]; + if (theDirectory == NULL) + return NULL; + + for (i = 0; i < theDirectory -> numObjects; i ++) { + if (theDirectory -> dir_proper [i]. ordernumber == -1) + continue; + if (theDirectory -> dir_proper [i]. transportId == transportId) + return &(theDirectory -> dir_proper [i]); + } + return NULL; +} +// + +void motHandler::processDirectory (int16_t transportId, + uint8_t *segment, + int32_t segmentSize, + bool lastFlag) { +uint32_t directorySize = ((segment [0] & 0x3F) << 24) | + ((segment [1]) << 16) | + ((segment [2]) << 8) | segment [3]; +uint16_t numObjects = (segment [4] << 8) | segment [5]; +int32_t period = (segment [6] << 16) | + (segment [7] << 8) | segment [8]; +int32_t segSize = ((segment [9] & 0x1F) << 8) | + segment [10]; +// +// If we had already a directory with that transportId, do not do anything + if ((theDirectory != NULL) && + (theDirectory -> transportId == transportId)) + return; // already in!! +// +// We handle one directory at a time + if (theDirectory != NULL) // other directory now + delete theDirectory; + + theDirectory = new MOT_directory (transportId, segmentSize, + directorySize, numObjects); + memcpy (theDirectory -> dir_segments, segment, segmentSize); + theDirectory -> marked [0] = true; +} + +void motHandler::directorySegment (uint16_t transportId, + uint8_t *segment, + int16_t segmentNumber, + int32_t segmentSize, + bool lastSegment) { +int16_t i; + + if (theDirectory == NULL) + return; + if (theDirectory -> transportId != transportId) + return; + if (theDirectory -> marked [segmentNumber]) + return; + if (lastSegment) + theDirectory -> num_dirSegments = segmentNumber + 1; + theDirectory -> marked [segmentNumber] = true; + uint8_t *address = &theDirectory -> dir_segments [segmentNumber * + theDirectory -> dir_segmentSize]; + memcpy (address, segment, segmentSize); +// +// we are "complete" if we know the number of segments and +// all segments are "in" + if (theDirectory -> num_dirSegments != -1) { + for (i = 0; i < theDirectory -> num_dirSegments; i ++) + if (!theDirectory -> marked [i]) + return; + } +// +// yes we have all data to build up the directory + analyse_theDirectory (); +} +// +// The directory +void motHandler::analyse_theDirectory (void) { +uint16_t numObjects = theDirectory -> numObjects; +uint32_t currentBase = 11; // in bytes +uint8_t *data = theDirectory -> dir_segments; +uint16_t extensionLength = (data [currentBase] << 8) | + data [currentBase + 1]; +int16_t i; + + currentBase += 2 + extensionLength; + for (i = 0; i < numObjects; i ++) + currentBase = get_dirEntry (i, data, currentBase); +} + +int16_t motHandler::get_dirEntry (int16_t index, + uint8_t *data, + uint32_t currentBase) { +QString name (""); + +uint16_t transportId = (data [currentBase] << 8) | data [currentBase + 1]; +uint32_t bodySize = (data [currentBase + 2] << 20) | + (data [currentBase + 3] << 12) | + (data [currentBase + 4] << 4) | + ((data [currentBase + 5] & 0xF0) >> 4); +uint16_t headerSize = ((data [currentBase + 5] & 0x0F) << 9) | + (data [currentBase + 6] << 1) | + ((data [currentBase + 7] >> 7) & 0x01); +uint8_t contentType = (data [currentBase + 7] >> 1) & 0x3F; +uint16_t subType = ((data [currentBase + 7] & 0x1) << 8) | + data [currentBase + 8]; +int16_t theEnd = currentBase + 2 + headerSize; + + if (headerSize == 0) + return currentBase + 2; + currentBase += 7 + 2; + while ((int)currentBase < (int)theEnd) { + uint8_t PLI = (data [currentBase] & 0300) >> 6; + uint8_t paramId = (data [currentBase] & 077); + uint16_t length; +// fprintf (stderr, "PLI = %d, paramId = %d\n", PLI, paramId); +// fprintf (stderr, "currentBase %d, theEnd %d\n", currentBase, theEnd); + switch (PLI) { + case 00: + currentBase += 1; + break; + case 01: + currentBase += 2; + break; + + case 02: + currentBase += 5; + break; + + case 03: + if ((data [currentBase + 1] & 0200) != 0) { + length = (data [currentBase + 1] & 0177) << 8 | + data [currentBase + 2]; + currentBase += 3; + } + else { + length = data [currentBase + 1] & 0177; + currentBase += 2; + } + if (paramId == 12) { + int16_t i; + for (i = 0; i < length - 1; i ++) + name. append (data [currentBase + i + 1]); + } + currentBase += length; + } + } + + if ((transportId == 0) || (getHandle (transportId) != NULL)) + return currentBase; +// +// creating an entry for an object mentioned in the directory +// strongly resembles creating a standalone entry, some differences though + newEntry (index, transportId, bodySize, + contentType, subType, name); + return currentBase; +} + +// Handling a plain header is by: +void motHandler::newEntry (uint16_t transportId, + int16_t size, + int16_t contentType, + int16_t contentsubType, + QString name) { +int16_t i; +uint16_t lowest; +int16_t lowIndex; + + + for (i = 0; i < 16; i ++) { + if (table [i]. ordernumber == -1) { + table [i]. ordernumber = ordernumber ++; + table [i]. transportId = transportId; + table [i]. bodySize = size; + table [i]. contentType = contentType; + table [i]. contentsubType = contentsubType; + table [i]. segmentSize = -1; + table [i]. numofSegments = -1; + table [i]. name = QString (name); + return; + } + } +// +// table full, delete the oldest one +// + lowest = 65377; + lowIndex = 0; + for (i = 0; i < 16; i ++) { + if (table [i]. ordernumber < lowest) { + lowIndex = i; + lowest = table [i]. ordernumber; + } + } + + table [lowIndex]. ordernumber = ordernumber ++; + table [lowIndex]. transportId = transportId; + table [lowIndex]. bodySize = size; + table [lowIndex]. contentType = contentType; + table [lowIndex]. contentsubType = contentsubType; + table [lowIndex]. segmentSize = -1; + table [lowIndex]. numofSegments = -1; + table [lowIndex]. name = name; +} +// +// handling an entry in a directory is +void motHandler::newEntry (int16_t index, + uint16_t transportId, + int16_t size, + int16_t contentType, + int16_t contentsubType, + QString name) { +motElement *currEntry = &(theDirectory -> dir_proper [index]); + currEntry -> ordernumber = ordernumber ++; + currEntry -> transportId = transportId; + currEntry -> bodySize = size; + currEntry -> contentType = contentType; + currEntry -> contentsubType = contentsubType; + currEntry -> segmentSize = -1; + currEntry -> numofSegments = -1; + currEntry -> name = QString (name); +} + diff --git a/src/backend/data/mot-databuilder.cpp b/src/backend/data/mot-databuilder.cpp new file mode 100644 index 0000000..a88a80f --- /dev/null +++ b/src/backend/data/mot-databuilder.cpp @@ -0,0 +1,96 @@ +# +/* + * Copyright (C) 2015 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +// +// Interface between msc packages and real MOT handling +#include "mot-databuilder.h" +#include "mot-data.h" +#include "radio.h" + + mot_databuilder::mot_databuilder (RadioInterface *mr, + QString picturesPath) { + my_motHandler = new motHandler (mr, picturesPath); +} + + mot_databuilder::~mot_databuilder (void) { +} + +void mot_databuilder::add_mscDatagroup (std::vector msc) { +uint8_t *data = (uint8_t *)(msc. data ()); +bool extensionFlag = getBits_1 (data, 0) != 0; +bool crcFlag = getBits_1 (data, 1) != 0; +bool segmentFlag = getBits_1 (data, 2) != 0; +bool userAccessFlag = getBits_1 (data, 3) != 0; +uint8_t groupType = getBits_4 (data, 4); +uint8_t CI = getBits_4 (data, 8); +int32_t next = 16; // bits +bool lastSegment = false; +uint16_t segmentNumber = 0; +bool transportIdFlag = false; +uint16_t transportId = 0; +uint8_t lengthInd; +int32_t i; + + (void)CI; + if (msc. size () <= 0) { + return; + } + + if (crcFlag && !check_CRC_bits (data, msc.size ())) + return; + + if (extensionFlag) + next += 16; + + if (segmentFlag) { + lastSegment = getBits_1 (data, next) != 0; + segmentNumber = getBits (data, next + 1, 15); + next += 16; + } + + if (userAccessFlag) { + transportIdFlag = getBits_1 (data, next + 3); + lengthInd = getBits_4 (data, next + 4); + next += 8; + if (transportIdFlag) { + transportId = getBits (data, next, 16); + } + next += lengthInd * 8; + } + + int32_t sizeinBits = + msc. size () - next - (crcFlag != 0 ? 16 : 0); + + if (transportIdFlag) { + std::vector motVector; + motVector. resize (sizeinBits / 8); + for (i = 0; i < sizeinBits / 8; i ++) + motVector [i] = getBits_8 (data, next + 8 * i); + + my_motHandler -> + process_mscGroup (motVector. data (), + groupType, + lastSegment, + segmentNumber, + transportId); + } +} + diff --git a/src/backend/data/pad-handler.cpp b/src/backend/data/pad-handler.cpp new file mode 100644 index 0000000..9bdff84 --- /dev/null +++ b/src/backend/data/pad-handler.cpp @@ -0,0 +1,445 @@ +# +/* + * Copyright (C) 2015 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "pad-handler.h" +#include +#include "radio.h" +#include "charsets.h" +#include "mot-data.h" +/** + * \class padHandler + * Handles the pad segments passed on from mp2- and mp4Processor + */ + padHandler::padHandler (RadioInterface *mr, QString picturesPath) { + myRadioInterface = mr; + connect (this, SIGNAL (showLabel (QString)), + mr, SLOT (showLabel (QString))); + connect (this, SIGNAL (show_motHandling (bool)), + mr, SLOT (show_motHandling (bool))); + my_motHandler = new motHandler (mr, picturesPath); +// +// mscGroupElement indicates whether we are handling an +// msc datagroup or not. + mscGroupElement = false; + dataGroupLength = 0; + +// xpadLength tells - if mscGroupElement is "on" - the size of the +// xpadfields, needed for handling xpads without CI's + xpadLength = -1; +// +// and for the shortPad we maintain + still_to_go = 0; + lastSegment = false; + firstSegment = false; + segmentNumber = -1; +} + + padHandler::~padHandler (void) { + delete my_motHandler; +} + +// Data is stored reverse, we pass the vector and the index of the +// last element of the XPad data. +// L0 is the "top" byte of the L field, L1 the next to top one. +void padHandler::processPAD (uint8_t *buffer, int16_t last, + uint8_t L1, uint8_t L0) { +uint8_t fpadType = (L1 >> 6) & 03; + + if (fpadType != 00) + return; +// +// OK, we'll try + + uint8_t x_padInd = (L1 >> 4) & 03; + uint8_t CI_flag = L0 & 02; + + switch (x_padInd) { + default: + break; + + case 01 : + handle_shortPAD (buffer, last, CI_flag); + break; + + case 02: + handle_variablePAD (buffer, last, CI_flag); + break; + } +} +// Since the data is stored in reversed order, we pass +// on the vector address and the offset of the last element +// in that vector +// +// shortPad's are 4 byte values. If the CI is on, then the type 2 +// indicates the start of a segment. Type 3 the continuation. +// The start of a message, i.e. segment 0 is (a.o) found by +// a (1, 0) value of the firstSegment/lastSegment values. +// The end of a segment might be indicated by a specific pattern +// of these 2 values, but it is not clear to me how. +// For me, the end of a segment is when we collected the amount +// of values specified for the segment. +void padHandler::handle_shortPAD (uint8_t *b, int16_t last, uint8_t CIf) { +int16_t i; + + if (CIf != 0) { // has a CI flag + uint8_t CI = b [last]; + firstSegment = (b [last - 1] & 0x40) != 0; + lastSegment = (b [last - 1] & 0x20) != 0; + charSet = b [last - 2] & 0x0F; + uint8_t AcTy = CI & 037; // application type +// fprintf (stderr, "type %d, firstS %d, lastS %d\n", +// AcTy, firstSegment, lastSegment); + switch (AcTy) { + default: + break; + + case 0: // end marker + break; +// + case 3: // continuation of fragment + for (i = 0; (i < 3) && (still_to_go > 0); i ++) { + still_to_go --; + shortpadData. push_back (b [last - 1 - i]); + } + + if ((still_to_go <= 0) && (shortpadData. size () > 1)) { + shortpadData. push_back (0); + dynamicLabelText. + append (toQStringUsingCharset + ((char *)(shortpadData. data ()), + (CharacterSet)charSet, + shortpadData. size ())); + shortpadData. resize (0); + } + break; + + case 2: // start of fragment, extract the length + if (firstSegment && !lastSegment) { + segmentNumber = b [last - 2] >> 4; + if (dynamicLabelText. size () > 0) + showLabel (dynamicLabelText); + dynamicLabelText. clear (); + } + still_to_go = b [last - 1] & 0x0F; + shortpadData. resize (0); + shortpadData. push_back (b [last - 3]); + break; + } + } + else { // No CI flag + // X-PAD field is all data + for (i = 0; (i < 4) && (still_to_go > 0); i ++) { + shortpadData. push_back (b [last - i]); + still_to_go --; + } +// at the end of a frame + if ((still_to_go <= 0) && (shortpadData. size () > 0)) { + shortpadData . push_back (0); +// +// just to avoid doubling by unsollicited shortpads + dynamicLabelText. + append (toQStringUsingCharset ((char *)(shortpadData. data ()), + (CharacterSet)charSet)); + shortpadData. resize (0); +// if we are at the end of the last segment (and the text is not empty) +// then show it. + if (!firstSegment && lastSegment) { + if (dynamicLabelText. size () > 0) + showLabel (dynamicLabelText); + dynamicLabelText. clear (); + } + } + } +} +/////////////////////////////////////////////////////////////////////// +// +// Here we end up when F_PAD type = 00 and X-PAD Ind = 02 +static +int16_t lengthTable [] = {4, 6, 8, 12, 16, 24, 32, 48}; + +// Since the data is reversed, we pass on the vector address +// and the offset of the last element in the vector, +// i.e. we start (downwards) beginning at b [last]; +void padHandler::handle_variablePAD (uint8_t *b, + int16_t last, uint8_t CI_flag) { +int16_t CI_Index = 0; +uint8_t CI_table [4]; +int16_t i, j; +int16_t base = last; +std::vector data; // for the local addition + +// If an xpadfield shows with a CI_flag == 0, and if we are +// dealing with an msc field, the size to be taken is +// the size of the latest xpadfield that had a CI_flag != 0 + if (CI_flag == 0) { + if (mscGroupElement && (xpadLength > 0)) { + data. resize (xpadLength); + for (j = 0; j < xpadLength; j ++) + data [j] = b [last - j]; + add_MSC_element (data); + } + return; + } +// +// The CI flag in the F_PAD data is set, so we have local CI's +// 7.4.2.2: Contents indicators are one byte long + + while (((b [base] & 037) != 0) && (CI_Index < 4)) + CI_table [CI_Index ++] = b [base --]; + + if (CI_Index < 4) // we have a "0" indicator, adjust base + base -= 1; + +// The space for the CI's does belong to the Cpadfield, so +// but do not forget to take into account the '0'field if CI_Index < 4 + if (mscGroupElement) { + xpadLength = 0; + for (i = 0; i < CI_Index; i ++) + xpadLength += lengthTable [CI_table [i] >> 5]; + xpadLength += CI_Index == 4 ? 4 : CI_Index + 1; + } +// +// Handle the contents + for (i = 0; i < CI_Index; i ++) { + uint8_t appType = CI_table [i] & 037; + int16_t length = lengthTable [CI_table [i] >> 5]; + if (appType == 1) { + dataGroupLength = ((b [base] & 077) << 8) | b [base - 1]; + base -= 4; + last_appType = 1; + continue; + } + +// collect data, reverse the reversed bytes + data. resize (length); + for (j = 0; j < length; j ++) + data [j] = b [base - j]; + + switch (appType) { + default: + return; // sorry, we do not handle this + + case 2: // Dynamic label segment, start of X-PAD data group + case 3: // Dynamic label segment, continuation of X-PAD data group + dynamicLabel ((uint8_t *)(data. data ()), + data. size (), CI_table [i]); + break; + + case 12: // MOT, start of X-PAD data group + new_MSC_element (data, dataGroupLength); + break; + + case 13: // MOT, continuation of X-PAD data group + add_MSC_element (data); + break; + } + + last_appType = appType; + base -= length; + if (base < 0 && i < CI_Index - 1) { + fprintf (stderr, "Hier gaat het fout, base = %d\n", base); + return; + } + } +} +// +// A dynamic label is created from a sequence of (dynamic) xpad +// fields, starting with CI = 2, continuing with CI = 3 +void padHandler::dynamicLabel (uint8_t *data, int16_t length, uint8_t CI) { +static int16_t segmentno = 0; +static int16_t remainDataLength = 0; +static bool isLastSegment = false; +static bool moreXPad = false; +int16_t dataLength = 0; + + if ((CI & 037) == 02) { // start of segment + uint16_t prefix = (data [0] << 8) | data [1]; + uint8_t field_1 = (prefix >> 8) & 017; + uint8_t Cflag = (prefix >> 12) & 01; + uint8_t first = (prefix >> 14) & 01; + uint8_t last = (prefix >> 13) & 01; + dataLength = length - 2; // The length with header removed + + if (first) { + segmentno = 1; + charSet = (prefix >> 4) & 017; + dynamicLabelText. clear (); + } + else + segmentno = ((prefix >> 4) & 07) + 1; + + if (Cflag) { // special dynamic label command + // the only specified command is to clear the display + dynamicLabelText. clear (); + } + else { // Dynamic text length + int16_t totalDataLength = field_1 + 1; + if (length - 2 < totalDataLength) { + dataLength = length - 2; // the length is shortened by header + moreXPad = true; + } + else { + dataLength = totalDataLength; // no more xpad app's 3 + moreXPad = false; + } + +// convert dynamic label + QString segmentText = toQStringUsingCharset ( + (const char *)&data [2], + (CharacterSet) charSet, + dataLength); + + dynamicLabelText. append (segmentText); + +// if at the end, show the label + if (last) { + if (!moreXPad) { + showLabel (dynamicLabelText); + + } + else + isLastSegment = true; + } + else + isLastSegment = false; +// calculate remaining data length + remainDataLength = totalDataLength - dataLength; + } + } + else + if (((CI & 037) == 03) && moreXPad) { + if (remainDataLength > length) { + dataLength = length; + remainDataLength -= length; + } + else { + dataLength = remainDataLength; + moreXPad = false; + } + + QString segmentText = toQStringUsingCharset ( + (const char *) data, + (CharacterSet) charSet, + dataLength); + dynamicLabelText. append (segmentText); + if (!moreXPad && isLastSegment) { + showLabel (dynamicLabelText); + } + } +} + +// +// Called at the start of the msc datagroupfield, +// the msc_length was given by the preceding appType "1" +void padHandler::new_MSC_element (std::vector data, + int msc_length) { + mscGroupElement = true; + msc_dataGroupBuffer. clear (); + msc_dataGroupBuffer = data; + msc_dataGroupLength = msc_length; + show_motHandling (true); +} + +// +void padHandler::add_MSC_element (std::vector data) { +int16_t i; +int16_t currentLength = msc_dataGroupBuffer. size (); +// +// just to ensure that, when a "12" appType is missing, the +// data of "13" appType elements is not endless collected. + if (currentLength == 0) + return; + + msc_dataGroupBuffer. insert (std::end (msc_dataGroupBuffer), + std::begin (data), std::end (data)); + if (msc_dataGroupBuffer. size () >= msc_dataGroupLength) { + build_MSC_segment (msc_dataGroupBuffer, msc_dataGroupLength); + msc_dataGroupBuffer. clear (); +// mscGroupElement = false; + xpadLength = -1; + show_motHandling (false); + } +} + +void padHandler::build_MSC_segment (std::vector data, + int msc_length) { +// we have a MOT segment, let us look what is in it +// according to DAB 300 401 (page 37) the header (MSC data group) +// is +int16_t size = data. size (); + + uint8_t groupType = data [0] & 0xF; + uint8_t continuityIndex = (data [1] & 0xF0) >> 4; + uint8_t repetitionIndex = data [1] & 0xF; + int16_t segmentNumber = -1; // default + int16_t transportId = -1; // default + bool lastFlag = false; // default + uint16_t index; + + if ((data [0] & 0x40) != 0) { + bool res = check_crc_bytes (data. data (), msc_length - 2); + if (!res) { +// fprintf (stderr, "crc failed "); + return; + } +// else +// fprintf (stderr, "crc success "); + } + + if ((groupType != 3) && (groupType != 4)) + return; // do not know yet + +// extensionflag + bool extensionFlag = (data [0] & 0x80) != 0; +// if the segmentflag is on, then a lastflag and segmentnumber are +// available, i.e. 2 bytes more + index = extensionFlag ? 4 : 2; + bool segmentFlag = (data [0] & 0x20) != 0; + if ((segmentFlag) != 0) { + lastFlag = data [index] & 0x80; + segmentNumber = ((data [index] & 0x7F) << 8) | data [index + 1]; + index += 2; + } + +// if the user access flag is on there is a user accessfield + if ((data [0] & 0x10) != 0) { + int16_t lengthIndicator = data [index] & 0x0F; + if ((data [index] & 0x10) != 0) { //transportid flag + transportId = data [index + 1] << 8 | + data [index + 2]; + index += 3; + } + else { + fprintf (stderr, "sorry no transportId\n"); + return; + } + index += (lengthIndicator - 2); + } + +// the segment is handled by the mot handler, which also +// handles the MOT's from the regular data services + my_motHandler -> process_mscGroup (&data [index], + groupType, + lastFlag, + segmentNumber, + transportId); +} + diff --git a/src/backend/data/virtual-datahandler.cpp b/src/backend/data/virtual-datahandler.cpp new file mode 100644 index 0000000..9ad99b9 --- /dev/null +++ b/src/backend/data/virtual-datahandler.cpp @@ -0,0 +1,36 @@ +# +/* + * Copyright (C) 2015 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "virtual-datahandler.h" + + virtual_dataHandler::virtual_dataHandler (void) { +} + + virtual_dataHandler::~virtual_dataHandler (void) { +} + +void virtual_dataHandler::add_mscDatagroup (std::vector m) { + (void)m; + fprintf (stderr, "fout"); +} + diff --git a/src/backend/eep-protection.cpp b/src/backend/eep-protection.cpp new file mode 100644 index 0000000..29a4aa2 --- /dev/null +++ b/src/backend/eep-protection.cpp @@ -0,0 +1,165 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * The eep handling + */ +#include +#include "dab-constants.h" +#include "eep-protection.h" +#include "protTables.h" + +/** + * \brief eep_deconvolve + * equal error protection, bitRate and protLevel + * define the puncturing table + */ + eep_protection::eep_protection (int16_t bitRate, + int16_t protLevel): + protection (bitRate, protLevel) { +int16_t i, j; +int16_t viterbiCounter = 0; +int16_t L1, L2; +int8_t *PI1, *PI2, *PI_X; + + if ((protLevel & (1 << 2)) == 0) { // set A profiles + switch (protLevel & 03) { + case 0: // actually level 1 + L1 = 6 * bitRate / 8 - 3; + L2 = 3; + PI1 = get_PCodes (24 - 1); + PI2 = get_PCodes (23 - 1); + break; + + case 1: // actually level 2 + if (bitRate == 8) { + L1 = 5; + L2 = 1; + PI1 = get_PCodes (13 - 1); + PI2 = get_PCodes (12 - 1); + } else { + L1 = 2 * bitRate / 8 - 3; + L2 = 4 * bitRate / 8 + 3; + PI1 = get_PCodes (14 - 1); + PI2 = get_PCodes (13 - 1); + } + break; + + case 2: // actually level 3 + L1 = 6 * bitRate / 8 - 3; + L2 = 3; + PI1 = get_PCodes (8 - 1); + PI2 = get_PCodes (7 - 1); + break; + + case 3: // actually level 4 + L1 = 4 * bitRate / 8 - 3; + L2 = 2 * bitRate / 8 + 3; + PI1 = get_PCodes (3 - 1); + PI2 = get_PCodes (2 - 1); + break; + } + } + else + if ((protLevel & (1 << 2)) != 0) { // B series + switch ((protLevel & 03)) { + case 3: // actually level 4 + L1 = 24 * bitRate / 32 - 3; + L2 = 3; + PI1 = get_PCodes (2 - 1); + PI2 = get_PCodes (1 - 1); + break; + + case 2: // actually level 3 + L1 = 24 * bitRate / 32 - 3; + L2 = 3; + PI1 = get_PCodes (4 - 1); + PI2 = get_PCodes (3 - 1); + break; + + case 1: // actually level 2 + L1 = 24 * bitRate / 32 - 3; + L2 = 3; + PI1 = get_PCodes (6 - 1); + PI2 = get_PCodes (5 - 1); + break; + + case 0: // actually level 1 + L1 = 24 * bitRate / 32 - 3; + L2 = 3; + PI1 = get_PCodes (10 - 1); + PI2 = get_PCodes (9 - 1); + break; + } + } + PI_X = get_PCodes (8 - 1); + + memset (indexTable. data (), 0, + (outSize * 4 + 24) * sizeof (uint8_t)); +// +// according to the standard we process the logical frame +// with a pair of tuples +// (L1, PI1), (L2, PI2) +// + for (i = 0; i < L1; i ++) { + for (j = 0; j < 128; j ++) { + if (PI1 [j % 32] != 0) + indexTable [viterbiCounter] = true; + viterbiCounter ++; + } + } + + for (i = 0; i < L2; i ++) { + for (j = 0; j < 128; j ++) { + if (PI2 [j % 32] != 0) + indexTable [viterbiCounter] = true; + viterbiCounter ++; + } + } +// we had a final block of 24 bits with puncturing according to PI_X +// This block constitues the 6 * 4 bits of the register itself. + for (i = 0; i < 24; i ++) { + if (PI_X [i] != 0) + indexTable [viterbiCounter] = true; + viterbiCounter ++; + } +} + + eep_protection::~eep_protection (void) { +} + +bool eep_protection::deconvolve (int16_t *v, + int32_t size, + uint8_t *outBuffer) { + +int16_t i; +int16_t inputCounter = 0; + (void)size; // size was known already + + memset (viterbiBlock. data (), 0, + (outSize * 4 + 24) * sizeof (int16_t)); + for (i = 0; i < outSize * 4 + 24; i ++) + if (indexTable [i]) + viterbiBlock [i] = v [inputCounter ++]; + + viterbi_768::deconvolve (viterbiBlock. data (), outBuffer); + return true; +} + diff --git a/src/backend/fib-processor.cpp b/src/backend/fib-processor.cpp new file mode 100644 index 0000000..4b1b4f4 --- /dev/null +++ b/src/backend/fib-processor.cpp @@ -0,0 +1,1472 @@ +# +/* + * Copyright (C) 2014 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * fib processor. Functionality is shared between fic handler, i.e. the + * one preparing the FIC blocks for processing, and the mainthread + * from which calls are coming on selecting a program + */ +#include "fib-processor.h" +#include +#include +#include "radio.h" +#include "charsets.h" +// +// +// Tabelle ETSI EN 300 401 Page 50 +// Table is copied from the work of Michael Hoehn + const int ProtLevel[64][3] = {{16,5,32}, // Index 0 + {21,4,32}, + {24,3,32}, + {29,2,32}, + {35,1,32}, // Index 4 + {24,5,48}, + {29,4,48}, + {35,3,48}, + {42,2,48}, + {52,1,48}, // Index 9 + {29,5,56}, + {35,4,56}, + {42,3,56}, + {52,2,56}, + {32,5,64}, // Index 14 + {42,4,64}, + {48,3,64}, + {58,2,64}, + {70,1,64}, + {40,5,80}, // Index 19 + {52,4,80}, + {58,3,80}, + {70,2,80}, + {84,1,80}, + {48,5,96}, // Index 24 + {58,4,96}, + {70,3,96}, + {84,2,96}, + {104,1,96}, + {58,5,112}, // Index 29 + {70,4,112}, + {84,3,112}, + {104,2,112}, + {64,5,128}, + {84,4,128}, // Index 34 + {96,3,128}, + {116,2,128}, + {140,1,128}, + {80,5,160}, + {104,4,160}, // Index 39 + {116,3,160}, + {140,2,160}, + {168,1,160}, + {96,5,192}, + {116,4,192}, // Index 44 + {140,3,192}, + {168,2,192}, + {208,1,192}, + {116,5,224}, + {140,4,224}, // Index 49 + {168,3,224}, + {208,2,224}, + {232,1,224}, + {128,5,256}, + {168,4,256}, // Index 54 + {192,3,256}, + {232,2,256}, + {280,1,256}, + {160,5,320}, + {208,4,320}, // index 59 + {280,2,320}, + {192,5,384}, + {280,3,384}, + {416,1,384}}; + +// + fib_processor::fib_processor (RadioInterface *mr) { + myRadioInterface = mr; + + memset (dateTime, 0, sizeof (dateTime)); + dateFlag = false; + clearEnsemble (); + connect (this, SIGNAL (addtoEnsemble (const QString &)), + myRadioInterface, SLOT (addtoEnsemble (const QString &))); + connect (this, SIGNAL (nameofEnsemble (int, const QString &)), + myRadioInterface, SLOT (nameofEnsemble (int, const QString &))); + + connect (this, SIGNAL (changeinConfiguration (void)), + myRadioInterface, SLOT (changeinConfiguration (void))); + + CIFcount = 0; +} + + fib_processor::~fib_processor (void) { +} + +void fib_processor::newFrame (void) { + CIFcount ++; + } + +// +// FIB's are segments of 256 bits. When here, we already +// passed the crc and we start unpacking into FIGs +// This is merely a dispatcher +void fib_processor::process_FIB (uint8_t *p, uint16_t fib) { +uint8_t FIGtype; +int8_t processedBytes = 0; +uint8_t *d = p; + + fibLocker. lock (); + (void)fib; + while (processedBytes < 30) { + FIGtype = getBits_3 (d, 0); + switch (FIGtype) { + case 0: + process_FIG0 (d); + break; + + case 1: + process_FIG1 (d); + break; + + case 7: + break; + + default: +// fprintf (stderr, "FIG%d aanwezig\n", FIGtype); + break; + } +// +// Thanks to Ronny Kunze, who discovered that I used +// a p rather than a d + processedBytes += getBits_5 (d, 3) + 1; +// processedBytes += getBits (p, 3, 5) + 1; + d = p + processedBytes * 8; + } + fibLocker. unlock (); +} +// +// Handle ensemble is all through FIG0 +// +void fib_processor::process_FIG0 (uint8_t *d) { +uint8_t extension = getBits_5 (d, 8 + 3); +//uint8_t CN = getBits_1 (d, 8 + 0); + + switch (extension) { + case 0: + FIG0Extension0 (d); + break; + + case 1: + FIG0Extension1 (d); + break; + + case 2: + FIG0Extension2 (d); + break; + + case 3: + FIG0Extension3 (d); + break; + + case 4: + FIG0Extension4 (d); + break; + + case 5: + FIG0Extension5 (d); + break; + + case 6: + FIG0Extension6 (d); + break; + + case 7: + FIG0Extension7 (d); + break; + + case 8: + FIG0Extension8 (d); + break; + + case 9: + FIG0Extension9 (d); + break; + + case 10: + FIG0Extension10 (d); + break; + + case 11: + FIG0Extension11 (d); + break; + + case 12: + FIG0Extension12 (d); + break; + + case 13: + FIG0Extension13 (d); + break; + + case 14: + FIG0Extension14 (d); + break; + + case 15: + FIG0Extension15 (d); + break; + + case 16: + FIG0Extension16 (d); + break; + + case 17: + FIG0Extension17 (d); + break; + + case 18: + FIG0Extension18 (d); + break; + + case 19: + FIG0Extension19 (d); + break; + + case 20: + FIG0Extension20 (d); + break; + + case 21: + FIG0Extension21 (d); + break; + + case 22: + FIG0Extension22 (d); + break; + + case 23: + FIG0Extension23 (d); + break; + + case 24: + FIG0Extension24 (d); + break; + + case 25: + FIG0Extension25 (d); + break; + + case 26: + FIG0Extension26 (d); + break; + + default: +// fprintf (stderr, "FIG0/%d passed by\n", extension); + break; + } +} + +// Ensemble information, 6.4.1 +// FIG0/0 indicated a change in channel organization +// we are not equipped for that, so we just return +// control to the init. +void fib_processor::FIG0Extension0 (uint8_t *d) { +uint16_t EId; +uint8_t changeFlag; +uint16_t highpart, lowpart; +int16_t occurrenceChange; +uint8_t CN = getBits_1 (d, 8 + 0); + + (void)CN; + changeFlag = getBits_2 (d, 16 + 16); + + EId = getBits (d, 16, 16); + (void)EId; + highpart = getBits_5 (d, 16 + 19) % 20; + (void)highpart; + lowpart = getBits_8 (d, 16 + 24) % 250; + (void)lowpart; + occurrenceChange = getBits_8 (d, 16 + 32); + (void)occurrenceChange; + + if (getBits (d, 34, 1)) // only alarm, just ignore + return; + + CIFcount = highpart * 250 + lowpart; + if (changeFlag == 0) + return; + +// if (changeFlag == 1) { +// fprintf (stderr, "Changes in sub channel organization\n"); +// fprintf (stderr, "cifcount = %d\n", highpart * 250 + lowpart); +// fprintf (stderr, "Change happening in %d CIFs\n", occurrenceChange); +// } +// else if (changeFlag == 3) { +// fprintf (stderr, "Changes in subchannel and service organization\n"); +// fprintf (stderr, "cifcount = %d\n", highpart * 250 + lowpart); +// fprintf (stderr, "Change happening in %d CIFs\n", occurrenceChange); +// } + +// fprintf (stderr, "changes in config not supported, choose again\n"); + if (CIFcount == occurrenceChange) { + emit changeinConfiguration (); + } +} +// +// Subchannel organization 6.2.1 +// FIG0 extension 1 creates a mapping between the +// sub channel identifications and the positions in the +// relevant CIF. +void fib_processor::FIG0Extension1 (uint8_t *d) { +int16_t used = 2; // offset in bytes +int16_t Length = getBits_5 (d, 3); +uint8_t PD_bit = getBits_1 (d, 8 + 2); +//uint8_t CN = getBits_1 (d, 8 + 0); + + while (used < Length - 1) + used = HandleFIG0Extension1 (d, used, PD_bit); +} +// +// defining the channels +int16_t fib_processor::HandleFIG0Extension1 (uint8_t *d, + int16_t offset, + uint8_t pd) { +int16_t bitOffset = offset * 8; +int16_t SubChId = getBits_6 (d, bitOffset); +int16_t startAdr = getBits (d, bitOffset + 6, 10); +int16_t tabelIndex; +int16_t option, protLevel, subChanSize; + + (void)pd; // not used right now, maybe later + subChannels [SubChId]. startAddr = startAdr; + subChannels [SubChId]. inUse = true; + + if (getBits_1 (d, bitOffset + 16) == 0) { // short form + tabelIndex = getBits_6 (d, bitOffset + 18); + subChannels [SubChId]. Length = ProtLevel [tabelIndex][0]; + subChannels [SubChId]. shortForm = true; // short form + subChannels [SubChId]. protLevel = ProtLevel [tabelIndex][1]; + subChannels [SubChId]. bitRate = ProtLevel [tabelIndex][2]; + bitOffset += 24; + } + else { // EEP long form + subChannels [SubChId]. shortForm = false; + option = getBits_3 (d, bitOffset + 17); + if (option == 0) { // A Level protection + protLevel = getBits (d, bitOffset + 20, 2); +// + subChannels [SubChId]. protLevel = protLevel; + subChanSize = getBits (d, bitOffset + 22, 10); + subChannels [SubChId]. Length = subChanSize; + if (protLevel == 0) + subChannels [SubChId]. bitRate = subChanSize / 12 * 8; + if (protLevel == 1) + subChannels [SubChId]. bitRate = subChanSize / 8 * 8; + if (protLevel == 2) + subChannels [SubChId]. bitRate = subChanSize / 6 * 8; + if (protLevel == 3) + subChannels [SubChId]. bitRate = subChanSize / 4 * 8; + } + else // option should be 001 + if (option == 001) { // B Level protection + protLevel = getBits_2 (d, bitOffset + 20); + subChannels [SubChId]. protLevel = protLevel + (1 << 2); + subChanSize = getBits (d, bitOffset + 22, 10); + subChannels [SubChId]. Length = subChanSize; + if (protLevel == 0) + subChannels [SubChId]. bitRate = subChanSize / 27 * 32; + if (protLevel == 1) + subChannels [SubChId]. bitRate = subChanSize / 21 * 32; + if (protLevel == 2) + subChannels [SubChId]. bitRate = subChanSize / 18 * 32; + if (protLevel == 3) + subChannels [SubChId]. bitRate = subChanSize / 15 * 32; + } + + bitOffset += 32; + } + + return bitOffset / 8; // we return bytes +} +// +// Service organization, 6.3.1 +// bind channels to serviceIds +void fib_processor::FIG0Extension2 (uint8_t *d) { +int16_t used = 2; // offset in bytes +int16_t Length = getBits_5 (d, 3); +uint8_t PD_bit = getBits_1 (d, 8 + 2); +uint8_t CN = getBits_1 (d, 8 + 0); + + while (used < Length) { + used = HandleFIG0Extension2 (d, used, CN, PD_bit); + } +} +// +// Note Offset is in bytes +// +int16_t fib_processor::HandleFIG0Extension2 (uint8_t *d, + int16_t offset, + uint8_t cn, + uint8_t pd) { +int16_t lOffset = 8 * offset; +int16_t i; +uint8_t ecc; +uint8_t cId; +uint32_t SId; +int16_t numberofComponents; + + if (pd == 1) { // long Sid + ecc = getBits_8 (d, lOffset); (void)ecc; + cId = getBits_4 (d, lOffset + 1); + SId = getLBits (d, lOffset, 32); + lOffset += 32; + } + else { + cId = getBits_4 (d, lOffset); (void)cId; + SId = getBits (d, lOffset, 16); + lOffset += 16; + } + + numberofComponents = getBits_4 (d, lOffset + 4); + lOffset += 8; + + for (i = 0; i < numberofComponents; i ++) { + uint8_t TMid = getBits_2 (d, lOffset); + if (TMid == 00) { // Audio + uint8_t ASCTy = getBits_6 (d, lOffset + 2); + uint8_t SubChId = getBits_6 (d, lOffset + 8); + uint8_t PS_flag = getBits_1 (d, lOffset + 14); + bind_audioService (TMid, SId, i, SubChId, PS_flag, ASCTy); + } + else + if (TMid == 3) { // MSC packet data + int16_t SCId = getBits (d, lOffset + 2, 12); + uint8_t PS_flag = getBits_1 (d, lOffset + 14); + uint8_t CA_flag = getBits_1 (d, lOffset + 15); + bind_packetService (TMid, SId, i, SCId, PS_flag, CA_flag); + } + else + {;} + lOffset += 16; + } + return lOffset / 8; // in Bytes +} +// +// Service component in packet mode 6.3.2 +// The Extension 3 of FIG type 0 (FIG 0/3) gives +// additional information about the service component +// description in packet mode. +void fib_processor::FIG0Extension3 (uint8_t *d) { +int16_t used = 2; +int16_t Length = getBits_5 (d, 3); + + while (used < Length) + used = HandleFIG0Extension3 (d, used); +} + +// +int16_t fib_processor::HandleFIG0Extension3 (uint8_t *d, int16_t used) { +int16_t SCId = getBits (d, used * 8, 12); +int16_t CAOrgflag = getBits_1 (d, used * 8 + 15); +int16_t DGflag = getBits_1 (d, used * 8 + 16); +int16_t DSCTy = getBits_6 (d, used * 8 + 18); +int16_t SubChId = getBits_6 (d, used * 8 + 24); +int16_t packetAddress = getBits (d, used * 8 + 30, 10); +uint16_t CAOrg = 0; + +serviceComponent *packetComp = find_packetComponent (SCId); +serviceId * service; + + if (CAOrgflag == 1) { + CAOrg = getBits (d, used * 8 + 40, 16); + used += 16 / 8; + } + used += 40 / 8; + + if (packetComp == NULL) // no serviceComponent yet + return used; +// +// We want to have the subchannel OK + if (!subChannels [SubChId]. inUse) + return used; +// +// If the component exists, we first look whether is +// was already handled + if (packetComp -> is_madePublic) + return used; +// +// if the Data Service Component Type == 0, we do not deal +// with it + if (DSCTy == 0) + return used; + + service = packetComp -> service; + QString serviceName = service -> serviceLabel. label; +// if (packetComp -> componentNr == 0) // otherwise sub component +// addtoEnsemble (serviceName); + + packetComp -> is_madePublic = true; + packetComp -> SCId = SCId; + packetComp -> subchannelId = SubChId; + packetComp -> DSCTy = DSCTy; + packetComp -> DGflag = DGflag; + packetComp -> packetAddress = packetAddress; +// even if we did not add it to the GUI, we consider it to be "public" + return used; +} + +// Service component with CA in stream mode 6.3.3 +void fib_processor::FIG0Extension4 (uint8_t *d) { +int16_t used = 3; // offset in bytes +int16_t Rfa = getBits_1 (d, 0); +int16_t Rfu = getBits_1 (d, 0 + 1); +int16_t SubChId = getBits_6 (d, 0 + 1 + 1); +int32_t CAOrg = getBits (d, 2 + 6, 16); + +// fprintf(stderr,"FIG0/4: Rfa=\t%D, Rfu=\t%d, SudChId=\t%02X, CAOrg=\t%04X\n", Rfa, Rfu, SubChId, CAOrg); +} + +// Service component language 8.1.2 +void fib_processor::FIG0Extension5 (uint8_t *d) { +int16_t used = 2; // offset in bytes +int16_t Length = getBits_5 (d, 3); + + while (used < Length) { + used = HandleFIG0Extension5 (d, used); + } +} + +int16_t fib_processor::HandleFIG0Extension5 (uint8_t* d, int16_t offset) { +int16_t loffset = offset * 8; +uint8_t lsFlag = getBits_1 (d, loffset); +int16_t subChId, serviceComp, language; + + if (lsFlag == 0) { // short form + if (getBits_1 (d, loffset + 1) == 0) { + subChId = getBits_6 (d, loffset + 2); + language = getBits_8 (d, loffset + 8); + subChannels [subChId]. language = language; + } + loffset += 16; + } + else { // long form + serviceComp = getBits (d, loffset + 4, 12); + language = getBits_8 (d, loffset + 16); + loffset += 24; + } + (void)serviceComp; + + return loffset / 8; +} +// +// FIG0/6: Service linking information 8.1.15, not implemented +void fib_processor::FIG0Extension6 (uint8_t *d) { +} +// +// FIG0/7: Configuration linking information 6.4.2, not implemented +void fib_processor::FIG0Extension7 (uint8_t *d) { +} + +void fib_processor::FIG0Extension8 (uint8_t *d) { +int16_t used = 2; // offset in bytes +int16_t Length = getBits_5 (d, 3); +uint8_t PD_bit = getBits_1 (d, 8 + 2); + + while (used < Length) { + used = HandleFIG0Extension8 (d, used, PD_bit); + } +} + +int16_t fib_processor::HandleFIG0Extension8 (uint8_t *d, int16_t used, + uint8_t pdBit) { +int16_t lOffset = used * 8; +uint32_t SId = getLBits (d, lOffset, pdBit == 1 ? 32 : 16); +uint8_t lsFlag; +uint16_t SCIds; +int16_t SCid; +int16_t Rfu; +int16_t SubChId; +uint8_t extensionFlag; + + lOffset += pdBit == 1 ? 32 : 16; + extensionFlag = getBits_1 (d, lOffset); + SCIds = getBits_4 (d, lOffset + 4); + lOffset += 8; + + lsFlag = getBits_1 (d, lOffset); +// lsFlag = getBits_1 (d, lOffset + 8); + if (lsFlag == 1) { + SCid = getBits (d, lOffset + 4, 12); + lOffset += 16; +// if (find_packetComponent ((SCIds << 4) | SCid) != NULL) { +// fprintf (stderr, "packet component bestaat !!\n"); +// } + } + else { + Rfu = getBits_1 (d, lOffset + 1); + SubChId = getBits_6 (d, lOffset + 2); + lOffset += 8; + } + if (extensionFlag) + lOffset += 8; // skip Rfa + (void)SId; + (void)SCIds; + (void)SCid; + (void)SubChId; + return lOffset / 8; +} +// +// Country, LTO & international table 8.1.3.2 +// FIG0/9 and FIG0/10 are copied from the work of +// Michael Hoehn +void fib_processor::FIG0Extension9 (uint8_t *d) { +int16_t offset = 16; +uint8_t ecc; +uint8_t tableId; + + dateTime [6] = (getBits_1 (d, offset + 2) == 1)? + -1 * getBits_4 (d, offset + 3): + getBits_4 (d, offset + 3); + dateTime [7] = (getBits_1 (d, offset + 7) == 1)? 30 : 0; + + ecc = getBits (d, offset + 8, 8); + if (!ensemble_Descriptor. ecc_Present) { + ensemble_Descriptor. ecc_byte = ecc; + ensemble_Descriptor. ecc_Present = true; + } +} + +// +// Date and Time +void fib_processor::FIG0Extension10 (uint8_t *fig) { +int16_t offset = 16; +int32_t mjd = getLBits (fig, offset + 1, 17); +// Modified Julian Date umrechnen (Nach wikipedia) +int32_t J = mjd + 2400001; +int32_t j = J + 32044; +int32_t g = j / 146097; +int32_t dg = j % 146097; +int32_t c = ((dg / 36524) + 1) * 3 / 4; +int32_t dc = dg - c * 36524; +int32_t b = dc / 1461; +int32_t db = dc%1461; +int32_t a = ((db / 365) + 1) * 3 / 4; +int32_t da = db - a * 365; +int32_t y = g * 400 + c * 100 + b * 4 + a; +int32_t m = ((da * 5 + 308) / 153) - 2; +int32_t d = da - ((m + 4) * 153 / 5) + 122; +int32_t Y = y - 4800 + ((m + 2) / 12); +int32_t M = ((m + 2) % 12) + 1; +int32_t D = d + 1; + + dateTime [0] = Y; // Jahr + dateTime [1] = M; // Monat + dateTime [2] = D; // Tag + dateTime [3] = getBits_5 (fig, offset + 21); // Stunden + if (getBits_6 (fig, offset + 26) != dateTime [4]) + dateTime [5] = 0; // Sekunden (Uebergang abfangen) + + dateTime [4] = getBits_6 (fig, offset + 26); // Minuten + if (fig [offset + 20] == 1) + dateTime [5] = getBits_6 (fig, offset + 32); // Sekunden + dateFlag = true; +} +// +// +void fib_processor::FIG0Extension11 (uint8_t *d) { + (void)d; +} +// +// +void fib_processor::FIG0Extension12 (uint8_t *d) { + (void)d; +} +// +// User Application Information 6.3.6 +void fib_processor::FIG0Extension13 (uint8_t *d) { +int16_t used = 2; // offset in bytes +int16_t Length = getBits_5 (d, 3); +uint8_t PD_bit = getBits_1 (d, 8 + 2); + + while (used < Length) + used = HandleFIG0Extension13 (d, used, PD_bit); +} + +int16_t fib_processor::HandleFIG0Extension13 (uint8_t *d, + int16_t used, + uint8_t pdBit) { +int16_t lOffset = used * 8; +uint32_t SId = getLBits (d, lOffset, pdBit == 1 ? 32 : 16); +uint16_t SCId; +int16_t NoApplications; +int16_t i; +int16_t appType; +serviceId *s = findServiceId (SId); + + lOffset += pdBit == 1 ? 32 : 16; + SCId = getBits_4 (d, lOffset); + NoApplications = getBits_4 (d, lOffset + 4); + lOffset += 8; + + for (i = 0; i < NoApplications; i ++) { + appType = getBits (d, lOffset, 11); + int16_t length = getBits_5 (d, lOffset + 11); + lOffset += (11 + 5 + 8 * length); +; + serviceComponent *packetComp = + find_serviceComponent (SId, SCId); + if (packetComp != NULL) + packetComp -> appType = appType; + } + + return lOffset / 8; +} + +// FEC sub-channel organization 6.2.2 +void fib_processor::FIG0Extension14 (uint8_t *d) { +int16_t Length = getBits_5 (d, 3); // in Bytes +int16_t used = 2; // in Bytes +int16_t i; + + while (used < Length) { + int16_t SubChId = getBits_6 (d, used * 8); + uint8_t FEC_scheme = getBits_2 (d, used * 8 + 6); + used = used + 1; + + for (i = 0; i < 64; i ++) { + if (subChannels [i]. SubChId == SubChId) { + subChannels [i]. FEC_scheme = FEC_scheme; + } + } + } +} + +void fib_processor::FIG0Extension15 (uint8_t *d) { + (void)d; +} +// +// Obsolete in ETSI EN 300 401 V2.1.1 (2017-01) +void fib_processor::FIG0Extension16 (uint8_t *d) { +int16_t length = getBits_5 (d, 3); // in bytes +int16_t offset = 16; // in bits +serviceId *s; + + while (offset < length * 8) { + uint16_t SId = getBits (d, offset, 16); + s = findServiceId (SId); + if (s -> pNum < 0) { + uint8_t pNum = getBits (d, offset + 16, 16); + s -> pNum = pNum; +// fprintf (stderr, "Program number info SId = %.8X, PNum = %d\n", +// SId, pNum); + } + offset += 72; + } +} + +// +// Programme Type (PTy) 8.1.5 +void fib_processor::FIG0Extension17 (uint8_t *d) { +int16_t length = getBits_5 (d, 3); +int16_t offset = 16; +serviceId *s; + + while (offset < length * 8) { + uint16_t SId = getBits (d, offset, 16); + bool L_flag = getBits_1 (d, offset + 18); + bool CC_flag = getBits_1 (d, offset + 19); + int16_t type; + int16_t Language = 0x00; // init with unknown language + s = findServiceId (SId); + if (L_flag) { // language field present + Language = getBits_8 (d, offset + 24); + s -> language = Language; + offset += 8; + } + + type = getBits_5 (d, offset + 27); + s -> programType = type; + if (CC_flag) // cc flag + offset += 40; + else + offset += 32; + } +} + +// +// Announcement support 8.1.6.1 +void fib_processor::FIG0Extension18 (uint8_t *d) { +int16_t offset = 16; // bits +uint16_t SId, AsuFlags; +int16_t Length = getBits_5 (d, 3); + + while (offset / 8 < Length - 1 ) { + int16_t NumClusters = getBits_5 (d, offset + 35); + SId = getBits (d, offset, 16); + AsuFlags = getBits (d, offset + 16, 16); +// fprintf (stderr, "Announcement %d for SId %d with %d clusters\n", +// AsuFlags, SId, NumClusters); + offset += 40 + NumClusters * 8; + } + (void)SId; + (void)AsuFlags; +} +// +// Announcement switching 8.1.6.2 +void fib_processor::FIG0Extension19 (uint8_t *d) { +int16_t offset = 16; // bits +uint16_t AswFlags; +int16_t Length = getBits_5 (d, 3); +uint8_t region_Id_Lower; + + while (offset / 8 < Length - 1) { + uint8_t ClusterId = getBits_8 (d, offset); + bool new_flag = getBits_1(d, offset + 24); + bool region_flag = getBits_1 (d, offset + 25); + uint8_t SubChId = getBits_6 (d, offset + 26); + + AswFlags = getBits (d, offset + 8, 16); +// fprintf (stderr, +// "%s %s Announcement %d for Cluster %2u on SubCh %2u ", +// ((new_flag==1)?"new":"old"), +// ((region_flag==1)?"regional":""), +// AswFlags, ClusterId,SubChId); + if (region_flag) { + region_Id_Lower = getBits_6 (d, offset + 34); + offset += 40; +// fprintf(stderr,"for region %u",region_Id_Lower); + } + else + offset += 32; + +// fprintf(stderr,"\n"); + (void)ClusterId; + (void)new_flag; + (void)SubChId; + } + (void)AswFlags; + (void)region_Id_Lower; +} + +// Service component information 8.1.4 +void fib_processor::FIG0Extension20 (uint8_t *d) { + (void)d; +} +// +// Frequency information (FI) 8.1.8 +void fib_processor::FIG0Extension21 (uint8_t *d) { +int16_t length = getBits_5 (d, 3); +int16_t offset = 16; +int16_t Rfa = getBits (d, offset, 11); +int16_t Llength = getBits (d, offset + 11, 5); + offset += 16; +// fprintf (stderr, "Rfa = %d, Llength = %d\n", Rfa, Llength); +} + +// +// Obsolete in ETSI EN 300 401 V2.1.1 (2017-01) +void fib_processor::FIG0Extension22 (uint8_t *d) { + (void)d; +} + +// +// Now obsolete + +void fib_processor::FIG0Extension23 (uint8_t *d) { + (void)d; +} +// +// OE Services +void fib_processor::FIG0Extension24 (uint8_t *d) { + (void)d; +} +// +// OE Announcement support +void fib_processor::FIG0Extension25 (uint8_t *d) { + (void)d; +} +// +// OE Announcement Switching +void fib_processor::FIG0Extension26 (uint8_t *d) { + (void)d; +} + +// FIG 1 - Cover the different possible labels, section 5.2 +// +void fib_processor::process_FIG1 (uint8_t *d) { +uint8_t charSet, extension; +uint32_t EId = 0; +uint32_t SId = 0; +//uint8_t oe; // obsolete in ETSI EN 300 401 V2.1.1 (2017-01) +uint8_t Rfu; +int16_t offset = 0; +serviceId *myIndex; +int16_t i; +uint8_t pd_flag; +uint8_t SCidS; +uint8_t XPAD_aid; +uint8_t flagfield; +uint8_t region_id; +char label [17]; +// +// from byte 1 we deduce: + charSet = getBits_4 (d, 8); +// oe = getBits_1 (d, 8 + 4); + Rfu = getBits_1 (d, 8 + 4); + extension = getBits_3 (d, 8 + 5); + label [16] = 0x00; +// if (oe == 01) +// return; + + switch (extension) { + case 0: // ensemble label + EId = getBits (d, 16, 16); + offset = 32; + if ((charSet <= 16)) { // EBU Latin based repertoire + for (i = 0; i < 16; i ++) { + label [i] = getBits_8 (d, offset + 8 * i); + } +// fprintf (stderr, "Ensemblename: %16s\n", label); + { const QString name = toQStringUsingCharset ( + (const char *) label, + (CharacterSet) charSet); + if (!ensemble_Descriptor. name_Present) { + ensemble_Descriptor. ensembleName = name; + ensemble_Descriptor. ensembleId = EId; + ensemble_Descriptor. name_Present = true; + nameofEnsemble (EId, name); + } + isSynced = true; + } + } +// fprintf (stderr, +// "charset %d is used for ensemblename\n", charSet); + break; + + case 1: // 16 bit Identifier field for service label 8.1.14.1 + SId = getBits (d, 16, 16); + offset = 32; + myIndex = findServiceId (SId); + if ((!myIndex -> serviceLabel. hasName) && (charSet <= 16)) { + for (i = 0; i < 16; i ++) { + label [i] = getBits_8 (d, offset + 8 * i); + } + myIndex -> serviceLabel. label. append ( + toQStringUsingCharset ( + (const char *) label, + (CharacterSet) charSet)); +// fprintf (stderr, "FIG1/1: SId = %4x\t%s\n", SId, label); + myIndex -> serviceLabel. hasName = true; + } + break; + + case 3: // region label + region_id = getBits_6 (d, 16 + 2); + offset = 24; + for (i = 0; i < 16; i ++) + label [i] = getBits_8 (d, offset + 8 * i); + +// fprintf (stderr, "FIG1/3: RegionID = %2x\t%s\n", region_id, label); + break; + + case 4: // service component label 8.1.14.3 + pd_flag = getLBits (d, 16, 1); + SCidS = getLBits (d, 20, 4); + if (pd_flag) { // 32 bit identifier field for data components + SId = getLBits (d, 24, 32); + offset = 56; + } + else { // 16 bit identifier field for program components + SId = getLBits (d, 24, 16); + offset = 40; + } + + flagfield = getLBits (d, offset + 128, 16); + for (i = 0; i < 16; i ++) + label [i] = getBits_8 (d, offset + 8 * i); +// fprintf (stderr, "FIG1/4: Sid = %8x\tp/d=%d\tSCidS=%1X\tflag=%8X\t%s\n", +// SId, pd_flag, SCidS, flagfield, label); + break; + + case 5: // Data service label - 32 bits 8.1.14.2 + SId = getLBits (d, 16, 32); + offset = 48; + myIndex = findServiceId (SId); + if ((!myIndex -> serviceLabel. hasName) && (charSet <= 16)) { + for (i = 0; i < 16; i ++) { + label [i] = getBits_8 (d, offset + 8 * i); + } + myIndex -> serviceLabel. label. append ( + toQStringUsingCharset ( + (const char *) label, + (CharacterSet) charSet)); + myIndex -> serviceLabel. hasName = true; + } + break; + + case 6: // XPAD label - 8.1.14.4 + pd_flag = getLBits (d, 16, 1); + SCidS = getLBits (d, 20, 4); + if (pd_flag) { // 32 bits identifier for XPAD label + SId = getLBits (d, 24, 32); + XPAD_aid = getLBits (d, 59, 5); + offset = 64; + } + else { // 16 bit identifier for XPAD label + SId = getLBits (d, 24, 16); + XPAD_aid = getLBits (d, 43, 5); + offset = 48; + } + + for (i = 0; i < 16; i ++) + label [i] = getBits_8 (d, offset + 8 * i); + +// fprintf (stderr, "FIG1/6: SId = %8x\tp/d = %d\t SCidS = %1X\tXPAD_aid = %2u\t%s\n", +// SId, pd_flag, SCidS, XPAD_aid, label); + break; + + default: +// fprintf (stderr, "FIG1/%d: not handled now\n", extension); + break; + } + (void)SCidS; + (void)XPAD_aid; + (void)flagfield; +} +// +// locate - and create if needed - a reference to the entry +// for the serviceId serviceId +serviceId *fib_processor::findServiceId (int32_t serviceId) { +int16_t i; + + for (i = 0; i < 64; i ++) + if ((listofServices [i]. inUse) && + (listofServices [i]. serviceId == serviceId)) + return &listofServices [i]; + + for (i = 0; i < 64; i ++) + if (!listofServices [i]. inUse) { + listofServices [i]. inUse = true; + listofServices [i]. serviceLabel. hasName = false; + listofServices [i]. serviceId = serviceId; + listofServices [i]. language = -1; + listofServices [i]. pNum = -1; + return &listofServices [i]; + } + + return &listofServices [0]; // should not happen +} + +serviceComponent *fib_processor::find_packetComponent (int16_t SCId) { +int16_t i; + + for (i = 0; i < 64; i ++) { + if (!ServiceComps [i]. inUse) + continue; + if (ServiceComps [i]. TMid != 03) + continue; + if (ServiceComps [i]. SCId == SCId) + return &ServiceComps [i]; + } + return NULL; +} + +serviceComponent *fib_processor::find_serviceComponent (int32_t SId, + int16_t SCId) { +int16_t i; + + for (i = 0; i < 64; i ++) { + if (!ServiceComps [i]. inUse) + continue; + + if ( (findServiceId (SId) == ServiceComps [i]. service)) { + if (ServiceComps [i]. SCId == SCId) + return &ServiceComps [i]; + } + } + + return NULL; +} + +// bind_audioService is the main processor for - what the name suggests - +// connecting the description of audioservices to a SID +// by creating a service Component +void fib_processor::bind_audioService (int8_t TMid, + uint32_t SId, + int16_t compnr, + int16_t SubChId, + int16_t ps_flag, + int16_t ASCTy) { +serviceId *s = findServiceId (SId); +int16_t i; +int16_t firstFree = -1; + + if (!s -> serviceLabel. hasName) + return; + + if (!subChannels [SubChId]. inUse) + return; + + for (i = 0; i < 64; i ++) { + if (!ServiceComps [i]. inUse) { + if (firstFree == -1) + firstFree = i; + continue; + } + + if ((ServiceComps [i]. service == s) && + (ServiceComps [i]. componentNr == compnr)) + return; + } + + QString dataName = s -> serviceLabel. label; + addtoEnsemble (dataName); + ServiceComps [firstFree]. inUse = true; + ServiceComps [firstFree]. TMid = TMid; + ServiceComps [firstFree]. componentNr = compnr; + ServiceComps [firstFree]. service = s; + ServiceComps [firstFree]. subchannelId = SubChId; + ServiceComps [firstFree]. PS_flag = ps_flag; + ServiceComps [firstFree]. ASCTy = ASCTy; +} + +// bind_packetService is the main processor for - what the name suggests - +// connecting the service component defining the service to the SId, +// So, here we create a service component. Note however, +// that FIG0/3 provides additional data, after that we +// decide whether it should be visible or not +void fib_processor::bind_packetService (int8_t TMid, + uint32_t SId, + int16_t compnr, + int16_t SCId, + int16_t ps_flag, + int16_t CAflag) { +serviceId *s = findServiceId (SId); +int16_t i; +int16_t firstFree = -1; +QString name; + + if (!s -> serviceLabel. hasName) // wait until we have a name + return; + + for (i = 0; i < 64; i ++) { + if ((ServiceComps [i]. inUse) && + (ServiceComps [i]. SCId == SCId)) + return; + + if (!ServiceComps [i]. inUse) { + if (firstFree == -1) + firstFree = i; + continue; + } + } + + ServiceComps [firstFree]. inUse = true; + ServiceComps [firstFree]. TMid = TMid; + ServiceComps [firstFree]. service = s; + ServiceComps [firstFree]. componentNr = compnr; + ServiceComps [firstFree]. SCId = SCId; + ServiceComps [firstFree]. PS_flag = ps_flag; + ServiceComps [firstFree]. CAflag = CAflag; + ServiceComps [firstFree]. is_madePublic = false; +} + +//////////////////////////////////////////////////////////////////////// +void fib_processor::setupforNewFrame (void) { +int16_t i; + + for (i = 0; i < 64; i ++) + ServiceComps [i]. inUse = false; +} + +void fib_processor::clearEnsemble (void) { +int16_t i; + fibLocker. lock (); + setupforNewFrame (); + memset (ServiceComps, 0, sizeof (ServiceComps)); + memset (subChannels, 0, sizeof (subChannels)); + for (i = 0; i < 64; i ++) { + listofServices [i]. inUse = false; + listofServices [i]. serviceId = -1; + listofServices [i]. serviceLabel. label = QString (); + listofServices [i]. programType = -1; + listofServices [i]. language = -1; + listofServices [i]. pNum = -1; + subChannels [i]. inUse = false; + ServiceComps [i]. inUse = false; + } + + ensemble_Descriptor. name_Present = false; + ensemble_Descriptor. ecc_Present = false; + isSynced = false; + fibLocker. unlock (); +} + +////////////////////////////////////////////////////////////////////// +// The external world wants from time to time to select +// a service +int32_t fib_processor::findServiceIdwithName (const QString &s) { +int16_t i; + + for (i = 0; i < 64; i ++) { + if (!listofServices [i]. inUse) + continue; + + if (!listofServices [i]. serviceLabel. hasName) + continue; + if (listofServices [i]. serviceLabel. label != s) + continue; + + return listofServices [i]. serviceId; + } + return -1; +} +// +// +// Note that here we only look for the main service +uint8_t fib_processor::kindofService (QString &s) { +int16_t i, j; +int32_t selectedService = -1; +int16_t service = UNKNOWN_SERVICE; + + fibLocker. lock (); +// first we locate the serviceId + for (i = 0; i < 64; i ++) { + if (!listofServices [i]. inUse) + continue; + + if (!listofServices [i]. serviceLabel. hasName) + continue; + + if (listofServices [i]. serviceLabel. label != s) + continue; + + selectedService = listofServices [i]. serviceId; + + for (j = 0; j < 64; j ++) { + int16_t subchId; + if (!ServiceComps [j]. inUse) + continue; + + if (ServiceComps [j]. componentNr != 0) + continue; // subservice + + if (selectedService != ServiceComps [j]. service -> serviceId) + continue; + + if (ServiceComps [j]. TMid == 03) { + service = PACKET_SERVICE; + break; + } + + if (ServiceComps [j]. TMid == 00) { + service = AUDIO_SERVICE; + break; + } + } + + if (selectedService != -1) + break; + } + + fibLocker. unlock (); + return service; +} + +void fib_processor::dataforDataService (const QString &s, + packetdata *d, int16_t compnr) { +int16_t j; +int32_t selectedService; + + d -> defined = false; + fibLocker. lock (); + selectedService = findServiceIdwithName (s); + if (selectedService == -1) { + fibLocker. unlock (); + return; + } + + for (j = 0; j < 64; j ++) { + int16_t subchId; + if ((!ServiceComps [j]. inUse) || (ServiceComps [j]. TMid != 03)) + continue; + + if (selectedService != ServiceComps [j]. service -> serviceId) + continue; + + if (ServiceComps [j]. componentNr != compnr) + continue; + + subchId = ServiceComps [j]. subchannelId; + d -> subchId = subchId; + d -> startAddr = subChannels [subchId]. startAddr; + d -> shortForm = subChannels [subchId]. shortForm; + d -> protLevel = subChannels [subchId]. protLevel; + d -> length = subChannels [subchId]. Length; + d -> bitRate = subChannels [subchId]. bitRate; + d -> FEC_scheme = subChannels [subchId]. FEC_scheme; + + d -> DSCTy = ServiceComps [j]. DSCTy; + d -> DGflag = ServiceComps [j]. DGflag; + d -> packetAddress = ServiceComps [j]. packetAddress; + d -> compnr = ServiceComps [j]. componentNr; + d -> appType = ServiceComps [j]. appType; + d -> defined = true; + fprintf (stderr, "startAddr %d, Length %d, bitrate %d, DSCTy %d, appType %d\n", d -> startAddr, d -> length, d -> bitRate, d -> DSCTy, d -> appType); + break; + } + + fibLocker. unlock (); +} + +void fib_processor::dataforAudioService (const QString &s, + audiodata *d, int16_t compnr) { +int16_t j; +int32_t selectedService; + + d -> defined = false; + fibLocker. lock (); + + selectedService = findServiceIdwithName (s); + if (selectedService == -1) { + fibLocker. unlock (); + return; + } + + for (j = 0; j < 64; j ++) { + int16_t subchId; + if ((!ServiceComps [j]. inUse) || (ServiceComps [j]. TMid != 0)) + continue; + + if (selectedService != ServiceComps [j]. service -> serviceId) + continue; + + if (ServiceComps [j]. componentNr != compnr) + continue; + + subchId = ServiceComps [j]. subchannelId; + d -> serviceId = selectedService; + d -> serviceName = s; + d -> subchId = subchId; + d -> startAddr = subChannels [subchId]. startAddr; + d -> shortForm = subChannels [subchId]. shortForm; + d -> protLevel = subChannels [subchId]. protLevel; + d -> length = subChannels [subchId]. Length; + d -> bitRate = subChannels [subchId]. bitRate; + d -> ASCTy = ServiceComps [j]. ASCTy; + d -> language = ServiceComps [j]. service -> language; + d -> programType = ServiceComps [j]. service -> programType; + d -> defined = true; + break; + } + fibLocker. unlock (); +} + + +//////////////////////////////////////////////////////////////////////////// +// For displaying ensemble data, we have two functions, mapping +// an index in the ServiceComps table to relevant data +void fib_processor::dataforAudioService (int16_t comp, audiodata *d) { +serviceId *service; +int16_t subChId; + + d -> defined = false; // I do not trust myself + if (!ServiceComps [comp]. inUse) + return; + + if (!ServiceComps [comp]. TMid == 0) + return; + + fibLocker. lock (); + service = ServiceComps [comp]. service; + subChId = ServiceComps [comp]. subchannelId; + d -> subchId = subChId; + d -> ASCTy = ServiceComps [comp]. ASCTy; + d -> compnr = ServiceComps [comp]. componentNr; + d -> serviceId = service -> serviceId; + d -> serviceName = service -> serviceLabel. label; + d -> language = service -> language; + d -> programType = service -> programType; + d -> startAddr = subChannels [subChId]. startAddr; + d -> shortForm = subChannels [subChId]. shortForm; + d -> protLevel = subChannels [subChId]. protLevel; + d -> length = subChannels [subChId]. Length; + d -> bitRate = subChannels [subChId]. bitRate; + d -> defined = true; + fibLocker. unlock (); +} + +void fib_processor::dataforDataService (int16_t comp, packetdata *d) { +serviceId *service; +int16_t subChId; + + d -> defined = false; // I do not trust myself + if (!ServiceComps [comp]. inUse) + return; + + if (ServiceComps [comp]. TMid != 03) + return; + + fibLocker. lock (); + service = ServiceComps [comp]. service; + subChId = ServiceComps [comp]. subchannelId; + d -> DSCTy = ServiceComps [comp]. DSCTy; + d -> DGflag = ServiceComps [comp]. DGflag; + d -> packetAddress = ServiceComps [comp]. packetAddress; + d -> appType = ServiceComps [comp]. appType; + d -> compnr = ServiceComps [comp]. componentNr; + d -> subchId = subChId; + d -> serviceId = service -> serviceId; + d -> serviceName = service -> serviceLabel. label; + d -> startAddr = subChannels [subChId]. startAddr; + d -> shortForm = subChannels [subChId]. shortForm; + d -> protLevel = subChannels [subChId]. protLevel; + d -> length = subChannels [subChId]. Length; + d -> bitRate = subChannels [subChId]. bitRate; + d -> FEC_scheme = subChannels [subChId]. FEC_scheme; + d -> defined = true; + fibLocker. unlock (); +} + +////////////////////////////////////////////////////////////////////////// +bool fib_processor::syncReached (void) { + return isSynced; +} + +void fib_processor::resetSync (void) { + isSynced = false; +} + +int32_t fib_processor::get_ensembleId (void) { + if (ensemble_Descriptor. name_Present) + return ensemble_Descriptor. ensembleId; + return 0; +} + +QString fib_processor::get_ensembleName (void) { + if (ensemble_Descriptor. name_Present) + return ensemble_Descriptor. ensembleName; + return " "; +} + +int32_t fib_processor::get_CIFcount (void) { + return CIFcount; +} + + diff --git a/src/backend/fic-handler.cpp b/src/backend/fic-handler.cpp new file mode 100644 index 0000000..4343234 --- /dev/null +++ b/src/backend/fic-handler.cpp @@ -0,0 +1,216 @@ +# +/* + * Copyright (C) 2016 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "fic-handler.h" +#include "radio.h" +#include "protTables.h" +// +// The 3072 bits of the serial motherword shall be split into +// 24 blocks of 128 bits each. +// The first 21 blocks shall be subjected to +// puncturing (per 32 bits) according to PI_16 +// The next three blocks shall be subjected to +// puncturing (per 32 bits) according to PI_15 +// The last 24 bits shall be subjected to puncturing +// according to the table 8 + +/** + * \class ficHandler + * We get in - through process_ficBlock - the FIC data + * in units of 768 bits. + * We follow the standard and apply convolution decoding and + * puncturing. + * The data is sent through to the fib processor + */ + + ficHandler::ficHandler (RadioInterface *mr, + uint8_t dabMode): + params (dabMode), + fib_processor (mr), + myViterbi (768, true) { +int16_t i, j, k; +int local = 0; + + index = 0; + BitsperBlock = 2 * params. get_carriers (); + ficno = 0; + ficBlocks = 0; + ficMissed = 0; + ficRatio = 0; + + memset (shiftRegister, 1, 9); + + for (i = 0; i < 768; i ++) { + PRBS [i] = shiftRegister [8] ^ shiftRegister [4]; + for (j = 8; j > 0; j --) + shiftRegister [j] = shiftRegister [j - 1]; + + shiftRegister [0] = PRBS [i]; + } +// +// Since the depuncturing is the same throughout all calls +// (even through all instances, so we could create a static +// table), we make an punctureTable that contains the indices of +// the ofdmInput table + memset (punctureTable, 0, (3072 + 24) * sizeof (uint8_t)); + for (i = 0; i < 21; i ++) { + for (k = 0; k < 32 * 4; k ++) { + if (get_PCodes (16 - 1) [k % 32] != 0) + punctureTable [local] = true; + local ++; + } + } +/** + * In the second step + * we have 3 blocks with puncturing according to PI_15 + * each 128 bit block contains 4 subblocks of 32 bits + * on which the given puncturing is applied + */ + for (i = 0; i < 3; i ++) { + for (k = 0; k < 32 * 4; k ++) { + if (get_PCodes (15 - 1) [k % 32] != 0) + punctureTable [local] = true; + local ++; + } + } + +/** + * we have a final block of 24 bits with puncturing according to PI_X + * This block constitues the 6 * 4 bits of the register itself. + */ + for (k = 0; k < 24; k ++) { + if (get_PCodes (8 - 1) [k] != 0) + punctureTable [local] = true; + local ++; + } + + connect (this, SIGNAL (show_ficSuccess (bool)), + mr, SLOT (show_ficSuccess (bool))); +} + + ficHandler::~ficHandler (void) { +} + + +/** + * \brief process_ficBlock + * The number of bits to be processed per incoming block + * is 2 * p -> K, which still depends on the Mode. + * for Mode I it is 2 * 1536, for Mode II, it is 2 * 384, + * for Mode III it is 192, Mode IV gives 2 * 768. + * for Mode II we will get the 2304 bits after having read + * the 3 FIC blocks, each with 768 bits. + * for Mode IV we will get 3 * 2 * 768 = 4608, i.e. two resulting blocks + * Note that Mode III is NOT supported + * + * The function is called with a blkno. This should be 1, 2 or 3 + * for each time 2304 bits are in, we call process_ficInput + */ +void ficHandler::process_ficBlock (std::vector data, + int16_t blkno) { +int32_t i; + + if (blkno == 1) { + index = 0; + ficno = 0; + fib_processor::newFrame (); + } +// + if ((1 <= blkno) && (blkno <= 3)) { + for (i = 0; i < BitsperBlock; i ++) { + ofdm_input [index ++] = data [i]; + if (index >= 2304) { + process_ficInput (ficno); + index = 0; + ficno ++; + } + } + } + else + fprintf (stderr, "You should not call ficBlock here\n"); +// we are pretty sure now that after block 4, we end up +// with index = 0 +} + +/** + * \brief process_ficInput + * we have a vector of 2304 (0 .. 2303) soft bits that has + * to be de-punctured and de-conv-ed into a block of 768 bits + * In this approach we first create the full 3072 block (i.e. + * we first depuncture, and then we apply the deconvolution + * In the next coding step, we will combine this function with the + * one above + */ +void ficHandler::process_ficInput (int16_t ficno) { +int16_t i; +int16_t viterbiBlock [3072 + 24]; +int16_t inputCount = 0; + + memset (viterbiBlock, 0, (3072 + 24) * sizeof (int16_t)); + + + for (i = 0; i < 3072 + 24; i ++) + if (punctureTable [i]) + viterbiBlock [i] = ofdm_input [inputCount ++]; +/** + * Now we have the full word ready for deconvolution + * deconvolution is according to DAB standard section 11.2 + */ + myViterbi. deconvolve (viterbiBlock, bitBuffer_out); +/** + * if everything worked as planned, we now have a + * 768 bit vector containing three FIB's + * + * first step: energy dispersal according to the DAB standard + * We use a predefined vector PRBS + */ + for (i = 0; i < 768; i ++) + bitBuffer_out [i] ^= PRBS [i]; +/** + * each of the fib blocks is protected by a crc + * (we know that there are three fib blocks each time we are here) + * we keep track of the successrate + * and show that per 100 fic blocks + * One issue is what to do when we really believe the synchronization + * was lost. + */ + + for (i = ficno * 3; i < ficno * 3 + 3; i ++) { + uint8_t *p = &bitBuffer_out [(i % 3) * 256]; + if (!check_CRC_bits (p, 256)) { + show_ficSuccess (false); + continue; + } + + show_ficSuccess (true); + fib_processor::process_FIB (p, ficno); + } +} + +void ficHandler::stop (void) { +} + +void ficHandler::reset (void) { + clearEnsemble (); +} + + diff --git a/src/backend/firecode-checker.cpp b/src/backend/firecode-checker.cpp new file mode 100644 index 0000000..751e426 --- /dev/null +++ b/src/backend/firecode-checker.cpp @@ -0,0 +1,96 @@ +# +# +/* -*- c++ -*- */ +/* + * Copyright 2004,2010 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio 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; either version 3, or (at your option) + * any later version. + * + * GNU Radio 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ +// +// This is a (partial) rewrite of the GNU radio code, for use +// within the DAB/DAB+ sdr-j receiver software +// all rights are acknowledged. +// +#include "firecode-checker.h" +#include +#include + +// g(x)=(x^11+1)(x^5+x^3+x^2+x+1)=1+x+x^2+x^3+x^5+x^11+x^12+x^13+x^14+x^16 +const uint8_t firecode_checker::g[16]={1,1,1,1,0,1,0,0,0,0,0,1,1,1,1,0}; + + firecode_checker::firecode_checker (void) { +// prepare the table +uint8_t regs [16]; +int16_t i,j; +uint16_t itab [8]; + + for (i = 0; i < 8; i++) { + memset (regs, 0, 16); + regs [8 + i] = 1; + itab [i] = run8 (regs); + } + for (i = 0; i < 256; i++) { + tab [i] = 0; + for (j = 0; j < 8; j++) { + if (i & (1 << j)) + tab [i] = tab [i] ^ itab [j]; + } + } +} + + firecode_checker::~firecode_checker (void) { +} + +uint16_t firecode_checker::run8 (uint8_t regs[]) { +int16_t i,j; +uint16_t z; +uint16_t v = 0; + + for (i = 0; i < 8; i++) { + z = regs [15]; + for (j = 15; j > 0; j--) + regs [j] = regs [j-1] ^ (z & g[j]); + regs [0] = z; + } + + for (i = 15; i >= 0; i--) + v = (v << 1) | regs[i]; + + return v; +} + +bool firecode_checker::check (const uint8_t *x) { +int16_t i; +uint16_t state = (x[2] << 8) | x[3]; +uint16_t istate; + + for (i = 4; i < 11; i++) { + istate = tab [state >> 8]; + state = ((istate & 0x00ff) ^ x[i]) | + ((istate ^ state << 8) & 0xff00); + } + + for (i = 0; i < 2; i++) { + istate = tab [state >> 8]; + state = ((istate & 0x00ff) ^ x [i]) | + ((istate ^ state << 8) & 0xff00); + } + + return state == 0; +} + diff --git a/src/backend/frame-processor.cpp b/src/backend/frame-processor.cpp new file mode 100644 index 0000000..18ec41b --- /dev/null +++ b/src/backend/frame-processor.cpp @@ -0,0 +1,35 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#include "frame-processor.h" + + frameProcessor::frameProcessor (void) { +} + + frameProcessor::~frameProcessor (void) { +} + +void frameProcessor::addtoFrame (std::vector v) { + (void)v; + fprintf (stderr, "xxx"); +} + diff --git a/src/backend/galois.cpp b/src/backend/galois.cpp new file mode 100644 index 0000000..00b853e --- /dev/null +++ b/src/backend/galois.cpp @@ -0,0 +1,127 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Many of the ideas as implemented in Qt-DAB are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +// +// Pretty straightforward package for galois computing, +// up to 8 bits symsize + +#include "galois.h" +#include + + galois::galois (uint16_t symsize, uint16_t gfpoly) { +uint16_t sr; +uint16_t i; + + this -> mm = symsize; + this -> gfpoly = gfpoly; + this -> codeLength = (1 << mm) - 1; + this -> d_q = 1 << mm; + this -> alpha_to = new uint16_t [codeLength + 1]; + this -> index_of = new uint16_t [codeLength + 1]; +/* Generate Galois field lookup tables */ + index_of [0] = codeLength; /* log (zero) = -inf */ + alpha_to [codeLength] = 0; /* alpha**-inf = 0 */ + + sr = 1; + for (i = 0; i < codeLength; i++){ + index_of [sr] = i; + alpha_to [i] = sr; + sr <<= 1; + if (sr & (1 << symsize)) + sr ^= gfpoly; + sr &= codeLength; + } +} + +int galois::modnn (int x){ + while (x >= codeLength) { + x -= codeLength; + x = (x >> mm) + (x & codeLength); + } + return x; +} + + galois::~galois (void) { + delete [] alpha_to; + delete [] index_of; +} + +static inline +uint16_t round_mod (int16_t a, int16_t n) { + return (a % n < 0) ? (a % n + n) : (a % n); +} + +uint16_t galois::add_poly (uint16_t a, uint16_t b) { + return a ^ b; +} + +uint16_t galois::poly2power (uint16_t a) { + return index_of [a]; +} + +uint16_t galois::power2poly (uint16_t a) { + return alpha_to [a]; +} + +uint16_t galois::add_power (uint16_t a, uint16_t b) { + return index_of [alpha_to [a] ^ alpha_to [b]]; +} + +uint16_t galois::multiply_power (uint16_t a, uint16_t b) { + return modnn (a + b); +} + +uint16_t galois::multiply_poly (uint16_t a, uint16_t b) { + if ((a == 0) || (b == 0)) + return 0; + return alpha_to [multiply_power (index_of [a], index_of [b])]; +} + +uint16_t galois::divide_power (uint16_t a, uint16_t b) { + return modnn (d_q - 1 + a - b); +} + +uint16_t galois::divide_poly (uint16_t a, uint16_t b) { + if (a == 0) + return 0; + return alpha_to [divide_power (index_of [a], index_of [b])]; +} + +uint16_t galois::inverse_poly (uint16_t a) { + return alpha_to [inverse_power (index_of [a])]; +} + +uint16_t galois::inverse_power (uint16_t a) { + return d_q - 1 - a; +} + +uint16_t galois::pow_poly (uint16_t a, uint16_t n) { + return alpha_to [pow_power (index_of [a], n)]; +} + +uint16_t galois::pow_power (uint16_t a, uint16_t n) { + return (a == 0) ? 0 : (a * n) % (d_q - 1); +} + diff --git a/src/backend/msc-handler.cpp b/src/backend/msc-handler.cpp new file mode 100644 index 0000000..163efd3 --- /dev/null +++ b/src/backend/msc-handler.cpp @@ -0,0 +1,160 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#include "dab-constants.h" +#include "radio.h" +#include "msc-handler.h" +#include "virtual-backend.h" +#include "audio-backend.h" +#include "data-backend.h" +#include "dab-params.h" +// +// Interface program for processing the MSC. +// The ofdm processor assumes the existence of an msc-handler, whether +// a service is selected or not. + +#define CUSize (4 * 16) +// Note CIF counts from 0 .. 3 +// + mscHandler::mscHandler (RadioInterface *mr, + uint8_t mode, + QString picturesPath) : + params (mode) { + myRadioInterface = mr; + this -> picturesPath = picturesPath; + cifVector. resize (55296); + theBackends. push_back (new virtualBackend (0, 0)); + BitsperBlock = 2 * params. get_carriers (); + switch (mode) { + case 4: // 2 CIFS per 76 blocks + numberofblocksperCIF = 36; + break; + + case 1: // 4 CIFS per 76 blocks + numberofblocksperCIF = 18; + break; + + case 2: // 1 CIF per 76 blocks + numberofblocksperCIF = 72; + break; + + default: + numberofblocksperCIF = 18; + break; + } + work_to_be_done. store (false); +} + + mscHandler::~mscHandler (void) { + reset (); +} +// +// This function is to be called between invocations of +// services +// It might be called several times, so ... + void mscHandler::reset (void) { + int i; + locker. lock (); + work_to_be_done. store (false); + for (i = 0; i < theBackends. size (); i ++) { + theBackends [i] -> stopRunning (); + delete theBackends [i]; + } + theBackends. resize (0); + locker. unlock (); + } + +// +// Note, the set_xxx functions are called from within a +// different thread than the process_mscBlock method, +// so, a little bit of locking seems wise while +// the actual changing of the settings is done in the +// thread executing process_mscBlock +void mscHandler::set_audioChannel (audiodata *d, + RingBuffer *audioBuffer) { + locker. lock (); +// +// we could assert here that theBackend == NULL + theBackends. push_back (new audioBackend (myRadioInterface, + d, + audioBuffer, + picturesPath)); + work_to_be_done. store (true); + locker. unlock (); +} +// +void mscHandler::set_dataChannel (packetdata *d, + RingBuffer *dataBuffer) { + locker. lock (); + theBackends. push_back (new dataBackend (myRadioInterface, + d, + dataBuffer, + picturesPath)); + work_to_be_done. store (true); + locker. unlock (); +} + +// +// add blocks. First is (should be) block 5, last is (should be) 76 +// Note that this method is called from within the ofdm-processor thread +// while the set_xxx methods are called from within the +// gui thread +// +// Any change in the selected service will only be active +// during te next process_mscBlock call. +void mscHandler::process_mscBlock (std::vector fbits, + int16_t blkno) { +int16_t currentblk; +int16_t i; + + currentblk = (blkno - 4) % numberofblocksperCIF; +// and the normal operation is: + memcpy (&cifVector [currentblk * BitsperBlock], + fbits. data (), BitsperBlock * sizeof (int16_t)); + if (currentblk < numberofblocksperCIF - 1) + return; + + if (!work_to_be_done. load ()) + return; + +// OK, now we have a full CIF and it seems there is some work to +// be done. We assume that the backend itself +// does the work in a separate thread. + locker. lock (); + for (i = 0; i < theBackends. size (); i ++) { + int16_t startAddr = theBackends [i] -> startAddr (); + int16_t Length = theBackends [i] -> Length (); + if (Length > 0) { // Length = 0? virtual Backend + int16_t temp [Length * CUSize]; + memcpy (temp, &cifVector [startAddr * CUSize], + Length * CUSize * sizeof (int16_t)); + (void) theBackends [i] -> process (temp, Length * CUSize); + } + } + locker. unlock (); +} +// + +void mscHandler::stop (void) { + reset (); +} + diff --git a/src/backend/protTables.cpp b/src/backend/protTables.cpp new file mode 100644 index 0000000..6325a05 --- /dev/null +++ b/src/backend/protTables.cpp @@ -0,0 +1,59 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +# +#include "protTables.h" + +static +int8_t P_Codes [24][32] = { +{ 1,1,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0},// 1 +{ 1,1,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0, 1,1,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0},// 2 +{ 1,1,0,0, 1,0,0,0, 1,1,0,0, 1,0,0,0, 1,1,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0},// 3 +{ 1,1,0,0, 1,0,0,0, 1,1,0,0, 1,0,0,0, 1,1,0,0, 1,0,0,0, 1,1,0,0, 1,0,0,0},// 4 +{ 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,0,0,0, 1,1,0,0, 1,0,0,0, 1,1,0,0, 1,0,0,0},// 5 +{ 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,0,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,0,0,0},// 6 +{ 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,0,0,0},// 7 +{ 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0},// 8 + +{ 1,1,1,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,0,0},// 9 +{ 1,1,1,0, 1,1,0,0, 1,1,0,0, 1,1,0,0, 1,1,1,0, 1,1,0,0, 1,1,0,0, 1,1,0,0},// 10 +{ 1,1,1,0, 1,1,0,0, 1,1,1,0, 1,1,0,0, 1,1,1,0, 1,1,0,0, 1,1,0,0, 1,1,0,0},// 11 +{ 1,1,1,0, 1,1,0,0, 1,1,1,0, 1,1,0,0, 1,1,1,0, 1,1,0,0, 1,1,1,0, 1,1,0,0},// 12 +{ 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,0,0, 1,1,1,0, 1,1,0,0, 1,1,1,0, 1,1,0,0},// 13 +{ 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,0,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,0,0},// 14 +{ 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,0,0},// 15 +{ 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0},// 16 +{ 1,1,1,1, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,0},// 17 +{ 1,1,1,1, 1,1,1,0, 1,1,1,0, 1,1,1,0, 1,1,1,1, 1,1,1,0, 1,1,1,0, 1,1,1,0},// 18 +{ 1,1,1,1, 1,1,1,0, 1,1,1,1, 1,1,1,0, 1,1,1,1, 1,1,1,0, 1,1,1,0, 1,1,1,0},// 19 +{ 1,1,1,1, 1,1,1,0, 1,1,1,1, 1,1,1,0, 1,1,1,1, 1,1,1,0, 1,1,1,1, 1,1,1,0},// 20 +{ 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,0, 1,1,1,1, 1,1,1,0, 1,1,1,1, 1,1,1,0},// 21 +{ 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,0, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,0},// 22 +{ 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,0},// 23 +{ 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1} // 24 +}; + +int8_t *get_PCodes (int16_t x) { + return P_Codes [x]; +} + + diff --git a/src/backend/protection.cpp b/src/backend/protection.cpp new file mode 100644 index 0000000..233432e --- /dev/null +++ b/src/backend/protection.cpp @@ -0,0 +1,41 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * + * Simple base class for combining uep and eep deconvolvers + */ +#include +#include "protection.h" + + protection::protection (int16_t bitRate, int16_t protLevel): + viterbi_768 (24 * bitRate, false), + outSize (24 * bitRate), + indexTable (outSize * 4 + 24), + viterbiBlock (outSize * 4 + 24){ + this -> bitRate = bitRate; +} + protection::~protection (void) {} +bool protection::deconvolve (int16_t *a, + int32_t b, uint8_t *c) { + (void)a; (void)b; (void)c; + return false; +} + diff --git a/src/backend/reed-solomon.cpp b/src/backend/reed-solomon.cpp new file mode 100644 index 0000000..21cb1bb --- /dev/null +++ b/src/backend/reed-solomon.cpp @@ -0,0 +1,398 @@ +# +/* Initialize a RS codec + * + * Copyright 2002 Phil Karn, KA9Q + * May be used under the terms of the GNU General Public License (GPL) + */ +#include +#include "reed-solomon.h" +#include + +/* + * Reed-Solomon decoder + * Copyright 2002 Phil Karn, KA9Q + * May be used under the terms of the GNU General Public License (GPL) + */ +/* + * Rewritten - and slightly adapted while doing so - + * as a C++ class for use in the Qt-DAB program + * Copyright 2015 Jan van Katwijk + * May be used under the terms of the GNU General Public License (GPL) + */ +#define min(a,b) ((a) < (b) ? (a) : (b)) + +/* Initialize a Reed-Solomon codec + * symsize = symbol size, bits (1-8) + * gfpoly = Field generator polynomial coefficients + * fcr = first root of RS code generator polynomial, index form, 0 + * prim = primitive element to generate polynomial roots + * nroots = RS code generator polynomial degree (number of roots) + */ + + reedSolomon::reedSolomon (uint16_t symsize, + uint16_t gfpoly, + uint16_t fcr, + uint16_t prim, + uint16_t nroots): + myGalois (symsize, gfpoly) { +int i, j, root, iprim; + + this -> symsize = symsize; // in bits + this -> codeLength = (1 << symsize) - 1; + this -> fcr = fcr; + this -> prim = prim; + this -> nroots = nroots; + for (iprim = 1; (iprim % prim) != 0; iprim += codeLength); + this -> iprim = iprim / prim; + this -> generator = new uint8_t [nroots + 1]; + memset (generator, 0, (nroots + 1) * sizeof (generator [0])); + generator [0] = 1; + + for (i = 0, root = fcr * prim; i < nroots; i++, root += 1) { + generator [i + 1] = 1; + for (j = i; j > 0; j--){ + if (generator [j] != 0) { + uint16_t p1 = myGalois. multiply_power ( + myGalois. poly2power (generator [j]), + root); + generator [j] = myGalois. add_poly ( + generator [j - 1], + myGalois. power2poly (p1)); + + } + else { + generator [j] = generator [j - 1]; + } + } + +/* rsHandle -> genpoly [0] can never be zero */ + generator [0] = + myGalois. power2poly ( + myGalois. multiply_power (root, + myGalois. poly2power (generator [0]))); + } + for (i = 0; i <= nroots; i ++) + generator [i] = myGalois. poly2power (generator [i]); +} + + reedSolomon::~reedSolomon (void) { + delete generator; +} + +// +// Basic encoder, returns - in bb - the parity bytes +void reedSolomon::encode_rs (const uint8_t *data, uint8_t *bb){ +int i, j; +uint8_t feedback; + + memset (bb, 0, nroots * sizeof (uint8_t)); + + for (i = 0; i < codeLength - nroots; i++){ + feedback = myGalois. poly2power ( + myGalois. add_poly (data [i], bb [0])); + if (feedback != codeLength){ /* feedback term is non-zero */ + for (j = 1; j < nroots; j++) + bb [j] = myGalois. add_poly (bb [j], + myGalois. power2poly ( + myGalois. multiply_power (feedback, + generator [nroots - j]))); + } +/* Shift */ + memmove (&bb [0], &bb[1], sizeof (bb [0]) * (nroots - 1)); + if (feedback != codeLength) + bb [nroots - 1] = + myGalois. power2poly ( + myGalois. multiply_power (feedback, + generator [0])); + else + bb [nroots - 1] = 0; + } +} + +void reedSolomon::enc (const uint8_t *r, uint8_t *d, int16_t cutlen) { +uint8_t rf [codeLength]; +uint8_t bb [nroots]; +int16_t i; + + memset (rf, 0, cutlen * sizeof (rf [0])); + for (i = cutlen; i < codeLength; i++) + rf [i] = r[i - cutlen]; + + encode_rs (rf, bb); + for (i = cutlen; i < codeLength - nroots; i++) + d [i - cutlen] = rf [i]; +// and the parity bytes + for (i = 0; i < nroots; i ++) + d [codeLength - cutlen - nroots + i] = bb [i]; +} + + +int16_t reedSolomon::dec (const uint8_t *r, uint8_t *d, int16_t cutlen) { +uint8_t rf [codeLength]; +int16_t i; +int16_t ret; + + memset (rf, 0, cutlen * sizeof (rf [0])); + for (i = cutlen; i < codeLength; i++) + rf [i] = r [i - cutlen]; + + ret = decode_rs (rf); + for (i = cutlen; i < codeLength - nroots; i++) + d [i - cutlen] = rf [i]; + return ret; +} + +int16_t reedSolomon::decode_rs (uint8_t *data) { +uint8_t syndromes [nroots]; +uint8_t Lambda [nroots + 1]; +uint16_t lambda_degree, omega_degree; +uint8_t rootTable [nroots]; +uint8_t locTable [nroots]; +uint8_t omega [nroots + 1]; +int16_t rootCount; +int16_t i; +// +// returning syndromes in poly + if (computeSyndromes (data, syndromes)) + return 0; +// Step 2: Berlekamp-Massey +// Lambda in power notation + lambda_degree = computeLambda (syndromes, Lambda); + +// Step 3: evaluate lambda and compute the error locations (chien) + rootCount = computeErrors (Lambda, lambda_degree, rootTable, locTable); + if (rootCount < 0) + return -1; + omega_degree = computeOmega (syndromes, Lambda, lambda_degree, omega); +/* + * Compute error values in poly-form. + * num1 = omega (inv (X (l))), + * num2 = inv (X (l))**(FCR-1) and + * den = lambda_pr(inv(X(l))) all in poly-form + */ + uint16_t num1, num2, den; + int16_t j; + for (j = rootCount - 1; j >= 0; j--) { + num1 = 0; + for (i = omega_degree; i >= 0; i--) { + if (omega [i] != codeLength) { + uint16_t tmp = myGalois. multiply_power (omega [i], + myGalois. pow_power (i, rootTable [j])); + num1 = myGalois. add_poly (num1, + myGalois. power2poly (tmp)); + } + } + uint16_t tmp = myGalois. multiply_power ( + myGalois. pow_power ( + rootTable [j], + myGalois. divide_power (fcr, 1)), + codeLength); + num2 = myGalois. power2poly (tmp); + den = 0; +/* + * lambda [i + 1] for i even is the formal derivative + * lambda_pr of lambda [i] + */ + for (i = min (lambda_degree, nroots - 1) & ~1; + i >= 0; i -=2) { + if (Lambda [i + 1] != codeLength) { + uint16_t tmp = myGalois. multiply_power (Lambda [i + 1], + myGalois. pow_power (i, rootTable [j])); + den = myGalois. add_poly (den, myGalois. power2poly (tmp)); + } + } + + if (den == 0) { +// fprintf (stderr, "den = 0, (count was %d)\n", den); + return -1; + } +/* Apply error to data */ + if (num1 != 0) { + if (locTable [j] >= uint8_t (codeLength - nroots)) + rootCount --; + else { + uint16_t tmp1 = codeLength - myGalois. poly2power (den); + uint16_t tmp2 = myGalois. multiply_power ( + myGalois. poly2power (num1), + myGalois. poly2power (num2)); + tmp2 = myGalois. multiply_power (tmp2, tmp1); + uint16_t corr = myGalois. power2poly (tmp2); + data [locTable [j]] = + myGalois. add_poly (data [locTable [j]], corr); + } + } + + } + return rootCount; +} +// +// Apply Horner on the input for root "root" +uint8_t reedSolomon::getSyndrome (uint8_t *data, uint8_t root) { +uint8_t syn = data [0]; +int16_t j; + + for (j = 1; j < codeLength; j++){ + if (syn == 0) + syn = data [j]; + else { + uint16_t uu1 = myGalois. pow_power ( + myGalois. multiply_power (fcr, root), + prim); + syn = myGalois. add_poly (data [j], + myGalois. power2poly ( + myGalois. multiply_power ( + myGalois.poly2power (syn), uu1))); +// (fcr + root) * prim))); + } + } + return syn; +} + +// +// use Horner to compute the syndromes +bool reedSolomon::computeSyndromes (uint8_t *data, uint8_t *syndromes) { +int16_t i; +uint16_t syn_error; + +/* form the syndromes; i.e., evaluate data (x) at roots of g(x) */ + + for (i = 0; i < nroots; i++) { + syndromes [i] = getSyndrome (data, i); + syn_error |= syndromes [i]; + } + + return syn_error == 0; +} +// +// compute Lambda with Berlekamp-Massey +// syndromes in poly-form in, Lambda in power form out +// +uint16_t reedSolomon::computeLambda (uint8_t *syndromes, uint8_t *Lambda) { +uint16_t K = 1, L = 0; +uint8_t Corrector [nroots]; +int16_t i; +int16_t deg_lambda; + + for (i = 0; i < nroots; i ++) + Corrector [i] = Lambda [i] = 0; + + uint8_t error = syndromes [0]; +// +// Initializers: + Lambda [0] = 1; + Corrector [1] = 1; +// + while (K <= nroots) { + uint8_t oldLambda [nroots]; + memcpy (oldLambda, Lambda, nroots * sizeof (Lambda [0])); +// +// Compute new lambda + for (i = 0; i < nroots; i ++) + Lambda [i] = myGalois. add_poly (Lambda [i], + myGalois. multiply_poly (error, + Corrector [i])); + if ((2 * L < K) && (error != 0)) { + L = K - L; + for (i = 0; i < nroots; i ++) + Corrector [i] = myGalois. divide_poly (oldLambda [i], error); + } +// +// multiply x * C (x), i.e. shift to the right, the 0-th order term is left + for (i = nroots - 1; i >= 1; i --) + Corrector [i] = Corrector [i - 1]; + Corrector [0] = 0; + +// and compute a new error + error = syndromes [K]; + for (i = 1; i <= K; i ++) { + error = myGalois. add_poly (error, + myGalois. multiply_poly (syndromes [K - i], + Lambda [i])); + } + K += 1; + } // end of Berlekamp loop + + for (i = 0; i < nroots; i ++) { + if (Lambda [i] != 0) + deg_lambda = i; + Lambda [i] = myGalois. poly2power (Lambda [i]); + } + return deg_lambda; +} +// +// Compute the roots of lambda by evaluating the +// lambda polynome for all (inverted) powers of the symbols +// of the data (Chien search) +int16_t reedSolomon::computeErrors (uint8_t *Lambda, + uint16_t deg_lambda, + uint8_t *rootTable, + uint8_t *locTable) { +int16_t i, j, k; +int16_t rootCount = 0; +// + uint8_t workRegister [nroots + 1]; + memcpy (&workRegister, Lambda, (nroots + 1) * sizeof (uint8_t)); +// +// reg is lambda in power notation + for (i = 1, k = iprim - 1; + i <= codeLength; i ++, k = (k + iprim)) { + uint16_t result = 1; // lambda [0] is always 1 +// Note that for i + 1, the powers in the workregister just need +// to be increased by "j". + for (j = deg_lambda; j > 0; j --) { + if (workRegister [j] != codeLength) { + workRegister [j] = myGalois. multiply_power (workRegister [j], + j); + result = myGalois. add_poly (result, + myGalois. power2poly + (workRegister [j])); + } + } + if (result != 0) // no root + continue; + rootTable [rootCount] = i; + locTable [rootCount] = k; + rootCount ++; + } + if (rootCount != deg_lambda) + return -1; + return rootCount; +} + +/* + * Compute error evaluator poly + * omega(x) = s(x)*lambda(x) (modulo x**NROOTS) + * in power form, and find degree (omega). + * + * Note that syndromes are in poly form, while lambda in power form + */ +uint16_t reedSolomon::computeOmega (uint8_t *syndromes, + uint8_t *lambda, uint16_t deg_lambda, + uint8_t *omega) { +int16_t i, j; +int16_t deg_omega = 0; + + for (i = 0; i < nroots; i++){ + uint16_t tmp = 0; + j = (deg_lambda < i) ? deg_lambda : i; + for (; j >= 0; j--){ + if ((myGalois. poly2power (syndromes [i - j]) != codeLength) && + (lambda [j] != codeLength)) { + uint16_t res = myGalois. power2poly ( + myGalois. multiply_power ( + myGalois. poly2power ( + syndromes [i - j]), + lambda [j])); + tmp = myGalois. add_poly (tmp, res); + } + } + + if (tmp != 0) + deg_omega = i; + omega [i] = myGalois. poly2power (tmp); + } + + omega [nroots] = codeLength; + return deg_omega; +} + diff --git a/src/backend/rscodec.cpp b/src/backend/rscodec.cpp new file mode 100644 index 0000000..f119dc5 --- /dev/null +++ b/src/backend/rscodec.cpp @@ -0,0 +1,409 @@ +# +/* -*- c++ -*- */ +/* + * Copyright 2004,2010 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio 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; either version 3, or (at your option) + * any later version. + * + * GNU Radio 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +// The Gnu radio implementation of the rsCodec +// is included in the sdr-j dab implementation +// Redundant code (redundant due to knowing in compiletime +// the Galois and RS parameters) is removed. +// +#include "rscodec.h" +#include +#include +#include +// +// we know that the size of the codeword is 255, +// while the size of the parity bytes is 10 +// from input r to output d, cutlen is amount of shortening +// we just make it into a 255 byte vector +// +#define NUM_PARITY 10 +#define MESSAGE_LENGTH 245 +#define CODE_LENGTH 255 + +// We combine a simple implementation of the galois fields +// with the rs decoder "borrowed" from Gnu radio +// + rscodec::rscodec (void) { +int16_t i, pm; +int16_t pinit, p1, p2, p3, p4, p5, p6, p7, p8; + +// d_m = 8; +// d_q = 1 << 8; +// d_p = 0435; + pm = d_p - d_q; + + pinit = p2 = p3 = p4 = p5 = p6 = p7 = p8 = 0; + p1 = 1; + + gexp [0] = 0; + gexp [1] = 1; + gexp [255] = gexp [0]; + glog [0] = 0; /* shouldn't log[0] be an error? */ + + for (i = 2; i < 256; i++) { + pinit = p8; + p8 = p7; + p7 = p6; + p6 = p5; + p5 = p4 ^ pinit; + p4 = p3 ^ pinit; + p3 = p2 ^ pinit; + p2 = p1; + p1 = pinit; + gexp [i] = p1 + p2*2 + p3*4 + p4*8 + p5*16 + p6*32 + p7*64 + p8*128; +// gexp [i + 255] = gexp[i]; + } + + for (i = 1; i < 256; i++) { + int16_t z; + for (z = 0; z < 256; z++) { + if (gexp [z] == i) { + glog [i] = z; + break; + } + } + } + + d_g = new int [NUM_PARITY]; + create_polynomials (d_j); // construct the generator polynomial + d_reg = new int [NUM_PARITY]; + syndrome = new int [NUM_PARITY]; + d_euc[0] = new int [NUM_PARITY + 2]; + d_euc[1] = new int [NUM_PARITY + 2]; +} + + rscodec::~rscodec() { + delete [] d_g; + delete [] d_reg; + delete [] syndrome; + delete [] d_euc [0]; + delete [] d_euc [1]; +} + +void rscodec::create_polynomials (int start_j) { +int16_t i; +int16_t tmp_g, tmp_g2; +int16_t k; + +// g has degree 2t, g(0), g(1),..., g(2t-1) are its coefficients, +// g (2t) = 1 is not included + + d_g [NUM_PARITY - 1] = start_j + 1; // power representation + for (k = 1; k < NUM_PARITY; k++){ + tmp_g = d_g [NUM_PARITY - 1]; // preserve for later use + d_g [NUM_PARITY - 1] = add_power (d_g [NUM_PARITY - 1], + start_j + k + 1); + for (i = NUM_PARITY - 2; i >= NUM_PARITY - k; i--){ + tmp_g2 = d_g [i]; + d_g [i] = add_power (multiply_power (tmp_g, start_j + k + 1), + d_g [i]); + tmp_g = tmp_g2; + } + + d_g [NUM_PARITY - k - 1] = + multiply_power (tmp_g, start_j + k + 1); + } +} + +int16_t rscodec::dec (const uint8_t *r, uint8_t *d, int16_t cutlen) { +uint16_t rf [CODE_LENGTH]; +uint16_t df [MESSAGE_LENGTH]; +int16_t i; +int16_t ret; + + memset (rf, 0, cutlen * sizeof (uint16_t)); + for (i = cutlen; i < CODE_LENGTH; i++) + rf [i] = (int16_t) r[i - cutlen]; + + ret = dec_poly (rf, df); + for (i = cutlen; i < MESSAGE_LENGTH; i++) + d [i - cutlen] = (uint8_t) df [i]; + return ret; +} +// calculate the syndrome with Horner +// syndrone [0] is the highest degree coefficient, +// syndrone [2t-1] is the lowest degree coefficient +// i.e. S(X) = syndrome [0]X ^ (2t-1) + syndrome [1]X ^ (2t-2)+... +// + syndrome [2t-1] +int16_t rscodec::dec_poly (const uint16_t *r, uint16_t *d) { +int16_t i,j; + + for (i = 0; i < NUM_PARITY; i++) { + uint16_t sum = r [0]; + uint16_t alpha_i = power2poly (d_j + i + 1); +// syndrome also in polynomial representation + for (j = 1; j < CODE_LENGTH; j++) + sum = add_poly (r [j], + multiply_poly (sum, alpha_i)); + + syndrome [NUM_PARITY - i - 1] = sum; + } +// Euclidean algorithm +// step 1: initialize +// index to 'top', index to 'bottom' is !top + int16_t top = 0; + int16_t deg [2] = {NUM_PARITY, NUM_PARITY - 1}; // top and bottom relaxed degree +// d_euc [top]. clear (); +// d_euc [!top].clear (); + memset (d_euc [top], 0, (NUM_PARITY + 2) * sizeof (d_euc [0][0])); + memset (d_euc[!top], 0, (NUM_PARITY + 2) * sizeof (d_euc [0][0])); + d_euc [top][0] = 1; + d_euc [top][NUM_PARITY + 1] = 1; + //d_euc [!top].set_subvector (0, syndrome); + memcpy (d_euc [!top], syndrome, NUM_PARITY * sizeof (syndrome [0])); + +// step 2: repeat 2t times + int16_t mu [2]; + for (i = 0; i < NUM_PARITY; i++) { +// step 2.a + mu [top] = d_euc [top][0]; + mu[!top] = d_euc [!top][0]; +// step 2.b + if (mu [!top] != 0 && deg [!top] < deg [top]) + top = !top; // swap 'top' and 'bottom' + +// step 2.c + if (mu [!top] != 0){ + for (j = 1; j <= deg [top]; j++){ + d_euc [!top][j] = add_poly ( + multiply_poly (mu [top], d_euc [!top][j]), + multiply_poly (mu[!top], d_euc[top][j])); + } + + for (; j <= deg [!top]; j++) { + d_euc [!top][j] = multiply_poly (mu[top], d_euc[!top][j]); + } + + for (j = NUM_PARITY + 1; j > deg[!top]; j--) { + d_euc [top][j] = add_poly (multiply_poly (mu[top], + d_euc [top][j]), + multiply_poly (mu[!top], + d_euc[!top][j])); + } + + for (; j > deg [top]; j--){ + d_euc [top][j] = multiply_poly (mu [top], d_euc [top][j]); + } + } +// step 2.d +// d_euc[!top].shift_left(0); + memmove (d_euc [!top], d_euc[!top] + 1, + (NUM_PARITY + 1) * sizeof (d_euc[0][0])); + d_euc [!top][NUM_PARITY + 1] = 0; + deg [!top]--; + } +// step 3: output, evaluator=d_euc[!top][0..deg[!top]], +// locator=d_euc[top][2t+1..deg[top]+1], +// highest degree coefficient first +// if deg [top] > deg [!top], then error correctable; +// otherwise uncorrectable error pattern + if (deg [top] <= deg[!top]){ + // d = r.left (MESSAGE_LRNGTH); // no correction attempt if + // uncorrectable error pattern + memcpy (d, r, MESSAGE_LENGTH * sizeof (r [0])); + return -1; + } + + if (deg [top] == NUM_PARITY){ // no error + // d = r.left (MESSAGE_LENGTH); + memcpy (d, r, MESSAGE_LENGTH * sizeof (r[0])); + return 0; + } + +// Chien's Search + int16_t x, x2, y; + int16_t sig_high, sig_low; // sigma_high, sigma_low (temporary) + int16_t sig_even, sig_odd; // sigma_even, sigma_odd: error locator value + int16_t omega; // error evaluator value + int16_t err_cnt = 0; // error symbol counter +// for each information symbol position i, i.e. +// alpha ^ (-i). i represents the exponent of the received polynomial + for (i = CODE_LENGTH - 1; i >= NUM_PARITY; i--){ + x = inverse_power (i + 1); // alpha^(-i). can be optimized + x2 = power2poly (multiply_power (x, x)); // x^2 + x = power2poly (x); +// calculate locator_even(x^2) +// calculate locator_odd(x^2) + sig_high = d_euc [top][NUM_PARITY + 1]; + sig_low = d_euc [top][NUM_PARITY]; + for (j = NUM_PARITY - 1; j > deg [top]; j -= 2) + sig_high = add_poly (multiply_poly (sig_high, x2), + d_euc [top][j]); + + for (j = NUM_PARITY - 2; j > deg[top]; j -= 2) + sig_low = add_poly (multiply_poly (sig_low, x2), + d_euc [top][j]); + +// the last j is deg[top]+2, then sig_low is sig_odd + if (j == deg [top]){ + sig_odd = sig_low; + sig_even = sig_high; + } else { + sig_odd = sig_high; + sig_even = sig_low; + } + +// calculate locator and judge if it is an error location + if (add_poly (sig_even, multiply_poly (x, sig_odd)) != 0) + d [CODE_LENGTH - 1 - i] = r [CODE_LENGTH - 1 - i]; // not an error symbol + else { // located an error + if (sig_odd == 0){ // non-correctable error + // d = r.left (MESSAGE_LENGTH); + memcpy (d, r, MESSAGE_LENGTH * sizeof (r[0])); + return -1; + } +// calculate error evaluator + omega = d_euc [!top][0]; + for (j = 1; j <= deg [!top]; j++) + omega = add_poly (multiply_poly (omega, x), + d_euc [!top][j]); + +// error value. Forney + if (d_j >= 1){ + y = multiply_poly (divide_poly (omega, sig_odd), + pow_poly (x, d_j - 1)); + } else { + y = divide_poly (divide_poly (omega, sig_odd), + pow_poly (x, 1 - d_j)); + } +// error correction + d [CODE_LENGTH - 1 - i] = add_poly (r [CODE_LENGTH - 1 - i], y); + err_cnt++; // count the errors + } + } + + return err_cnt; +} +// +// +// The relevant operations on the galois field and the +// polynomes + +int16_t rscodec::add_poly (int16_t a, int16_t b) { + return a ^ b; +} + +int16_t rscodec::add_power (int16_t a, int16_t b) { + return glog [gexp [a] ^ gexp [b]]; +} + +int16_t rscodec::multiply_poly (int16_t a, int16_t b) { + return gexp [multiply_power (glog [a], glog [b])]; +} + +int16_t rscodec::multiply_power (int16_t a, int16_t b) { + return (a == 0 || b == 0) ? 0 : + (a + b - 2) % (d_q - 1) + 1; +} + +int16_t rscodec::divide_poly (int16_t a, int16_t b) { + return gexp [divide_power (glog [a], glog [b])]; +} + +int16_t rscodec::divide_power (int16_t a, int16_t b) { + assert (b != 0); + return (a == 0) ? 0 : round_mod (a - b, d_q - 1) + 1; +} + +int16_t rscodec::pow_poly (int16_t a, int16_t n) { + return gexp [pow_power (glog [a], n)]; +} + +int16_t rscodec::pow_power (int16_t a, int16_t n) { + return (a == 0) ? 0 : (a - 1) * n % (d_q - 1) + 1; +} + +void rscodec::poly2tuple (int16_t a, uint8_t tuple[]) { +int16_t i; + for (i = 0; i < d_m; i++, a >>= 1) + tuple [i] = (uint8_t)(a & 1); +} + +void rscodec::power2tuple (int16_t a, uint8_t tuple []) { + poly2tuple (gexp [a], tuple); +} + +int16_t rscodec::round_mod (int16_t a, int16_t n) { + return (a % n < 0)? (a % n + n) : (a % n); +} + +int16_t rscodec::power2poly (int16_t a) { + return gexp [a]; +} + +int16_t rscodec::poly2power (int16_t a) { + return glog [a]; +} + +int16_t rscodec::inverse_poly (int16_t a) { + return divide_poly (1, a); +} + +int16_t rscodec::inverse_power (int16_t a) { + return divide_power (1, a); +} +// +// we do not really need here the encoding facility +// it is useful for testing though +void rscodec::enc (const uint8_t *u, uint8_t *c, int16_t cutlen) { +uint16_t uf [MESSAGE_LENGTH]; // full length info bytes +uint16_t cf [CODE_LENGTH]; // full length code bytes +int16_t i; + + assert (cutlen >= 0); + for (i = 0; i < cutlen; i++) + uf [i] = 0; + for (; i < MESSAGE_LENGTH; i++) + uf [i] = (uint16_t)u [i - cutlen]; + enc_poly (uf,cf); + for (i = cutlen; i < CODE_LENGTH; i++) + c [i - cutlen] = (uint8_t)cf [i]; +} +// +// +// encoder is not used in the dab receiver +// +void rscodec::enc_poly (const uint16_t * u, uint16_t * c) { +int16_t i,j; +int16_t fb; + + //d_reg.clear(); + memset (d_reg, 0, NUM_PARITY * sizeof (d_reg[0])); + for (i = 0; i < MESSAGE_LENGTH; i++) { // shift in u + c[i] = u[i]; // k systematic symbols + if (NUM_PARITY / 2 > 0){ + fb = add_poly (u [i], d_reg [NUM_PARITY - 1]); + for (j = NUM_PARITY - 1; j > 0; j--){ + d_reg[j] = add_poly (d_reg[j-1], + multiply_poly (fb, + power2poly (d_g[j]))); + } + + d_reg [0] = multiply_poly (fb, power2poly (d_g [0])); + } + } +// n-k parity symbols + for (i = MESSAGE_LENGTH; i < CODE_LENGTH; i++) + c[i] = d_reg [MESSAGE_LENGTH + NUM_PARITY - 1 - i]; +} + diff --git a/src/backend/uep-protection.cpp b/src/backend/uep-protection.cpp new file mode 100644 index 0000000..1bd6353 --- /dev/null +++ b/src/backend/uep-protection.cpp @@ -0,0 +1,245 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * The deconvolution for uep + */ +#include "dab-constants.h" +#include "uep-protection.h" +#include "protTables.h" + +struct protectionProfile { + int16_t bitRate; + int16_t protLevel; + int16_t L1; + int16_t L2; + int16_t L3; + int16_t L4; + int16_t PI1; + int16_t PI2; + int16_t PI3; + int16_t PI4; +} profileTable [] = { + {32, 5, 3, 4, 17, 0, 5, 3, 2, -1}, + {32, 4, 3, 3, 18, 0, 11, 6, 5, -1}, + {32, 3, 3, 4, 14, 3, 15, 9, 6, 8}, + {32, 2, 3, 4, 14, 3, 22, 13, 8, 13}, + {32, 1, 3, 5, 13, 3, 24, 17, 12, 17}, + + {48, 5, 4, 3, 26, 3, 5, 4, 2, 3}, + {48, 4, 3, 4, 26, 3, 9, 6, 4, 6}, + {48, 3, 3, 4, 26, 3, 15, 10, 6, 9}, + {48, 2, 3, 4, 26, 3, 24, 14, 8, 15}, + {48, 1, 3, 5, 25, 3, 24, 18, 13, 18}, +// +// Thanks to Pr2 who discovered that the tables for 56 were missing + {56, 5, 6, 10, 23, 3, 5, 4, 2, 3}, + {56, 4, 6, 10, 23, 3, 9, 6, 4, 5}, + {56, 3, 6, 12, 21, 3, 16, 7, 6, 9}, + {56, 2, 6, 10, 23, 3, 23, 13, 8, 13}, +// +// edinsam discovered that one of the 64 rows contained an error + {64, 5, 6, 9, 31, 2, 5, 3, 2, 3}, + {64, 4, 6, 9, 33, 0, 11, 6, 5, -1}, + {64, 3, 6, 12, 27, 3, 16, 8, 6, 9}, + {64, 2, 6, 10, 29, 3, 23, 13, 8, 13}, + {64, 1, 6, 11, 28, 3, 24, 18, 12, 18}, + + {80, 5, 6, 10, 41, 3, 6, 3, 2, 3}, + {80, 4, 6, 10, 41, 3, 11, 6, 5, 6}, + {80, 3, 6, 11, 40, 3, 16, 8, 6, 7}, + {80, 2, 6, 10, 41, 3, 23, 13, 8, 13}, + {80, 1, 6, 10, 41, 3, 24, 7, 12, 18}, + + {96, 5, 7, 9, 53, 3, 5, 4, 2, 4}, + {96, 4, 7, 10, 52, 3, 9, 6, 4, 6}, + {96, 3, 6, 12, 51, 3, 16, 9, 6, 10}, + {96, 2, 6, 10, 53, 3, 22, 12, 9, 12}, + {96, 1, 6, 13, 50, 3, 24, 18, 13, 19}, +// +// Thanks to Kalle Riis, who found that the "112" was missing + {112, 5, 14, 17, 50, 3, 5, 4, 2, 5}, + {112, 4, 11, 21, 49, 3, 9, 6, 4, 8}, + {112, 3, 11, 23, 47, 3, 16, 8, 6, 9}, + {112, 2, 11, 21, 49, 3, 23, 12, 9, 14}, + + {128, 5, 12, 19, 62, 3, 5, 3, 2, 4}, + {128, 4, 11, 21, 61, 3, 11, 6, 5, 7}, + {128, 3, 11, 22, 60, 3, 16, 9, 6, 10}, + {128, 2, 11, 21, 61, 3, 22, 12, 9, 14}, + {128, 1, 11, 20, 62, 3, 24, 17, 13, 19}, + + {160, 5, 11, 19, 87, 3, 5, 4, 2, 4}, + {160, 4, 11, 23, 83, 3, 11, 6, 5, 9}, + {160, 3, 11, 24, 82, 3, 16, 8, 6, 11}, + {160, 2, 11, 21, 85, 3, 22, 11, 9, 13}, + {160, 1, 11, 22, 84, 3, 24, 18, 12, 19}, + + {192, 5, 11, 20, 110, 3, 6, 4, 2, 5}, + {192, 4, 11, 22, 108, 3, 10, 6, 4, 9}, + {192, 3, 11, 24, 106, 3, 16, 10, 6, 11}, + {192, 2, 11, 20, 110, 3, 22, 13, 9, 13}, + {192, 1, 11, 21, 109, 3, 24, 20, 13, 24}, + + {224, 5, 12, 22, 131, 3, 8, 6, 2, 6}, + {224, 4, 12, 26, 127, 3, 12, 8, 4, 11}, + {224, 3, 11, 20, 134, 3, 16, 10, 7, 9}, + {224, 2, 11, 22, 132, 3, 24, 16, 10, 15}, + {224, 1, 11, 24, 130, 3, 24, 20, 12, 20}, + + {256, 5, 11, 24, 154, 3, 6, 5, 2, 5}, + {256, 4, 11, 24, 154, 3, 12, 9, 5, 10}, + {256, 3, 11, 27, 151, 3, 16, 10, 7, 10}, + {256, 2, 11, 22, 156, 3, 24, 14, 10, 13}, + {256, 1, 11, 26, 152, 3, 24, 19, 14, 18}, + + {320, 5, 11, 26, 200, 3, 8, 5, 2, 6}, + {320, 4, 11, 25, 201, 3, 13, 9, 5, 10}, + {320, 2, 11, 26, 200, 3, 24, 17, 9, 17}, + + {384, 5, 11, 27, 247, 3, 8, 6, 2, 7}, + {384, 3, 11, 24, 250, 3, 16, 9, 7, 10}, + {384, 1, 12, 28, 245, 3, 24, 20, 14, 23}, + {0, -1, -1, -1, -1, -1, -1, -1, -1, -1} +}; + +static +int16_t findIndex (int16_t bitRate, int16_t protLevel) { +int16_t i; + + for (i = 0; profileTable [i].bitRate != 0; i ++) + if ((profileTable [i]. bitRate == bitRate) && + (profileTable [i]. protLevel == protLevel)) + return i; + + return -1; +} + +/** + * the table is based on chapter 11 of the DAB standard. + * + * \brief uep_deconvolve + * + * The bitRate and the protectionLevel determine the + * depuncturing scheme. + */ + uep_protection::uep_protection (int16_t bitRate, + int16_t protLevel): + protection (bitRate, protLevel) { +int16_t index, i, j; +int16_t viterbiCounter = 0; +int16_t L1; +int16_t L2; +int16_t L3; +int16_t L4; +int8_t *PI1; +int8_t *PI2; +int8_t *PI3; +int8_t *PI4; +int8_t *PI_X; + + fprintf (stderr, "protLevel %d, bitRate %d\n", protLevel, bitRate); + index = findIndex (bitRate, protLevel); + if (index == -1) { + fprintf (stderr, "%d (%d) has a problem\n", bitRate, protLevel); + index = 1; + } + + L1 = profileTable [index]. L1; + L2 = profileTable [index]. L2; + L3 = profileTable [index]. L3; + L4 = profileTable [index]. L4; + + PI1 = get_PCodes (profileTable [index]. PI1 -1); + PI2 = get_PCodes (profileTable [index]. PI2 -1); + PI3 = get_PCodes (profileTable [index]. PI3 -1); + if ((profileTable [index]. PI4 - 1) != -1) + PI4 = get_PCodes (profileTable [index]. PI4 -1); + else + PI4 = NULL; + + PI_X = get_PCodes (8 - 1); +// +// We prepare a mapping table with the given punctures + memset (indexTable. data (), 0, (4 * outSize + 24) * sizeof (uint8_t)); + for (i = 0; i < L1; i ++) { + for (j = 0; j < 128; j ++) { + if (PI1 [j % 32] != 0) + indexTable [viterbiCounter] = true; + viterbiCounter ++; + } + } + + for (i = 0; i < L2; i ++) { + for (j = 0; j < 128; j ++) { + if (PI2 [j % 32] != 0) + indexTable [viterbiCounter] = true; + viterbiCounter ++; + } + } + + for (i = 0; i < L3; i ++) { + for (j = 0; j < 128; j ++) { + if (PI3 [j % 32] != 0) + indexTable [viterbiCounter] = true; + viterbiCounter ++; + } + } + + if (PI4 != NULL) + for (i = 0; i < L4; i ++) { + for (j = 0; j < 128; j ++) { + if (PI4 [j % 32] != 0) + indexTable [viterbiCounter] = true; + viterbiCounter ++; + } + } + +/** + * we have a final block of 24 bits with puncturing according to PI_X + * This block constitues the 6 * 4 bits of the register itself. + */ + for (i = 0; i < 24; i ++) { + if (PI_X [i] != 0) + indexTable [viterbiCounter] = true; + viterbiCounter ++; + } +} + + uep_protection::~uep_protection (void) { +} + +bool uep_protection::deconvolve (int16_t *v, + int32_t size, + uint8_t *outBuffer) { +int16_t i; +int16_t inputCounter = 0; +// clear the bits in the viterbiBlock, +// only the non-punctured ones are set + memset (viterbiBlock. data (), 0, + (outSize * 4 + 24) * sizeof (int16_t)); +/// The actual deconvolution is done by the viterbi decoder + + for (i = 0; i < outSize * 4 + 24; i ++) + if (indexTable [i]) + viterbiBlock [i] = v [inputCounter ++]; + viterbi_768::deconvolve (viterbiBlock. data (), outBuffer); + return true; +} diff --git a/src/backend/virtual-backend.cpp b/src/backend/virtual-backend.cpp new file mode 100644 index 0000000..532da3e --- /dev/null +++ b/src/backend/virtual-backend.cpp @@ -0,0 +1,55 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB. + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +// +// dummy for the dab backends +// +#include "dab-constants.h" +#include "virtual-backend.h" + + virtualBackend::virtualBackend (int32_t a, int16_t b) { + startAddress = a; + segmentLength = b; +} + + virtualBackend::~virtualBackend (void) { +} + +int32_t virtualBackend::process (int16_t *v, int16_t c) { + (void)v; + (void)c; + return 32768; +} + +int32_t virtualBackend::startAddr (void) { + return startAddress; +} + +int16_t virtualBackend::Length (void) { + return segmentLength; +} + +void virtualBackend::stopRunning (void) { +} + +void virtualBackend::stop (void) { +} + diff --git a/src/backend/viterbi.cpp-old b/src/backend/viterbi.cpp-old new file mode 100644 index 0000000..90c665e --- /dev/null +++ b/src/backend/viterbi.cpp-old @@ -0,0 +1,296 @@ +# +/* + * Copyright (C) 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * This viterbi decoder is used for deconvolving the data segments + * for audio and/or data. The code is + * as given by the Spiral Project. All rights gratefully acknowledged. + * decoder + */ +#include +#include +#include "mm_malloc.h" +#include "viterbi.h" +#include +#ifdef __MINGW32__ +#include +#include +#include +#endif + +// +// It took a while to discover that the polynomes I used +// in a "home" made implementation was bitreversed!! +// The official one is on top. +#define K 7 +#define POLYS {0155, 0117, 0123, 0155} +//#define POLYS {109, 79, 83, 109} +// In the reversed form the polys look: +//#define POLYS { 0133, 0171, 0145, 0133 } +//#define POLYS { 91, 121, 101, 91 } + +#define METRICSHIFT 0 +#define PRECISIONSHIFT 0 +#define RENORMALIZE_THRESHOLD 137 + +// +/* ADDSHIFT and SUBSHIFT make sure that the thing returned is a byte. */ +#if (K-1<8) +#define ADDSHIFT (8-(K-1)) +#define SUBSHIFT 0 +#elif (K-1>8) +#define ADDSHIFT 0 +#define SUBSHIFT ((K-1)-8) +#else +#define ADDSHIFT 0 +#define SUBSHIFT 0 +#endif + +static uint8_t Partab [] = +{ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0}; + +// +// One could create the table above, i.e. a 256 entry +// odd-parity lookup table by the following function +// It is now precomputed +static +void partab_init (void){ +int16_t i,cnt,ti; + + for (i = 0; i < 256; i++){ + cnt = 0; + ti = i; + while (ti != 0) { + if (ti & 1) cnt++; + ti >>= 1; + } + Partab [i] = cnt & 1; + } +} + +int16_t viterbi::parity (int16_t x){ + /* Fold down to one byte */ + x ^= (x >> 8); + return Partab [x]; +} + +static inline +void renormalize (int16_t* X, int16_t threshold){ +int32_t i; + + if (X [0] > threshold){ + int16_t min = X [0]; + for (i = 0; i < NUMSTATES; i++) + if (min > X[i]) + min = X[i]; + for (i = 0; i < NUMSTATES; i++) + X[i] -= min; + } +} + + viterbi::viterbi (int16_t wordlength) { +int polys [RATE] = POLYS; + frameBits = wordlength; + +int16_t i, state; +#ifdef __MINGW32__ +uint32_t size; + size = 2 * ((wordlength + (K - 1)) / 8 + 1 + 16) & ~0x0F; + data = (uint8_t *)_aligned_malloc (size, 16); + size = 2 * (RATE * (wordlength + (K - 1)) * sizeof (int16_t) + 1 + 16) & ~0x0F; + symbols = (int16_t *)_aligned_malloc (size, 16); + size = 2 * ((wordlength + (K - 1)) * sizeof (decision_t) + 16) & ~0x0F; + vp. decisions = (decision_t *)_aligned_malloc (size, 16); +#else + if (posix_memalign ((void**)&data, 16, + (wordlength + (K - 1))/ 8 + 1)){ + printf("Allocation of data array failed\n"); + } + if (posix_memalign ((void**)&symbols, 16, + RATE * (wordlength + (K - 1)) * sizeof(int16_t))){ + printf("Allocation of symbols array failed\n"); + } + if (posix_memalign ((void**)&(vp. decisions), + 16, + 2 * (wordlength + (K - 1)) * sizeof (decision_t))){ + printf ("Allocation of vp decisions failed\n"); + } +#endif + + for (state = 0; state < NUMSTATES / 2; state++) { + for (i = 0; i < RATE; i++) + Branchtab [i * NUMSTATES / 2 + state] = + (polys[i] < 0) ^ + parity((2 * state) & abs (polys[i])) ? 255 : 0; + } + init_viterbi (&vp, 0); +} + + + viterbi::~viterbi (void) { +#ifdef __MINGW32__ + _aligned_free (vp. decisions); + _aligned_free (data); + _aligned_free (symbols); +#else + free (vp. decisions); + free (data); + free (symbols); +#endif +} + +static int maskTable [] = {128, 64, 32, 16, 8, 4, 2, 1}; +static inline +uint8_t getbit (uint8_t v, int32_t o) { + return (v & maskTable [o]) ? 1 : 0; +} + +void viterbi::deconvolve (int16_t *input, uint8_t *output) { +int16_t i; + + init_viterbi (&vp, 0); + for (i = 0; i < (uint16_t)(frameBits + (K - 1)) * RATE; i ++) { + int16_t temp = input [i] + 127; + if (temp < 0) temp = 0; + if (temp > 255) temp = 255; + symbols [i] = temp; + } + + update_viterbi_blk_GENERIC (&vp, symbols, frameBits + (K - 1)); + chainback_viterbi (&vp, data, frameBits, 0); + + for (i = 0; i < (int16_t)frameBits; i ++) + output [i] = getbit (data [i >> 3], i & 07); +} + +/* C-language butterfly */ +void viterbi::BFLY (int i, int s, int16_t * syms, + struct v * vp, decision_t * d) { +int32_t j, decision0, decision1; +int16_t metric, m0, m1, m2, m3; + + metric = 0; + for (j = 0; j < RATE;j++) + metric += (Branchtab [i + j * NUMSTATES/2] ^ syms[s * RATE + j]) >> + METRICSHIFT ; + metric = metric >> PRECISIONSHIFT; + const int16_t max = + ((RATE * ((256 - 1) >> METRICSHIFT)) >> PRECISIONSHIFT); + + m0 = vp -> old_metrics->t [i] + metric; + m1 = vp -> old_metrics->t [i + NUMSTATES / 2] + (max - metric); + m2 = vp -> old_metrics->t [i] + (max - metric); + m3 = vp -> old_metrics->t [i + NUMSTATES / 2] + metric; + + decision0 = ((int32_t)(m0 - m1)) > 0; + decision1 = ((int32_t)(m2 - m3)) > 0; + + vp -> new_metrics-> t[2 * i] = decision0 ? m1 : m0; + vp -> new_metrics-> t[2 * i + 1] = decision1 ? m3 : m2; + + d -> w[i/(sizeof(uint32_t)*8/2)+s*(sizeof(decision_t)/sizeof(uint32_t))] |= + (decision0|decision1<<1) << ((2*i)&(sizeof(uint32_t)*8-1)); +} + +/* + * Update decoder with a block of demodulated symbols + * Note that nbits is the number of decoded data bits, not the number + * of symbols! + */ +void viterbi::update_viterbi_blk_GENERIC (struct v *vp, + int16_t *syms, int16_t nbits){ +decision_t *d = (decision_t *)vp -> decisions; +int32_t s, i; + + for (s = 0; s < nbits; s++) + memset (&d [s], 0, sizeof (decision_t)); + + for (s = 0; s < nbits; s++){ + void *tmp; + for (i = 0; i < NUMSTATES / 2; i++) + BFLY (i, s, syms, vp, vp -> decisions); + + renormalize (vp -> new_metrics -> t, RENORMALIZE_THRESHOLD); +// Swap pointers to old and new metrics + tmp = vp -> old_metrics; + vp -> old_metrics = vp -> new_metrics; + vp -> new_metrics = (metric_t *)tmp; + } +} +/* + * Viterbi chainback + */ +void viterbi::chainback_viterbi (struct v *vp, + uint8_t *data, /* Decoded output data */ + int16_t nbits, /* Number of data bits */ + uint16_t endstate){ /*Terminal encoder state */ +decision_t *d = vp -> decisions; + +/* + * Make room beyond the end of the encoder register so we can + * accumulate a full byte of decoded data + */ + endstate = (endstate % NUMSTATES) << ADDSHIFT; +/* + * The store into data[] only needs to be done every 8 bits. + * But this avoids a conditional branch, and the writes will + * combine in the cache anyway + */ + d += (K - 1); /* Look past tail */ + while (nbits-- != 0){ + int k; +// int l = (endstate >> ADDSHIFT) / 32; +// int m = (endstate >> ADDSHIFT) % 32; + k = (d [nbits].w [(endstate >> ADDSHIFT) / 32] >> + ((endstate>>ADDSHIFT) % 32)) & 1; + endstate = (endstate >> 1) | (k << (K - 2 + ADDSHIFT)); + data [nbits >> 3] = endstate >> SUBSHIFT; + } +} + +/* Initialize Viterbi decoder for start of new frame */ +void viterbi::init_viterbi (struct v *p, int16_t starting_state){ +struct v *vp = p; +int32_t i; + + for (i = 0; i < NUMSTATES; i++) + vp -> metrics1.t[i] = 63; + + vp -> old_metrics = &vp -> metrics1; + vp -> new_metrics = &vp -> metrics2; +/* Bias known start state */ + vp -> old_metrics-> t [starting_state & (NUMSTATES-1)] = 0; +} + diff --git a/src/backend/viterbi_768-old/README b/src/backend/viterbi_768-old/README new file mode 100644 index 0000000..e9ea564 --- /dev/null +++ b/src/backend/viterbi_768-old/README @@ -0,0 +1,11 @@ + +The viterbi implementation is copied from the spiral one, all +rights gratefully acknowledged. +Since we serve more than a single platform, we do not use the SSE +implementation. + +The particular spiral implementation (see the file spiral_no_sse.c" +is generated for the wordsize and the other parameters for FIC blocks. +The implementation therefore has a "switch", that - when set to true - +selects the spiral implementation, and - when set to false (the default) - +it uses the generic implementation. diff --git a/src/backend/viterbi_768-old/spiral-no-sse.c b/src/backend/viterbi_768-old/spiral-no-sse.c new file mode 100644 index 0000000..d210527 --- /dev/null +++ b/src/backend/viterbi_768-old/spiral-no-sse.c @@ -0,0 +1,1689 @@ +/*************************************************************** +This code was generated by Spiral 6.0 beta, www.spiral.net -- +Copyright (c) 2005-2008, Carnegie Mellon University. +All rights reserved. +The code is distributed under the GNU General Public License (GPL) +(see http://www.gnu.org/copyleft/gpl.html) + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +*AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************/ +#include "spiral-no-sse.h" + +void init_FULL_SPIRAL() { +} + +void FULL_SPIRAL_no_sse (int amount, unsigned int *Y, unsigned int *X, unsigned int *syms, unsigned int *dec, unsigned int *Branchtab) { +int i3; + for(i3 = 0; i3 < amount; i3++) { +// for(i3 = 0; i3 <= amount; i3++) { + int a2082, a2083, a2084, a2085, a2086, a2087, a2088 + , a2089, a2090, a2091, a2092, a2093, a2094, a2095, a2096 + , a2097, a2098, a2099, a2100, a2101, a2102, a2103, a2104 + , a2105, a2106, a2107, a2108, a2109, a2110, a2111, a2112 + , a2113, a2114, a2115, a2116, a2117, a2118, a2119, a2120 + , a2121, a2122, a2123, a2124, a2125, a2126, a2127, a2128 + , a2129, a2130, a2131, a2132, a2133, a2134, a2135, a2136 + , a2137, a2138, a2139, a2140, a2141, a2142, a2143, a2144 + , a2145, a2146, a2147, a2148, a2149, a2150, a2151, a2152 + , a2153, a2154, a2155, a2156, a2157, a2158, a2159, a2160 + , a2161, a2162, a2163, a2164, a2165, a2166, a2167, a2168 + , a2169, a2170, a2171, a2172, a2173, a2174, a2175, a2176 + , a2177, a2178, a2179, a2180, a2181, a2182, a2183, a2184 + , a2185, a2186, a2187, a2188, a2189, a2190, a2191, a2192 + , a2193, a2194, a2195, a2196, a2197, a2198, a2199, a2200 + , a2201, a2202, a2203, a2204, a2205, a2206, a2207, a2208 + , a2209, a2210, a2211, a2212, a2213, a2214, a2215, a2216 + , a2217, a2218, a2219, a2220, a2221, a2222, a2223, a2224 + , a2225, a2226, a2227, a2228, a2229, a2230, a2231, a2232 + , a2233, a2234, a2235, a2236, a2237, a2238, a2239, a2240 + , a2241, a2242, a2243, a2244, a2245, a2246, a2247, a2248 + , a2249, a2250, a2251, a2252, a2253, a2254, a2255, a2256 + , a2257, a2258, a2259, a2260, a2261, a2262, a2263, a2264 + , a2265, a2266, a2267, a2268, a2269, a2270, a2271, a2272 + , a2273, a2274, a2275, a2276, a2277, a2278, a2279, a2280 + , a2281, a2282, a2283, a2284, a2285, a2286, a2287, a2288 + , a2289, a2290, a2291, a2292, a2293, a2294, a2295, a2296 + , a2297, a2298, a2299, a2300, a2301, a2302, a2303, a2304 + , a2305, a2306, a2307, a2308, a2309, a2310, a2311, a2312 + , a2313, a2314, a2315, a2316, a2317, a2318, a2319, a2320 + , a2321, a2322, a2323, a2324, a2325, a2326, a2327, a2328 + , a2329, a2330, a2331, a2332, a2333, a2334, a2335, a2336 + , a2337, a2338, a2339, a2340, a2341, a2342, a2343, a2344 + , a2345, a2346, a2347, a2348, a2349, a2350, a2351, a2352 + , a2353, a2354, a2355, a2356, a2357, a2358, a2359, a2360 + , a2361, a2362, a2363, a2364, a2365, a2366, a2367, a2368 + , a2369, a2370, a2371, a2372, a2373, a2374, a2375, a2376 + , a2377, a2378, a2379, a2380, a2381, a2382, a2383, a2384 + , a2385, a2386, a2387, a2388, a2389, a2390, a2391, a2392 + , a2393, a2394, a2395, a2396, a2397, a2398, a2399, a2400 + , a2401, a2402, a2403, a2404, a2405, a2406, a2407, a2408 + , a2409, a2410, a2411, a2412, a2413, a2414, a2415, a2416 + , a2417, a2418, a2419, a2420, a2421, a2422, a2423, a2424 + , a2425, a2426, a2427, a2428, a2429, a2430, a2431, a2432 + , a2433, a2434, a2435, a2436, a2437, a2438, a2439, a2440 + , a2441, a2442, a2443, a2444, a2445, a2446, a2447, a2448 + , a2449, a2450, a2451, a2452, a2453, a2454, a2455, a2456 + , a2457, a2458, a2459, a2460, a2461, a2462, a2463, a2464 + , a2465, a2466, a2467, a2468, a2469, a2470, a2471, a2472 + , a2473, a2474, a2475, a2476, a2477, a2478, a2479, a2480 + , a2481, a2482, a2483, a2484, a2485, a2486, a2487, a2488 + , a2489, a2490, a2491, a2492, a2493, a2494, a2495, a2496 + , a2497, a2498, a2499, a2500, a2501, a2502, a2503, a2504 + , a2505, a2506, a2507, a2508, a2509, a2510, a2511, a2512 + , a2513, a2514, a2515, a2516, a2517, a2518, a2519, a2520 + , a2521, a2522, a2523, a2524, a2525, a2526, a2527, a2528 + , a2529, a2530, a2531, a2532, a2533, a2534, a2535, a2536 + , a2537, a2538, a2539, a2540, a2541, a2542, a2543, a2544 + , a2545, a2546, a2547, a2548, a2549, a2550, a2551; + unsigned int d133, d134, d135, d136, d137, d138, d139 + , d140, d141, d142, d143, d144, d145, d146, d147 + , d148, d149, d150, d151, d152, d153, d154, d155 + , d156, d157, d158, d159, d160, d161, d162, d163 + , d164, d165, d166, d167, d168, d169, d170, d171 + , d172, d173, d174, d175, d176, d177, d178, d179 + , d180, d181, d182, d183, d184, d185, d186, d187 + , d188, d189, d190, d191, d192, d193, d194, d195 + , d196, d197, d198, d199, d200, d201, d202, d203 + , d204, d205, d206, d207, d208, d209, d210, d211 + , d212, d213, d214, d215, d216, d217, d218, d219 + , d220, d221, d222, d223, d224, d225, d226, d227 + , d228, d229, d230, d231, d232, d233, d234, d235 + , d236, d237, d238, d239, d240, d241, d242, d243 + , d244, d245, d246, d247, d248, d249, d250, d251 + , d252, d253, d254, d255, d256, d257, d258, d259 + , d260, m265, m266, m267, m268, m269, m270, m271 + , m272, m273, m274, m275, m276, m277, m278, m279 + , m280, m281, m282, m283, m284, m285, m286, m287 + , m288, m289, m290, m291, m292, m293, m294, m295 + , m296, m297, m298, m299, m300, m301, m302, m303 + , m304, m305, m306, m307, m308, m309, m310, m311 + , m312, m313, m314, m315, m316, m317, m318, m319 + , m320, m321, m322, m323, m324, m325, m326, m327 + , m328, m329, m330, m331, m332, m333, m334, m335 + , m336, m337, m338, m339, m340, m341, m342, m343 + , m344, m345, m346, m347, m348, m349, m350, m351 + , m352, m353, m354, m355, m356, m357, m358, m359 + , m360, m361, m362, m363, m364, m365, m366, m367 + , m368, m369, m370, m371, m372, m373, m374, m375 + , m376, m377, m378, m379, m380, m381, m382, m383 + , m384, m385, m387, m388, m389, m390, m391, m392 + , m393, m394, m395, m396, m397, m398, m399, m400 + , m401, m402, m403, m404, m405, m406, m407, m408 + , m409, m410, m411, m412, m413, m414, m415, m416 + , m417, m418, m419, m420, m421, m422, m423, m424 + , m425, m426, m427, m428, m429, m430, m431, m432 + , m433, m434, m435, m436, m437, m438, m439, m440 + , m441, m442, m443, m444, m445, m446, m447, m448 + , m449, m450, m451, m452, m453, m454, m455, m456 + , m457, m458, m459, m460, m461, m462, m463, m464 + , m465, m466, m467, m468, m469, m470, m471, m472 + , m473, m474, m475, m476, m477, m478, m479, m480 + , m481, m482, m483, m484, m485, m486, m487, m488 + , m489, m490, m491, m492, m493, m494, m495, m496 + , m497, m498, m499, m500, m501, m502, m503, m504 + , m505, m506, m507, m508, m509, m510, m511, m512 + , m513, m514, m515, m516, m517, m518, m519, m520 + , m521, s130, s131, s132, s133, s134, s135, s136 + , s137, s138, s139, s140, s141, s142, s143, s144 + , s145, s146, s147, s148, s149, s150, s151, s152 + , s153, s154, s155, s156, s157, s158, s159, s160 + , s161, s162, s163, s164, s165, s166, s167, s168 + , s169, s170, s171, s172, s173, s174, s175, s176 + , s177, s178, s179, s180, s181, s182, s183, s184 + , s185, s186, s187, s188, s189, s190, s191, s192 + , s193, s194, s195, s196, s197, s198, s199, s200 + , s201, s202, s203, s204, s205, s206, s207, s208 + , s209, s210, s211, s212, s213, s214, s215, s216 + , s217, s218, s219, s220, s221, s222, s223, s224 + , s225, s226, s227, s228, s229, s230, s231, s232 + , s233, s234, s235, s236, s237, s238, s239, s240 + , s241, s242, s243, s244, s245, s246, s247, s248 + , s249, s250, s251, s252, s253, s254, s255, s256 + , s257, t325, t326, t327, t328, t329, t330, t331 + , t332, t333, t334, t335, t336, t337, t338, t339 + , t340, t341, t342, t343, t344, t345, t346, t347 + , t348, t349, t350, t351, t352, t353, t354, t355 + , t356, t357, t358, t359, t360, t361, t362, t363 + , t364, t365, t366, t367, t368, t369, t370, t371 + , t372, t373, t374, t375, t376, t377, t378, t379 + , t380, t381, t382, t383, t384, t385, t387, t388 + , t389, t390, t391, t392, t393, t394, t395, t396 + , t397, t398, t399, t400, t401, t402, t403, t404 + , t405, t406, t407, t408, t409, t410, t411, t412 + , t413, t414, t415, t416, t417, t418, t419, t420 + , t421, t422, t423, t424, t425, t426, t427, t428 + , t429, t430, t431, t432, t433, t434, t435, t436 + , t437, t438, t439, t440, t441, t442, t443, t444 + , t445, t446, t447, t448, t449, t450, t451, t452 + , t453, t454, t455, t456, t457, t458, t459, t460 + , t461, t462, t463, t464, t465, t466, t467, t468 + , t469, t470, t471, t472, t473, t474, t475, t476 + , t477, t478, t479, t480, t481, t482, t483, t484 + , t485, t486, t487, t488, t489, t490, t491, t492 + , t493, t494, t495, t496, t497, t498, t499, t500 + , t501, t502, t503, t504, t505, t506, t507, t508 + , t509, t510, t511, t512, t513, t514, t515, t516 + , t517, t518, t519, t520, t521, t522, t523, t524 + , t525, t526, t527, t528, t529, t530, t531, t532 + , t533, t534, t535, t536, t537, t538, t539, t540 + , t541, t542, t543, t544, t545, t546, t547, t548 + , t549, t550, t551, t552, t553, t554, t555, t556 + , t557, t558, t559, t560, t561, t562, t563, t564 + , t565, t566, t567, t568, t569, t570, t571, t572 + , t573, t574, t575, t576, t577, t578, t579, t580 + , t581, t582, t583, t584, t585, t586, t587, t588 + , t589, t590, t591, t592, t593, t594, t595, t596 + , t597, t598, t599, t600, t601, t602, t603, t604 + , t605, t606, t607, t608, t609, t610, t611, t612 + , t613, t614, t615, t616, t617, t618, t619, t620 + , t621, t622, t623, t624, t625, t626, t627, t628 + , t629, t630, t631, t632, t633, t634, t635, t636 + , t637, t638, t639, t640, t641, t642, t643, t644 + , t645; + a2082 = (8*i3); + a2083 = syms[a2082]; + t325 = ((a2083)^(Branchtab[0])); + a2084 = (1 + a2082); + a2085 = syms[a2084]; + a2086 = ((a2085)^(Branchtab[32])); + t326 = (t325 + a2086); + a2087 = (2 + a2082); + a2088 = syms[a2087]; + a2089 = ((a2088)^(Branchtab[64])); + t327 = (t326 + a2089); + a2090 = (3 + a2082); + a2091 = syms[a2090]; + a2092 = ((a2091)^(Branchtab[96])); + t328 = (t327 + a2092); + t329 = (1020 - t328); + m265 = (X[0] + t328); + m266 = (X[32] + t329); + m267 = (X[0] + t329); + m268 = (X[32] + t328); + d133 = ((m265 > m266)); + d134 = ((m267 > m268)); + s130 = ((d133) ? (m266) : (m265)); + s131 = ((d134) ? (m268) : (m267)); + a2093 = (2*i3); + a2094 = ((a2093) << (1)); + a2095 = dec[a2094]; + a2096 = ((d134) << (1)); + a2097 = ((d133)|(a2096)); + a2098 = ((a2097) << (0)); + dec[a2094] = ((a2095)|(a2098)); + Y[0] = s130; + Y[1] = s131; + t330 = ((a2083)^(Branchtab[1])); + a2099 = ((a2085)^(Branchtab[33])); + t331 = (t330 + a2099); + a2100 = ((a2088)^(Branchtab[65])); + t332 = (t331 + a2100); + a2101 = ((a2091)^(Branchtab[97])); + t333 = (t332 + a2101); + t334 = (1020 - t333); + m269 = (X[1] + t333); + m270 = (X[33] + t334); + m271 = (X[1] + t334); + m272 = (X[33] + t333); + d135 = ((m269 > m270)); + d136 = ((m271 > m272)); + s132 = ((d135) ? (m270) : (m269)); + s133 = ((d136) ? (m272) : (m271)); + a2102 = dec[a2094]; + a2103 = ((d136) << (1)); + a2104 = ((d135)|(a2103)); + a2105 = ((a2104) << (2)); + dec[a2094] = ((a2102)|(a2105)); + Y[2] = s132; + Y[3] = s133; + t335 = ((a2083)^(Branchtab[2])); + a2106 = ((a2085)^(Branchtab[34])); + t336 = (t335 + a2106); + a2107 = ((a2088)^(Branchtab[66])); + t337 = (t336 + a2107); + a2108 = ((a2091)^(Branchtab[98])); + t338 = (t337 + a2108); + t339 = (1020 - t338); + m273 = (X[2] + t338); + m274 = (X[34] + t339); + m275 = (X[2] + t339); + m276 = (X[34] + t338); + d137 = ((m273 > m274)); + d138 = ((m275 > m276)); + s134 = ((d137) ? (m274) : (m273)); + s135 = ((d138) ? (m276) : (m275)); + a2109 = dec[a2094]; + a2110 = ((d138) << (1)); + a2111 = ((d137)|(a2110)); + a2112 = ((a2111) << (4)); + dec[a2094] = ((a2109)|(a2112)); + Y[4] = s134; + Y[5] = s135; + t340 = ((a2083)^(Branchtab[3])); + a2113 = ((a2085)^(Branchtab[35])); + t341 = (t340 + a2113); + a2114 = ((a2088)^(Branchtab[67])); + t342 = (t341 + a2114); + a2115 = ((a2091)^(Branchtab[99])); + t343 = (t342 + a2115); + t344 = (1020 - t343); + m277 = (X[3] + t343); + m278 = (X[35] + t344); + m279 = (X[3] + t344); + m280 = (X[35] + t343); + d139 = ((m277 > m278)); + d140 = ((m279 > m280)); + s136 = ((d139) ? (m278) : (m277)); + s137 = ((d140) ? (m280) : (m279)); + a2116 = dec[a2094]; + a2117 = ((d140) << (1)); + a2118 = ((d139)|(a2117)); + a2119 = ((a2118) << (6)); + dec[a2094] = ((a2116)|(a2119)); + Y[6] = s136; + Y[7] = s137; + t345 = ((a2083)^(Branchtab[4])); + a2120 = ((a2085)^(Branchtab[36])); + t346 = (t345 + a2120); + a2121 = ((a2088)^(Branchtab[68])); + t347 = (t346 + a2121); + a2122 = ((a2091)^(Branchtab[100])); + t348 = (t347 + a2122); + t349 = (1020 - t348); + m281 = (X[4] + t348); + m282 = (X[36] + t349); + m283 = (X[4] + t349); + m284 = (X[36] + t348); + d141 = ((m281 > m282)); + d142 = ((m283 > m284)); + s138 = ((d141) ? (m282) : (m281)); + s139 = ((d142) ? (m284) : (m283)); + a2123 = dec[a2094]; + a2124 = ((d142) << (1)); + a2125 = ((d141)|(a2124)); + a2126 = ((a2125) << (8)); + dec[a2094] = ((a2123)|(a2126)); + Y[8] = s138; + Y[9] = s139; + t350 = ((a2083)^(Branchtab[5])); + a2127 = ((a2085)^(Branchtab[37])); + t351 = (t350 + a2127); + a2128 = ((a2088)^(Branchtab[69])); + t352 = (t351 + a2128); + a2129 = ((a2091)^(Branchtab[101])); + t353 = (t352 + a2129); + t354 = (1020 - t353); + m285 = (X[5] + t353); + m286 = (X[37] + t354); + m287 = (X[5] + t354); + m288 = (X[37] + t353); + d143 = ((m285 > m286)); + d144 = ((m287 > m288)); + s140 = ((d143) ? (m286) : (m285)); + s141 = ((d144) ? (m288) : (m287)); + a2130 = dec[a2094]; + a2131 = ((d144) << (1)); + a2132 = ((d143)|(a2131)); + a2133 = ((a2132) << (10)); + dec[a2094] = ((a2130)|(a2133)); + Y[10] = s140; + Y[11] = s141; + t355 = ((a2083)^(Branchtab[6])); + a2134 = ((a2085)^(Branchtab[38])); + t356 = (t355 + a2134); + a2135 = ((a2088)^(Branchtab[70])); + t357 = (t356 + a2135); + a2136 = ((a2091)^(Branchtab[102])); + t358 = (t357 + a2136); + t359 = (1020 - t358); + m289 = (X[6] + t358); + m290 = (X[38] + t359); + m291 = (X[6] + t359); + m292 = (X[38] + t358); + d145 = ((m289 > m290)); + d146 = ((m291 > m292)); + s142 = ((d145) ? (m290) : (m289)); + s143 = ((d146) ? (m292) : (m291)); + a2137 = dec[a2094]; + a2138 = ((d146) << (1)); + a2139 = ((d145)|(a2138)); + a2140 = ((a2139) << (12)); + dec[a2094] = ((a2137)|(a2140)); + Y[12] = s142; + Y[13] = s143; + t360 = ((a2083)^(Branchtab[7])); + a2141 = ((a2085)^(Branchtab[39])); + t361 = (t360 + a2141); + a2142 = ((a2088)^(Branchtab[71])); + t362 = (t361 + a2142); + a2143 = ((a2091)^(Branchtab[103])); + t363 = (t362 + a2143); + t364 = (1020 - t363); + m293 = (X[7] + t363); + m294 = (X[39] + t364); + m295 = (X[7] + t364); + m296 = (X[39] + t363); + d147 = ((m293 > m294)); + d148 = ((m295 > m296)); + s144 = ((d147) ? (m294) : (m293)); + s145 = ((d148) ? (m296) : (m295)); + a2144 = dec[a2094]; + a2145 = ((d148) << (1)); + a2146 = ((d147)|(a2145)); + a2147 = ((a2146) << (14)); + dec[a2094] = ((a2144)|(a2147)); + Y[14] = s144; + Y[15] = s145; + t365 = ((a2083)^(Branchtab[8])); + a2148 = ((a2085)^(Branchtab[40])); + t366 = (t365 + a2148); + a2149 = ((a2088)^(Branchtab[72])); + t367 = (t366 + a2149); + a2150 = ((a2091)^(Branchtab[104])); + t368 = (t367 + a2150); + t369 = (1020 - t368); + m297 = (X[8] + t368); + m298 = (X[40] + t369); + m299 = (X[8] + t369); + m300 = (X[40] + t368); + d149 = ((m297 > m298)); + d150 = ((m299 > m300)); + s146 = ((d149) ? (m298) : (m297)); + s147 = ((d150) ? (m300) : (m299)); + a2151 = dec[a2094]; + a2152 = ((d150) << (1)); + a2153 = ((d149)|(a2152)); + a2154 = ((a2153) << (16)); + dec[a2094] = ((a2151)|(a2154)); + Y[16] = s146; + Y[17] = s147; + t370 = ((a2083)^(Branchtab[9])); + a2155 = ((a2085)^(Branchtab[41])); + t371 = (t370 + a2155); + a2156 = ((a2088)^(Branchtab[73])); + t372 = (t371 + a2156); + a2157 = ((a2091)^(Branchtab[105])); + t373 = (t372 + a2157); + t374 = (1020 - t373); + m301 = (X[9] + t373); + m302 = (X[41] + t374); + m303 = (X[9] + t374); + m304 = (X[41] + t373); + d151 = ((m301 > m302)); + d152 = ((m303 > m304)); + s148 = ((d151) ? (m302) : (m301)); + s149 = ((d152) ? (m304) : (m303)); + a2158 = dec[a2094]; + a2159 = ((d152) << (1)); + a2160 = ((d151)|(a2159)); + a2161 = ((a2160) << (18)); + dec[a2094] = ((a2158)|(a2161)); + Y[18] = s148; + Y[19] = s149; + t375 = ((a2083)^(Branchtab[10])); + a2162 = ((a2085)^(Branchtab[42])); + t376 = (t375 + a2162); + a2163 = ((a2088)^(Branchtab[74])); + t377 = (t376 + a2163); + a2164 = ((a2091)^(Branchtab[106])); + t378 = (t377 + a2164); + t379 = (1020 - t378); + m305 = (X[10] + t378); + m306 = (X[42] + t379); + m307 = (X[10] + t379); + m308 = (X[42] + t378); + d153 = ((m305 > m306)); + d154 = ((m307 > m308)); + s150 = ((d153) ? (m306) : (m305)); + s151 = ((d154) ? (m308) : (m307)); + a2165 = dec[a2094]; + a2166 = ((d154) << (1)); + a2167 = ((d153)|(a2166)); + a2168 = ((a2167) << (20)); + dec[a2094] = ((a2165)|(a2168)); + Y[20] = s150; + Y[21] = s151; + t380 = ((a2083)^(Branchtab[11])); + a2169 = ((a2085)^(Branchtab[43])); + t381 = (t380 + a2169); + a2170 = ((a2088)^(Branchtab[75])); + t382 = (t381 + a2170); + a2171 = ((a2091)^(Branchtab[107])); + t383 = (t382 + a2171); + t384 = (1020 - t383); + m309 = (X[11] + t383); + m310 = (X[43] + t384); + m311 = (X[11] + t384); + m312 = (X[43] + t383); + d155 = ((m309 > m310)); + d156 = ((m311 > m312)); + s152 = ((d155) ? (m310) : (m309)); + s153 = ((d156) ? (m312) : (m311)); + a2172 = dec[a2094]; + a2173 = ((d156) << (1)); + a2174 = ((d155)|(a2173)); + a2175 = ((a2174) << (22)); + dec[a2094] = ((a2172)|(a2175)); + Y[22] = s152; + Y[23] = s153; + t385 = ((a2083)^(Branchtab[12])); + a2176 = ((a2085)^(Branchtab[44])); + t387 = (t385 + a2176); + a2177 = ((a2088)^(Branchtab[76])); + t388 = (t387 + a2177); + a2178 = ((a2091)^(Branchtab[108])); + t389 = (t388 + a2178); + t390 = (1020 - t389); + m313 = (X[12] + t389); + m314 = (X[44] + t390); + m315 = (X[12] + t390); + m316 = (X[44] + t389); + d157 = ((m313 > m314)); + d158 = ((m315 > m316)); + s154 = ((d157) ? (m314) : (m313)); + s155 = ((d158) ? (m316) : (m315)); + a2179 = dec[a2094]; + a2180 = ((d158) << (1)); + a2181 = ((d157)|(a2180)); + a2182 = ((a2181) << (24)); + dec[a2094] = ((a2179)|(a2182)); + Y[24] = s154; + Y[25] = s155; + t391 = ((a2083)^(Branchtab[13])); + a2183 = ((a2085)^(Branchtab[45])); + t392 = (t391 + a2183); + a2184 = ((a2088)^(Branchtab[77])); + t393 = (t392 + a2184); + a2185 = ((a2091)^(Branchtab[109])); + t394 = (t393 + a2185); + t395 = (1020 - t394); + m317 = (X[13] + t394); + m318 = (X[45] + t395); + m319 = (X[13] + t395); + m320 = (X[45] + t394); + d159 = ((m317 > m318)); + d160 = ((m319 > m320)); + s156 = ((d159) ? (m318) : (m317)); + s157 = ((d160) ? (m320) : (m319)); + a2186 = dec[a2094]; + a2187 = ((d160) << (1)); + a2188 = ((d159)|(a2187)); + a2189 = ((a2188) << (26)); + dec[a2094] = ((a2186)|(a2189)); + Y[26] = s156; + Y[27] = s157; + t396 = ((a2083)^(Branchtab[14])); + a2190 = ((a2085)^(Branchtab[46])); + t397 = (t396 + a2190); + a2191 = ((a2088)^(Branchtab[78])); + t398 = (t397 + a2191); + a2192 = ((a2091)^(Branchtab[110])); + t399 = (t398 + a2192); + t400 = (1020 - t399); + m321 = (X[14] + t399); + m322 = (X[46] + t400); + m323 = (X[14] + t400); + m324 = (X[46] + t399); + d161 = ((m321 > m322)); + d162 = ((m323 > m324)); + s158 = ((d161) ? (m322) : (m321)); + s159 = ((d162) ? (m324) : (m323)); + a2193 = dec[a2094]; + a2194 = ((d162) << (1)); + a2195 = ((d161)|(a2194)); + a2196 = ((a2195) << (28)); + dec[a2094] = ((a2193)|(a2196)); + Y[28] = s158; + Y[29] = s159; + t401 = ((a2083)^(Branchtab[15])); + a2197 = ((a2085)^(Branchtab[47])); + t402 = (t401 + a2197); + a2198 = ((a2088)^(Branchtab[79])); + t403 = (t402 + a2198); + a2199 = ((a2091)^(Branchtab[111])); + t404 = (t403 + a2199); + t405 = (1020 - t404); + m325 = (X[15] + t404); + m326 = (X[47] + t405); + m327 = (X[15] + t405); + m328 = (X[47] + t404); + d163 = ((m325 > m326)); + d164 = ((m327 > m328)); + s160 = ((d163) ? (m326) : (m325)); + s161 = ((d164) ? (m328) : (m327)); + a2200 = dec[a2094]; + a2201 = ((d164) << (1)); + a2202 = ((d163)|(a2201)); + a2203 = ((a2202) << (30)); + dec[a2094] = ((a2200)|(a2203)); + Y[30] = s160; + Y[31] = s161; + t406 = ((a2083)^(Branchtab[16])); + a2204 = ((a2085)^(Branchtab[48])); + t407 = (t406 + a2204); + a2205 = ((a2088)^(Branchtab[80])); + t408 = (t407 + a2205); + a2206 = ((a2091)^(Branchtab[112])); + t409 = (t408 + a2206); + t410 = (1020 - t409); + m329 = (X[16] + t409); + m330 = (X[48] + t410); + m331 = (X[16] + t410); + m332 = (X[48] + t409); + d165 = ((m329 > m330)); + d166 = ((m331 > m332)); + s162 = ((d165) ? (m330) : (m329)); + s163 = ((d166) ? (m332) : (m331)); + a2207 = (1 + a2094); + a2208 = dec[a2207]; + a2209 = ((d166) << (1)); + a2210 = ((d165)|(a2209)); + a2211 = ((a2210) << (0)); + dec[a2207] = ((a2208)|(a2211)); + Y[32] = s162; + Y[33] = s163; + t411 = ((a2083)^(Branchtab[17])); + a2212 = ((a2085)^(Branchtab[49])); + t412 = (t411 + a2212); + a2213 = ((a2088)^(Branchtab[81])); + t413 = (t412 + a2213); + a2214 = ((a2091)^(Branchtab[113])); + t414 = (t413 + a2214); + t415 = (1020 - t414); + m333 = (X[17] + t414); + m334 = (X[49] + t415); + m335 = (X[17] + t415); + m336 = (X[49] + t414); + d167 = ((m333 > m334)); + d168 = ((m335 > m336)); + s164 = ((d167) ? (m334) : (m333)); + s165 = ((d168) ? (m336) : (m335)); + a2215 = dec[a2207]; + a2216 = ((d168) << (1)); + a2217 = ((d167)|(a2216)); + a2218 = ((a2217) << (2)); + dec[a2207] = ((a2215)|(a2218)); + Y[34] = s164; + Y[35] = s165; + t416 = ((a2083)^(Branchtab[18])); + a2219 = ((a2085)^(Branchtab[50])); + t417 = (t416 + a2219); + a2220 = ((a2088)^(Branchtab[82])); + t418 = (t417 + a2220); + a2221 = ((a2091)^(Branchtab[114])); + t419 = (t418 + a2221); + t420 = (1020 - t419); + m337 = (X[18] + t419); + m338 = (X[50] + t420); + m339 = (X[18] + t420); + m340 = (X[50] + t419); + d169 = ((m337 > m338)); + d170 = ((m339 > m340)); + s166 = ((d169) ? (m338) : (m337)); + s167 = ((d170) ? (m340) : (m339)); + a2222 = dec[a2207]; + a2223 = ((d170) << (1)); + a2224 = ((d169)|(a2223)); + a2225 = ((a2224) << (4)); + dec[a2207] = ((a2222)|(a2225)); + Y[36] = s166; + Y[37] = s167; + t421 = ((a2083)^(Branchtab[19])); + a2226 = ((a2085)^(Branchtab[51])); + t422 = (t421 + a2226); + a2227 = ((a2088)^(Branchtab[83])); + t423 = (t422 + a2227); + a2228 = ((a2091)^(Branchtab[115])); + t424 = (t423 + a2228); + t425 = (1020 - t424); + m341 = (X[19] + t424); + m342 = (X[51] + t425); + m343 = (X[19] + t425); + m344 = (X[51] + t424); + d171 = ((m341 > m342)); + d172 = ((m343 > m344)); + s168 = ((d171) ? (m342) : (m341)); + s169 = ((d172) ? (m344) : (m343)); + a2229 = dec[a2207]; + a2230 = ((d172) << (1)); + a2231 = ((d171)|(a2230)); + a2232 = ((a2231) << (6)); + dec[a2207] = ((a2229)|(a2232)); + Y[38] = s168; + Y[39] = s169; + t426 = ((a2083)^(Branchtab[20])); + a2233 = ((a2085)^(Branchtab[52])); + t427 = (t426 + a2233); + a2234 = ((a2088)^(Branchtab[84])); + t428 = (t427 + a2234); + a2235 = ((a2091)^(Branchtab[116])); + t429 = (t428 + a2235); + t430 = (1020 - t429); + m345 = (X[20] + t429); + m346 = (X[52] + t430); + m347 = (X[20] + t430); + m348 = (X[52] + t429); + d173 = ((m345 > m346)); + d174 = ((m347 > m348)); + s170 = ((d173) ? (m346) : (m345)); + s171 = ((d174) ? (m348) : (m347)); + a2236 = dec[a2207]; + a2237 = ((d174) << (1)); + a2238 = ((d173)|(a2237)); + a2239 = ((a2238) << (8)); + dec[a2207] = ((a2236)|(a2239)); + Y[40] = s170; + Y[41] = s171; + t431 = ((a2083)^(Branchtab[21])); + a2240 = ((a2085)^(Branchtab[53])); + t432 = (t431 + a2240); + a2241 = ((a2088)^(Branchtab[85])); + t433 = (t432 + a2241); + a2242 = ((a2091)^(Branchtab[117])); + t434 = (t433 + a2242); + t435 = (1020 - t434); + m349 = (X[21] + t434); + m350 = (X[53] + t435); + m351 = (X[21] + t435); + m352 = (X[53] + t434); + d175 = ((m349 > m350)); + d176 = ((m351 > m352)); + s172 = ((d175) ? (m350) : (m349)); + s173 = ((d176) ? (m352) : (m351)); + a2243 = dec[a2207]; + a2244 = ((d176) << (1)); + a2245 = ((d175)|(a2244)); + a2246 = ((a2245) << (10)); + dec[a2207] = ((a2243)|(a2246)); + Y[42] = s172; + Y[43] = s173; + t436 = ((a2083)^(Branchtab[22])); + a2247 = ((a2085)^(Branchtab[54])); + t437 = (t436 + a2247); + a2248 = ((a2088)^(Branchtab[86])); + t438 = (t437 + a2248); + a2249 = ((a2091)^(Branchtab[118])); + t439 = (t438 + a2249); + t440 = (1020 - t439); + m353 = (X[22] + t439); + m354 = (X[54] + t440); + m355 = (X[22] + t440); + m356 = (X[54] + t439); + d177 = ((m353 > m354)); + d178 = ((m355 > m356)); + s174 = ((d177) ? (m354) : (m353)); + s175 = ((d178) ? (m356) : (m355)); + a2250 = dec[a2207]; + a2251 = ((d178) << (1)); + a2252 = ((d177)|(a2251)); + a2253 = ((a2252) << (12)); + dec[a2207] = ((a2250)|(a2253)); + Y[44] = s174; + Y[45] = s175; + t441 = ((a2083)^(Branchtab[23])); + a2254 = ((a2085)^(Branchtab[55])); + t442 = (t441 + a2254); + a2255 = ((a2088)^(Branchtab[87])); + t443 = (t442 + a2255); + a2256 = ((a2091)^(Branchtab[119])); + t444 = (t443 + a2256); + t445 = (1020 - t444); + m357 = (X[23] + t444); + m358 = (X[55] + t445); + m359 = (X[23] + t445); + m360 = (X[55] + t444); + d179 = ((m357 > m358)); + d180 = ((m359 > m360)); + s176 = ((d179) ? (m358) : (m357)); + s177 = ((d180) ? (m360) : (m359)); + a2257 = dec[a2207]; + a2258 = ((d180) << (1)); + a2259 = ((d179)|(a2258)); + a2260 = ((a2259) << (14)); + dec[a2207] = ((a2257)|(a2260)); + Y[46] = s176; + Y[47] = s177; + t446 = ((a2083)^(Branchtab[24])); + a2261 = ((a2085)^(Branchtab[56])); + t447 = (t446 + a2261); + a2262 = ((a2088)^(Branchtab[88])); + t448 = (t447 + a2262); + a2263 = ((a2091)^(Branchtab[120])); + t449 = (t448 + a2263); + t450 = (1020 - t449); + m361 = (X[24] + t449); + m362 = (X[56] + t450); + m363 = (X[24] + t450); + m364 = (X[56] + t449); + d181 = ((m361 > m362)); + d182 = ((m363 > m364)); + s178 = ((d181) ? (m362) : (m361)); + s179 = ((d182) ? (m364) : (m363)); + a2264 = dec[a2207]; + a2265 = ((d182) << (1)); + a2266 = ((d181)|(a2265)); + a2267 = ((a2266) << (16)); + dec[a2207] = ((a2264)|(a2267)); + Y[48] = s178; + Y[49] = s179; + t451 = ((a2083)^(Branchtab[25])); + a2268 = ((a2085)^(Branchtab[57])); + t452 = (t451 + a2268); + a2269 = ((a2088)^(Branchtab[89])); + t453 = (t452 + a2269); + a2270 = ((a2091)^(Branchtab[121])); + t454 = (t453 + a2270); + t455 = (1020 - t454); + m365 = (X[25] + t454); + m366 = (X[57] + t455); + m367 = (X[25] + t455); + m368 = (X[57] + t454); + d183 = ((m365 > m366)); + d184 = ((m367 > m368)); + s180 = ((d183) ? (m366) : (m365)); + s181 = ((d184) ? (m368) : (m367)); + a2271 = dec[a2207]; + a2272 = ((d184) << (1)); + a2273 = ((d183)|(a2272)); + a2274 = ((a2273) << (18)); + dec[a2207] = ((a2271)|(a2274)); + Y[50] = s180; + Y[51] = s181; + t456 = ((a2083)^(Branchtab[26])); + a2275 = ((a2085)^(Branchtab[58])); + t457 = (t456 + a2275); + a2276 = ((a2088)^(Branchtab[90])); + t458 = (t457 + a2276); + a2277 = ((a2091)^(Branchtab[122])); + t459 = (t458 + a2277); + t460 = (1020 - t459); + m369 = (X[26] + t459); + m370 = (X[58] + t460); + m371 = (X[26] + t460); + m372 = (X[58] + t459); + d185 = ((m369 > m370)); + d186 = ((m371 > m372)); + s182 = ((d185) ? (m370) : (m369)); + s183 = ((d186) ? (m372) : (m371)); + a2278 = dec[a2207]; + a2279 = ((d186) << (1)); + a2280 = ((d185)|(a2279)); + a2281 = ((a2280) << (20)); + dec[a2207] = ((a2278)|(a2281)); + Y[52] = s182; + Y[53] = s183; + t461 = ((a2083)^(Branchtab[27])); + a2282 = ((a2085)^(Branchtab[59])); + t462 = (t461 + a2282); + a2283 = ((a2088)^(Branchtab[91])); + t463 = (t462 + a2283); + a2284 = ((a2091)^(Branchtab[123])); + t464 = (t463 + a2284); + t465 = (1020 - t464); + m373 = (X[27] + t464); + m374 = (X[59] + t465); + m375 = (X[27] + t465); + m376 = (X[59] + t464); + d187 = ((m373 > m374)); + d188 = ((m375 > m376)); + s184 = ((d187) ? (m374) : (m373)); + s185 = ((d188) ? (m376) : (m375)); + a2285 = dec[a2207]; + a2286 = ((d188) << (1)); + a2287 = ((d187)|(a2286)); + a2288 = ((a2287) << (22)); + dec[a2207] = ((a2285)|(a2288)); + Y[54] = s184; + Y[55] = s185; + t466 = ((a2083)^(Branchtab[28])); + a2289 = ((a2085)^(Branchtab[60])); + t467 = (t466 + a2289); + a2290 = ((a2088)^(Branchtab[92])); + t468 = (t467 + a2290); + a2291 = ((a2091)^(Branchtab[124])); + t469 = (t468 + a2291); + t470 = (1020 - t469); + m377 = (X[28] + t469); + m378 = (X[60] + t470); + m379 = (X[28] + t470); + m380 = (X[60] + t469); + d189 = ((m377 > m378)); + d190 = ((m379 > m380)); + s186 = ((d189) ? (m378) : (m377)); + s187 = ((d190) ? (m380) : (m379)); + a2292 = dec[a2207]; + a2293 = ((d190) << (1)); + a2294 = ((d189)|(a2293)); + a2295 = ((a2294) << (24)); + dec[a2207] = ((a2292)|(a2295)); + Y[56] = s186; + Y[57] = s187; + t471 = ((a2083)^(Branchtab[29])); + a2296 = ((a2085)^(Branchtab[61])); + t472 = (t471 + a2296); + a2297 = ((a2088)^(Branchtab[93])); + t473 = (t472 + a2297); + a2298 = ((a2091)^(Branchtab[125])); + t474 = (t473 + a2298); + t475 = (1020 - t474); + m381 = (X[29] + t474); + m382 = (X[61] + t475); + m383 = (X[29] + t475); + m384 = (X[61] + t474); + d191 = ((m381 > m382)); + d192 = ((m383 > m384)); + s188 = ((d191) ? (m382) : (m381)); + s189 = ((d192) ? (m384) : (m383)); + a2299 = dec[a2207]; + a2300 = ((d192) << (1)); + a2301 = ((d191)|(a2300)); + a2302 = ((a2301) << (26)); + dec[a2207] = ((a2299)|(a2302)); + Y[58] = s188; + Y[59] = s189; + t476 = ((a2083)^(Branchtab[30])); + a2303 = ((a2085)^(Branchtab[62])); + t477 = (t476 + a2303); + a2304 = ((a2088)^(Branchtab[94])); + t478 = (t477 + a2304); + a2305 = ((a2091)^(Branchtab[126])); + t479 = (t478 + a2305); + t480 = (1020 - t479); + m385 = (X[30] + t479); + m387 = (X[62] + t480); + m388 = (X[30] + t480); + m389 = (X[62] + t479); + d193 = ((m385 > m387)); + d194 = ((m388 > m389)); + s190 = ((d193) ? (m387) : (m385)); + s191 = ((d194) ? (m389) : (m388)); + a2306 = dec[a2207]; + a2307 = ((d194) << (1)); + a2308 = ((d193)|(a2307)); + a2309 = ((a2308) << (28)); + dec[a2207] = ((a2306)|(a2309)); + Y[60] = s190; + Y[61] = s191; + t481 = ((a2083)^(Branchtab[31])); + a2310 = ((a2085)^(Branchtab[63])); + t482 = (t481 + a2310); + a2311 = ((a2088)^(Branchtab[95])); + t483 = (t482 + a2311); + a2312 = ((a2091)^(Branchtab[127])); + t484 = (t483 + a2312); + t485 = (1020 - t484); + m390 = (X[31] + t484); + m391 = (X[63] + t485); + m392 = (X[31] + t485); + m393 = (X[63] + t484); + d195 = ((m390 > m391)); + d196 = ((m392 > m393)); + s192 = ((d195) ? (m391) : (m390)); + s193 = ((d196) ? (m393) : (m392)); + a2313 = dec[a2207]; + a2314 = ((d196) << (1)); + a2315 = ((d195)|(a2314)); + a2316 = ((a2315) << (30)); + dec[a2207] = ((a2313)|(a2316)); + Y[62] = s192; + Y[63] = s193; + a2317 = (4 + a2082); + a2318 = syms[a2317]; + t486 = ((a2318)^(Branchtab[0])); + a2319 = (5 + a2082); + a2320 = syms[a2319]; + a2321 = ((a2320)^(Branchtab[32])); + t487 = (t486 + a2321); + a2322 = (6 + a2082); + a2323 = syms[a2322]; + a2324 = ((a2323)^(Branchtab[64])); + t488 = (t487 + a2324); + a2325 = (7 + a2082); + a2326 = syms[a2325]; + a2327 = ((a2326)^(Branchtab[96])); + t489 = (t488 + a2327); + t490 = (1020 - t489); + m394 = (Y[0] + t489); + m395 = (Y[32] + t490); + m396 = (Y[0] + t490); + m397 = (Y[32] + t489); + d197 = ((m394 > m395)); + d198 = ((m396 > m397)); + s194 = ((d197) ? (m395) : (m394)); + s195 = ((d198) ? (m397) : (m396)); + a2328 = (1 + a2093); + a2329 = ((a2328) << (1)); + a2330 = dec[a2329]; + a2331 = ((d198) << (1)); + a2332 = ((d197)|(a2331)); + a2333 = ((a2332) << (0)); + dec[a2329] = ((a2330)|(a2333)); + X[0] = s194; + X[1] = s195; + t491 = ((a2318)^(Branchtab[1])); + a2334 = ((a2320)^(Branchtab[33])); + t492 = (t491 + a2334); + a2335 = ((a2323)^(Branchtab[65])); + t493 = (t492 + a2335); + a2336 = ((a2326)^(Branchtab[97])); + t494 = (t493 + a2336); + t495 = (1020 - t494); + m398 = (Y[1] + t494); + m399 = (Y[33] + t495); + m400 = (Y[1] + t495); + m401 = (Y[33] + t494); + d199 = ((m398 > m399)); + d200 = ((m400 > m401)); + s196 = ((d199) ? (m399) : (m398)); + s197 = ((d200) ? (m401) : (m400)); + a2337 = dec[a2329]; + a2338 = ((d200) << (1)); + a2339 = ((d199)|(a2338)); + a2340 = ((a2339) << (2)); + dec[a2329] = ((a2337)|(a2340)); + X[2] = s196; + X[3] = s197; + t496 = ((a2318)^(Branchtab[2])); + a2341 = ((a2320)^(Branchtab[34])); + t497 = (t496 + a2341); + a2342 = ((a2323)^(Branchtab[66])); + t498 = (t497 + a2342); + a2343 = ((a2326)^(Branchtab[98])); + t499 = (t498 + a2343); + t500 = (1020 - t499); + m402 = (Y[2] + t499); + m403 = (Y[34] + t500); + m404 = (Y[2] + t500); + m405 = (Y[34] + t499); + d201 = ((m402 > m403)); + d202 = ((m404 > m405)); + s198 = ((d201) ? (m403) : (m402)); + s199 = ((d202) ? (m405) : (m404)); + a2344 = dec[a2329]; + a2345 = ((d202) << (1)); + a2346 = ((d201)|(a2345)); + a2347 = ((a2346) << (4)); + dec[a2329] = ((a2344)|(a2347)); + X[4] = s198; + X[5] = s199; + t501 = ((a2318)^(Branchtab[3])); + a2348 = ((a2320)^(Branchtab[35])); + t502 = (t501 + a2348); + a2349 = ((a2323)^(Branchtab[67])); + t503 = (t502 + a2349); + a2350 = ((a2326)^(Branchtab[99])); + t504 = (t503 + a2350); + t505 = (1020 - t504); + m406 = (Y[3] + t504); + m407 = (Y[35] + t505); + m408 = (Y[3] + t505); + m409 = (Y[35] + t504); + d203 = ((m406 > m407)); + d204 = ((m408 > m409)); + s200 = ((d203) ? (m407) : (m406)); + s201 = ((d204) ? (m409) : (m408)); + a2351 = dec[a2329]; + a2352 = ((d204) << (1)); + a2353 = ((d203)|(a2352)); + a2354 = ((a2353) << (6)); + dec[a2329] = ((a2351)|(a2354)); + X[6] = s200; + X[7] = s201; + t506 = ((a2318)^(Branchtab[4])); + a2355 = ((a2320)^(Branchtab[36])); + t507 = (t506 + a2355); + a2356 = ((a2323)^(Branchtab[68])); + t508 = (t507 + a2356); + a2357 = ((a2326)^(Branchtab[100])); + t509 = (t508 + a2357); + t510 = (1020 - t509); + m410 = (Y[4] + t509); + m411 = (Y[36] + t510); + m412 = (Y[4] + t510); + m413 = (Y[36] + t509); + d205 = ((m410 > m411)); + d206 = ((m412 > m413)); + s202 = ((d205) ? (m411) : (m410)); + s203 = ((d206) ? (m413) : (m412)); + a2358 = dec[a2329]; + a2359 = ((d206) << (1)); + a2360 = ((d205)|(a2359)); + a2361 = ((a2360) << (8)); + dec[a2329] = ((a2358)|(a2361)); + X[8] = s202; + X[9] = s203; + t511 = ((a2318)^(Branchtab[5])); + a2362 = ((a2320)^(Branchtab[37])); + t512 = (t511 + a2362); + a2363 = ((a2323)^(Branchtab[69])); + t513 = (t512 + a2363); + a2364 = ((a2326)^(Branchtab[101])); + t514 = (t513 + a2364); + t515 = (1020 - t514); + m414 = (Y[5] + t514); + m415 = (Y[37] + t515); + m416 = (Y[5] + t515); + m417 = (Y[37] + t514); + d207 = ((m414 > m415)); + d208 = ((m416 > m417)); + s204 = ((d207) ? (m415) : (m414)); + s205 = ((d208) ? (m417) : (m416)); + a2365 = dec[a2329]; + a2366 = ((d208) << (1)); + a2367 = ((d207)|(a2366)); + a2368 = ((a2367) << (10)); + dec[a2329] = ((a2365)|(a2368)); + X[10] = s204; + X[11] = s205; + t516 = ((a2318)^(Branchtab[6])); + a2369 = ((a2320)^(Branchtab[38])); + t517 = (t516 + a2369); + a2370 = ((a2323)^(Branchtab[70])); + t518 = (t517 + a2370); + a2371 = ((a2326)^(Branchtab[102])); + t519 = (t518 + a2371); + t520 = (1020 - t519); + m418 = (Y[6] + t519); + m419 = (Y[38] + t520); + m420 = (Y[6] + t520); + m421 = (Y[38] + t519); + d209 = ((m418 > m419)); + d210 = ((m420 > m421)); + s206 = ((d209) ? (m419) : (m418)); + s207 = ((d210) ? (m421) : (m420)); + a2372 = dec[a2329]; + a2373 = ((d210) << (1)); + a2374 = ((d209)|(a2373)); + a2375 = ((a2374) << (12)); + dec[a2329] = ((a2372)|(a2375)); + X[12] = s206; + X[13] = s207; + t521 = ((a2318)^(Branchtab[7])); + a2376 = ((a2320)^(Branchtab[39])); + t522 = (t521 + a2376); + a2377 = ((a2323)^(Branchtab[71])); + t523 = (t522 + a2377); + a2378 = ((a2326)^(Branchtab[103])); + t524 = (t523 + a2378); + t525 = (1020 - t524); + m422 = (Y[7] + t524); + m423 = (Y[39] + t525); + m424 = (Y[7] + t525); + m425 = (Y[39] + t524); + d211 = ((m422 > m423)); + d212 = ((m424 > m425)); + s208 = ((d211) ? (m423) : (m422)); + s209 = ((d212) ? (m425) : (m424)); + a2379 = dec[a2329]; + a2380 = ((d212) << (1)); + a2381 = ((d211)|(a2380)); + a2382 = ((a2381) << (14)); + dec[a2329] = ((a2379)|(a2382)); + X[14] = s208; + X[15] = s209; + t526 = ((a2318)^(Branchtab[8])); + a2383 = ((a2320)^(Branchtab[40])); + t527 = (t526 + a2383); + a2384 = ((a2323)^(Branchtab[72])); + t528 = (t527 + a2384); + a2385 = ((a2326)^(Branchtab[104])); + t529 = (t528 + a2385); + t530 = (1020 - t529); + m426 = (Y[8] + t529); + m427 = (Y[40] + t530); + m428 = (Y[8] + t530); + m429 = (Y[40] + t529); + d213 = ((m426 > m427)); + d214 = ((m428 > m429)); + s210 = ((d213) ? (m427) : (m426)); + s211 = ((d214) ? (m429) : (m428)); + a2386 = dec[a2329]; + a2387 = ((d214) << (1)); + a2388 = ((d213)|(a2387)); + a2389 = ((a2388) << (16)); + dec[a2329] = ((a2386)|(a2389)); + X[16] = s210; + X[17] = s211; + t531 = ((a2318)^(Branchtab[9])); + a2390 = ((a2320)^(Branchtab[41])); + t532 = (t531 + a2390); + a2391 = ((a2323)^(Branchtab[73])); + t533 = (t532 + a2391); + a2392 = ((a2326)^(Branchtab[105])); + t534 = (t533 + a2392); + t535 = (1020 - t534); + m430 = (Y[9] + t534); + m431 = (Y[41] + t535); + m432 = (Y[9] + t535); + m433 = (Y[41] + t534); + d215 = ((m430 > m431)); + d216 = ((m432 > m433)); + s212 = ((d215) ? (m431) : (m430)); + s213 = ((d216) ? (m433) : (m432)); + a2393 = dec[a2329]; + a2394 = ((d216) << (1)); + a2395 = ((d215)|(a2394)); + a2396 = ((a2395) << (18)); + dec[a2329] = ((a2393)|(a2396)); + X[18] = s212; + X[19] = s213; + t536 = ((a2318)^(Branchtab[10])); + a2397 = ((a2320)^(Branchtab[42])); + t537 = (t536 + a2397); + a2398 = ((a2323)^(Branchtab[74])); + t538 = (t537 + a2398); + a2399 = ((a2326)^(Branchtab[106])); + t539 = (t538 + a2399); + t540 = (1020 - t539); + m434 = (Y[10] + t539); + m435 = (Y[42] + t540); + m436 = (Y[10] + t540); + m437 = (Y[42] + t539); + d217 = ((m434 > m435)); + d218 = ((m436 > m437)); + s214 = ((d217) ? (m435) : (m434)); + s215 = ((d218) ? (m437) : (m436)); + a2400 = dec[a2329]; + a2401 = ((d218) << (1)); + a2402 = ((d217)|(a2401)); + a2403 = ((a2402) << (20)); + dec[a2329] = ((a2400)|(a2403)); + X[20] = s214; + X[21] = s215; + t541 = ((a2318)^(Branchtab[11])); + a2404 = ((a2320)^(Branchtab[43])); + t542 = (t541 + a2404); + a2405 = ((a2323)^(Branchtab[75])); + t543 = (t542 + a2405); + a2406 = ((a2326)^(Branchtab[107])); + t544 = (t543 + a2406); + t545 = (1020 - t544); + m438 = (Y[11] + t544); + m439 = (Y[43] + t545); + m440 = (Y[11] + t545); + m441 = (Y[43] + t544); + d219 = ((m438 > m439)); + d220 = ((m440 > m441)); + s216 = ((d219) ? (m439) : (m438)); + s217 = ((d220) ? (m441) : (m440)); + a2407 = dec[a2329]; + a2408 = ((d220) << (1)); + a2409 = ((d219)|(a2408)); + a2410 = ((a2409) << (22)); + dec[a2329] = ((a2407)|(a2410)); + X[22] = s216; + X[23] = s217; + t546 = ((a2318)^(Branchtab[12])); + a2411 = ((a2320)^(Branchtab[44])); + t547 = (t546 + a2411); + a2412 = ((a2323)^(Branchtab[76])); + t548 = (t547 + a2412); + a2413 = ((a2326)^(Branchtab[108])); + t549 = (t548 + a2413); + t550 = (1020 - t549); + m442 = (Y[12] + t549); + m443 = (Y[44] + t550); + m444 = (Y[12] + t550); + m445 = (Y[44] + t549); + d221 = ((m442 > m443)); + d222 = ((m444 > m445)); + s218 = ((d221) ? (m443) : (m442)); + s219 = ((d222) ? (m445) : (m444)); + a2414 = dec[a2329]; + a2415 = ((d222) << (1)); + a2416 = ((d221)|(a2415)); + a2417 = ((a2416) << (24)); + dec[a2329] = ((a2414)|(a2417)); + X[24] = s218; + X[25] = s219; + t551 = ((a2318)^(Branchtab[13])); + a2418 = ((a2320)^(Branchtab[45])); + t552 = (t551 + a2418); + a2419 = ((a2323)^(Branchtab[77])); + t553 = (t552 + a2419); + a2420 = ((a2326)^(Branchtab[109])); + t554 = (t553 + a2420); + t555 = (1020 - t554); + m446 = (Y[13] + t554); + m447 = (Y[45] + t555); + m448 = (Y[13] + t555); + m449 = (Y[45] + t554); + d223 = ((m446 > m447)); + d224 = ((m448 > m449)); + s220 = ((d223) ? (m447) : (m446)); + s221 = ((d224) ? (m449) : (m448)); + a2421 = dec[a2329]; + a2422 = ((d224) << (1)); + a2423 = ((d223)|(a2422)); + a2424 = ((a2423) << (26)); + dec[a2329] = ((a2421)|(a2424)); + X[26] = s220; + X[27] = s221; + t556 = ((a2318)^(Branchtab[14])); + a2425 = ((a2320)^(Branchtab[46])); + t557 = (t556 + a2425); + a2426 = ((a2323)^(Branchtab[78])); + t558 = (t557 + a2426); + a2427 = ((a2326)^(Branchtab[110])); + t559 = (t558 + a2427); + t560 = (1020 - t559); + m450 = (Y[14] + t559); + m451 = (Y[46] + t560); + m452 = (Y[14] + t560); + m453 = (Y[46] + t559); + d225 = ((m450 > m451)); + d226 = ((m452 > m453)); + s222 = ((d225) ? (m451) : (m450)); + s223 = ((d226) ? (m453) : (m452)); + a2428 = dec[a2329]; + a2429 = ((d226) << (1)); + a2430 = ((d225)|(a2429)); + a2431 = ((a2430) << (28)); + dec[a2329] = ((a2428)|(a2431)); + X[28] = s222; + X[29] = s223; + t561 = ((a2318)^(Branchtab[15])); + a2432 = ((a2320)^(Branchtab[47])); + t562 = (t561 + a2432); + a2433 = ((a2323)^(Branchtab[79])); + t563 = (t562 + a2433); + a2434 = ((a2326)^(Branchtab[111])); + t564 = (t563 + a2434); + t565 = (1020 - t564); + m454 = (Y[15] + t564); + m455 = (Y[47] + t565); + m456 = (Y[15] + t565); + m457 = (Y[47] + t564); + d227 = ((m454 > m455)); + d228 = ((m456 > m457)); + s224 = ((d227) ? (m455) : (m454)); + s225 = ((d228) ? (m457) : (m456)); + a2435 = dec[a2329]; + a2436 = ((d228) << (1)); + a2437 = ((d227)|(a2436)); + a2438 = ((a2437) << (30)); + dec[a2329] = ((a2435)|(a2438)); + X[30] = s224; + X[31] = s225; + t566 = ((a2318)^(Branchtab[16])); + a2439 = ((a2320)^(Branchtab[48])); + t567 = (t566 + a2439); + a2440 = ((a2323)^(Branchtab[80])); + t568 = (t567 + a2440); + a2441 = ((a2326)^(Branchtab[112])); + t569 = (t568 + a2441); + t570 = (1020 - t569); + m458 = (Y[16] + t569); + m459 = (Y[48] + t570); + m460 = (Y[16] + t570); + m461 = (Y[48] + t569); + d229 = ((m458 > m459)); + d230 = ((m460 > m461)); + s226 = ((d229) ? (m459) : (m458)); + s227 = ((d230) ? (m461) : (m460)); + a2442 = (1 + a2329); + a2443 = dec[a2442]; + a2444 = ((d230) << (1)); + a2445 = ((d229)|(a2444)); + a2446 = ((a2445) << (0)); + dec[a2442] = ((a2443)|(a2446)); + X[32] = s226; + X[33] = s227; + t571 = ((a2318)^(Branchtab[17])); + a2447 = ((a2320)^(Branchtab[49])); + t572 = (t571 + a2447); + a2448 = ((a2323)^(Branchtab[81])); + t573 = (t572 + a2448); + a2449 = ((a2326)^(Branchtab[113])); + t574 = (t573 + a2449); + t575 = (1020 - t574); + m462 = (Y[17] + t574); + m463 = (Y[49] + t575); + m464 = (Y[17] + t575); + m465 = (Y[49] + t574); + d231 = ((m462 > m463)); + d232 = ((m464 > m465)); + s228 = ((d231) ? (m463) : (m462)); + s229 = ((d232) ? (m465) : (m464)); + a2450 = dec[a2442]; + a2451 = ((d232) << (1)); + a2452 = ((d231)|(a2451)); + a2453 = ((a2452) << (2)); + dec[a2442] = ((a2450)|(a2453)); + X[34] = s228; + X[35] = s229; + t576 = ((a2318)^(Branchtab[18])); + a2454 = ((a2320)^(Branchtab[50])); + t577 = (t576 + a2454); + a2455 = ((a2323)^(Branchtab[82])); + t578 = (t577 + a2455); + a2456 = ((a2326)^(Branchtab[114])); + t579 = (t578 + a2456); + t580 = (1020 - t579); + m466 = (Y[18] + t579); + m467 = (Y[50] + t580); + m468 = (Y[18] + t580); + m469 = (Y[50] + t579); + d233 = ((m466 > m467)); + d234 = ((m468 > m469)); + s230 = ((d233) ? (m467) : (m466)); + s231 = ((d234) ? (m469) : (m468)); + a2457 = dec[a2442]; + a2458 = ((d234) << (1)); + a2459 = ((d233)|(a2458)); + a2460 = ((a2459) << (4)); + dec[a2442] = ((a2457)|(a2460)); + X[36] = s230; + X[37] = s231; + t581 = ((a2318)^(Branchtab[19])); + a2461 = ((a2320)^(Branchtab[51])); + t582 = (t581 + a2461); + a2462 = ((a2323)^(Branchtab[83])); + t583 = (t582 + a2462); + a2463 = ((a2326)^(Branchtab[115])); + t584 = (t583 + a2463); + t585 = (1020 - t584); + m470 = (Y[19] + t584); + m471 = (Y[51] + t585); + m472 = (Y[19] + t585); + m473 = (Y[51] + t584); + d235 = ((m470 > m471)); + d236 = ((m472 > m473)); + s232 = ((d235) ? (m471) : (m470)); + s233 = ((d236) ? (m473) : (m472)); + a2464 = dec[a2442]; + a2465 = ((d236) << (1)); + a2466 = ((d235)|(a2465)); + a2467 = ((a2466) << (6)); + dec[a2442] = ((a2464)|(a2467)); + X[38] = s232; + X[39] = s233; + t586 = ((a2318)^(Branchtab[20])); + a2468 = ((a2320)^(Branchtab[52])); + t587 = (t586 + a2468); + a2469 = ((a2323)^(Branchtab[84])); + t588 = (t587 + a2469); + a2470 = ((a2326)^(Branchtab[116])); + t589 = (t588 + a2470); + t590 = (1020 - t589); + m474 = (Y[20] + t589); + m475 = (Y[52] + t590); + m476 = (Y[20] + t590); + m477 = (Y[52] + t589); + d237 = ((m474 > m475)); + d238 = ((m476 > m477)); + s234 = ((d237) ? (m475) : (m474)); + s235 = ((d238) ? (m477) : (m476)); + a2471 = dec[a2442]; + a2472 = ((d238) << (1)); + a2473 = ((d237)|(a2472)); + a2474 = ((a2473) << (8)); + dec[a2442] = ((a2471)|(a2474)); + X[40] = s234; + X[41] = s235; + t591 = ((a2318)^(Branchtab[21])); + a2475 = ((a2320)^(Branchtab[53])); + t592 = (t591 + a2475); + a2476 = ((a2323)^(Branchtab[85])); + t593 = (t592 + a2476); + a2477 = ((a2326)^(Branchtab[117])); + t594 = (t593 + a2477); + t595 = (1020 - t594); + m478 = (Y[21] + t594); + m479 = (Y[53] + t595); + m480 = (Y[21] + t595); + m481 = (Y[53] + t594); + d239 = ((m478 > m479)); + d240 = ((m480 > m481)); + s236 = ((d239) ? (m479) : (m478)); + s237 = ((d240) ? (m481) : (m480)); + a2478 = dec[a2442]; + a2479 = ((d240) << (1)); + a2480 = ((d239)|(a2479)); + a2481 = ((a2480) << (10)); + dec[a2442] = ((a2478)|(a2481)); + X[42] = s236; + X[43] = s237; + t596 = ((a2318)^(Branchtab[22])); + a2482 = ((a2320)^(Branchtab[54])); + t597 = (t596 + a2482); + a2483 = ((a2323)^(Branchtab[86])); + t598 = (t597 + a2483); + a2484 = ((a2326)^(Branchtab[118])); + t599 = (t598 + a2484); + t600 = (1020 - t599); + m482 = (Y[22] + t599); + m483 = (Y[54] + t600); + m484 = (Y[22] + t600); + m485 = (Y[54] + t599); + d241 = ((m482 > m483)); + d242 = ((m484 > m485)); + s238 = ((d241) ? (m483) : (m482)); + s239 = ((d242) ? (m485) : (m484)); + a2485 = dec[a2442]; + a2486 = ((d242) << (1)); + a2487 = ((d241)|(a2486)); + a2488 = ((a2487) << (12)); + dec[a2442] = ((a2485)|(a2488)); + X[44] = s238; + X[45] = s239; + t601 = ((a2318)^(Branchtab[23])); + a2489 = ((a2320)^(Branchtab[55])); + t602 = (t601 + a2489); + a2490 = ((a2323)^(Branchtab[87])); + t603 = (t602 + a2490); + a2491 = ((a2326)^(Branchtab[119])); + t604 = (t603 + a2491); + t605 = (1020 - t604); + m486 = (Y[23] + t604); + m487 = (Y[55] + t605); + m488 = (Y[23] + t605); + m489 = (Y[55] + t604); + d243 = ((m486 > m487)); + d244 = ((m488 > m489)); + s240 = ((d243) ? (m487) : (m486)); + s241 = ((d244) ? (m489) : (m488)); + a2492 = dec[a2442]; + a2493 = ((d244) << (1)); + a2494 = ((d243)|(a2493)); + a2495 = ((a2494) << (14)); + dec[a2442] = ((a2492)|(a2495)); + X[46] = s240; + X[47] = s241; + t606 = ((a2318)^(Branchtab[24])); + a2496 = ((a2320)^(Branchtab[56])); + t607 = (t606 + a2496); + a2497 = ((a2323)^(Branchtab[88])); + t608 = (t607 + a2497); + a2498 = ((a2326)^(Branchtab[120])); + t609 = (t608 + a2498); + t610 = (1020 - t609); + m490 = (Y[24] + t609); + m491 = (Y[56] + t610); + m492 = (Y[24] + t610); + m493 = (Y[56] + t609); + d245 = ((m490 > m491)); + d246 = ((m492 > m493)); + s242 = ((d245) ? (m491) : (m490)); + s243 = ((d246) ? (m493) : (m492)); + a2499 = dec[a2442]; + a2500 = ((d246) << (1)); + a2501 = ((d245)|(a2500)); + a2502 = ((a2501) << (16)); + dec[a2442] = ((a2499)|(a2502)); + X[48] = s242; + X[49] = s243; + t611 = ((a2318)^(Branchtab[25])); + a2503 = ((a2320)^(Branchtab[57])); + t612 = (t611 + a2503); + a2504 = ((a2323)^(Branchtab[89])); + t613 = (t612 + a2504); + a2505 = ((a2326)^(Branchtab[121])); + t614 = (t613 + a2505); + t615 = (1020 - t614); + m494 = (Y[25] + t614); + m495 = (Y[57] + t615); + m496 = (Y[25] + t615); + m497 = (Y[57] + t614); + d247 = ((m494 > m495)); + d248 = ((m496 > m497)); + s244 = ((d247) ? (m495) : (m494)); + s245 = ((d248) ? (m497) : (m496)); + a2506 = dec[a2442]; + a2507 = ((d248) << (1)); + a2508 = ((d247)|(a2507)); + a2509 = ((a2508) << (18)); + dec[a2442] = ((a2506)|(a2509)); + X[50] = s244; + X[51] = s245; + t616 = ((a2318)^(Branchtab[26])); + a2510 = ((a2320)^(Branchtab[58])); + t617 = (t616 + a2510); + a2511 = ((a2323)^(Branchtab[90])); + t618 = (t617 + a2511); + a2512 = ((a2326)^(Branchtab[122])); + t619 = (t618 + a2512); + t620 = (1020 - t619); + m498 = (Y[26] + t619); + m499 = (Y[58] + t620); + m500 = (Y[26] + t620); + m501 = (Y[58] + t619); + d249 = ((m498 > m499)); + d250 = ((m500 > m501)); + s246 = ((d249) ? (m499) : (m498)); + s247 = ((d250) ? (m501) : (m500)); + a2513 = dec[a2442]; + a2514 = ((d250) << (1)); + a2515 = ((d249)|(a2514)); + a2516 = ((a2515) << (20)); + dec[a2442] = ((a2513)|(a2516)); + X[52] = s246; + X[53] = s247; + t621 = ((a2318)^(Branchtab[27])); + a2517 = ((a2320)^(Branchtab[59])); + t622 = (t621 + a2517); + a2518 = ((a2323)^(Branchtab[91])); + t623 = (t622 + a2518); + a2519 = ((a2326)^(Branchtab[123])); + t624 = (t623 + a2519); + t625 = (1020 - t624); + m502 = (Y[27] + t624); + m503 = (Y[59] + t625); + m504 = (Y[27] + t625); + m505 = (Y[59] + t624); + d251 = ((m502 > m503)); + d252 = ((m504 > m505)); + s248 = ((d251) ? (m503) : (m502)); + s249 = ((d252) ? (m505) : (m504)); + a2520 = dec[a2442]; + a2521 = ((d252) << (1)); + a2522 = ((d251)|(a2521)); + a2523 = ((a2522) << (22)); + dec[a2442] = ((a2520)|(a2523)); + X[54] = s248; + X[55] = s249; + t626 = ((a2318)^(Branchtab[28])); + a2524 = ((a2320)^(Branchtab[60])); + t627 = (t626 + a2524); + a2525 = ((a2323)^(Branchtab[92])); + t628 = (t627 + a2525); + a2526 = ((a2326)^(Branchtab[124])); + t629 = (t628 + a2526); + t630 = (1020 - t629); + m506 = (Y[28] + t629); + m507 = (Y[60] + t630); + m508 = (Y[28] + t630); + m509 = (Y[60] + t629); + d253 = ((m506 > m507)); + d254 = ((m508 > m509)); + s250 = ((d253) ? (m507) : (m506)); + s251 = ((d254) ? (m509) : (m508)); + a2527 = dec[a2442]; + a2528 = ((d254) << (1)); + a2529 = ((d253)|(a2528)); + a2530 = ((a2529) << (24)); + dec[a2442] = ((a2527)|(a2530)); + X[56] = s250; + X[57] = s251; + t631 = ((a2318)^(Branchtab[29])); + a2531 = ((a2320)^(Branchtab[61])); + t632 = (t631 + a2531); + a2532 = ((a2323)^(Branchtab[93])); + t633 = (t632 + a2532); + a2533 = ((a2326)^(Branchtab[125])); + t634 = (t633 + a2533); + t635 = (1020 - t634); + m510 = (Y[29] + t634); + m511 = (Y[61] + t635); + m512 = (Y[29] + t635); + m513 = (Y[61] + t634); + d255 = ((m510 > m511)); + d256 = ((m512 > m513)); + s252 = ((d255) ? (m511) : (m510)); + s253 = ((d256) ? (m513) : (m512)); + a2534 = dec[a2442]; + a2535 = ((d256) << (1)); + a2536 = ((d255)|(a2535)); + a2537 = ((a2536) << (26)); + dec[a2442] = ((a2534)|(a2537)); + X[58] = s252; + X[59] = s253; + t636 = ((a2318)^(Branchtab[30])); + a2538 = ((a2320)^(Branchtab[62])); + t637 = (t636 + a2538); + a2539 = ((a2323)^(Branchtab[94])); + t638 = (t637 + a2539); + a2540 = ((a2326)^(Branchtab[126])); + t639 = (t638 + a2540); + t640 = (1020 - t639); + m514 = (Y[30] + t639); + m515 = (Y[62] + t640); + m516 = (Y[30] + t640); + m517 = (Y[62] + t639); + d257 = ((m514 > m515)); + d258 = ((m516 > m517)); + s254 = ((d257) ? (m515) : (m514)); + s255 = ((d258) ? (m517) : (m516)); + a2541 = dec[a2442]; + a2542 = ((d258) << (1)); + a2543 = ((d257)|(a2542)); + a2544 = ((a2543) << (28)); + dec[a2442] = ((a2541)|(a2544)); + X[60] = s254; + X[61] = s255; + t641 = ((a2318)^(Branchtab[31])); + a2545 = ((a2320)^(Branchtab[63])); + t642 = (t641 + a2545); + a2546 = ((a2323)^(Branchtab[95])); + t643 = (t642 + a2546); + a2547 = ((a2326)^(Branchtab[127])); + t644 = (t643 + a2547); + t645 = (1020 - t644); + m518 = (Y[31] + t644); + m519 = (Y[63] + t645); + m520 = (Y[31] + t645); + m521 = (Y[63] + t644); + d259 = ((m518 > m519)); + d260 = ((m520 > m521)); + s256 = ((d259) ? (m519) : (m518)); + s257 = ((d260) ? (m521) : (m520)); + a2548 = dec[a2442]; + a2549 = ((d260) << (1)); + a2550 = ((d259)|(a2549)); + a2551 = ((a2550) << (30)); + dec[a2442] = ((a2548)|(a2551)); + X[62] = s256; + X[63] = s257; + } + /* skip */ +} diff --git a/src/backend/viterbi_768-old/spiral-no-sse.h b/src/backend/viterbi_768-old/spiral-no-sse.h new file mode 100644 index 0000000..6ac12dd --- /dev/null +++ b/src/backend/viterbi_768-old/spiral-no-sse.h @@ -0,0 +1,35 @@ +/*************************************************************** +This code was generated by Spiral 6.0 beta, www.spiral.net -- +Copyright (c) 2005-2008, Carnegie Mellon University. +All rights reserved. +The code is distributed under the GNU General Public License (GPL) +(see http://www.gnu.org/copyleft/gpl.html) + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +*AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************/ + +#define K 7 +#define RATE 4 +#define POLYS { 109, 79, 83, 109 } +#define NUMSTATES 64 +#define FRAMEBITS 2048 +#define DECISIONTYPE unsigned int +#define DECISIONTYPE_BITSIZE 32 +#define COMPUTETYPE unsigned int +#define EBN0 3 +#define TRIALS 10000 +#define __int32 int +#define FUNC FULL_SPIRAL +#define METRICSHIFT 0 +#define PRECISIONSHIFT 0 +#define RENORMALIZE_THRESHOLD 2000000000 diff --git a/src/backend/viterbi_768-old/spiral-sse.c b/src/backend/viterbi_768-old/spiral-sse.c new file mode 100644 index 0000000..ee33230 --- /dev/null +++ b/src/backend/viterbi_768-old/spiral-sse.c @@ -0,0 +1,698 @@ +/*************************************************************** +This code was generated by Spiral 6.0 beta, www.spiral.net -- +Copyright (c) 2005-2008, Carnegie Mellon University. +All rights reserved. +The code is distributed under the GNU General Public License (GPL) +(see http://www.gnu.org/copyleft/gpl.html) + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +*AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************/ + +//#include +//#include +#include +#include +#include +#include "spiral-sse.h" +void init_FULL_SPIRAL() { +} + +void FULL_SPIRAL_sse(int amount, int32_t *Y, int32_t *X, int32_t *syms, unsigned char *dec, int32_t *Branchtab) { +int i9; +// for(i9 = 0; i9 <= amount; i9++) { + for(i9 = 0; i9 < amount; i9++) { + int32_t a1002, a1006, a1010, a1014, a822, a828, a834 + , a840; + int a820, a850; + unsigned char s118, s125, s132, s139, s146, s153, s160 + , s167, s174, s181, s188, s195, s202, s209, s216 + , s223; + int32_t *a1001, *a1005, *a1009, *a1013, *a821, *a827, *a833 + , *a839, *b104; + unsigned char *a1021, *a1030, *a1039, *a1048, *a1057, *a1066, *a1075 + , *a1084, *a849, *a851, *a872, *a893, *a914, *a935, *a956 + , *a977, *a998; + __m128i *a1000, *a818, *a819, *a824, *a830, *a836, *a842 + , *a852, *a853, *a854, *a855, *a856, *a859, *a862, *a865 + , *a873, *a874, *a875, *a876, *a877, *a880, *a883, *a886 + , *a894, *a895, *a896, *a897, *a898, *a901, *a904, *a907 + , *a915, *a916, *a917, *a918, *a919, *a922, *a925, *a928 + , *a936, *a937, *a938, *a939, *a940, *a943, *a946, *a949 + , *a957, *a958, *a959, *a960, *a961, *a964, *a967, *a970 + , *a978, *a979, *a980, *a981, *a982, *a985, *a988, *a991 + , *a999; + __m128i a1003, a1004, a1007, a1008, a1011, a1012, a1015 + , a1016, a1017, a1018, a1019, a1020, a1022, a1023, a1024 + , a1025, a1026, a1027, a1028, a1029, a1031, a1032, a1033 + , a1034, a1035, a1036, a1037, a1038, a1040, a1041, a1042 + , a1043, a1044, a1045, a1046, a1047, a1049, a1050, a1051 + , a1052, a1053, a1054, a1055, a1056, a1058, a1059, a1060 + , a1061, a1062, a1063, a1064, a1065, a1067, a1068, a1069 + , a1070, a1071, a1072, a1073, a1074, a1076, a1077, a1078 + , a1079, a1080, a1081, a1082, a1083, a823, a825, a826 + , a829, a831, a832, a835, a837, a838, a841, a843 + , a844, a845, a846, a847, a848, a857, a858, a860 + , a861, a863, a864, a866, a867, a868, a869, a870 + , a871, a878, a879, a881, a882, a884, a885, a887 + , a888, a889, a890, a891, a892, a899, a900, a902 + , a903, a905, a906, a908, a909, a910, a911, a912 + , a913, a920, a921, a923, a924, a926, a927, a929 + , a930, a931, a932, a933, a934, a941, a942, a944 + , a945, a947, a948, a950, a951, a952, a953, a954 + , a955, a962, a963, a965, a966, a968, a969, a971 + , a972, a973, a974, a975, a976, a983, a984, a986 + , a987, a989, a990, a992, a993, a994, a995, a996 + , a997, b105, b106, b107, b108, b109, b110, b111 + , b112, b113, b114, b115, b116, b117, b118, b119 + , b120, b121, b122, b123, b124, b125, b126, b127 + , b128, b129, b130, b131, b132, b133, b134, b135 + , b136, d37, d38, d39, d40, d41, d42, d43 + , d44, d45, d46, d47, d48, d49, d50, d51 + , d52, d53, d54, d55, d56, d57, d58, d59 + , d60, d61, d62, d63, d64, d65, d66, d67 + , d68, m100, m101, m102, m103, m104, m105, m106 + , m107, m108, m109, m110, m111, m112, m113, m114 + , m115, m116, m117, m118, m119, m120, m121, m122 + , m123, m124, m125, m126, m127, m128, m129, m130 + , m131, m132, m133, m134, m135, m136, m73, m74 + , m75, m76, m77, m78, m79, m80, m81, m82 + , m83, m84, m85, m86, m87, m88, m89, m90 + , m91, m92, m93, m94, m95, m96, m97, m98 + , m99, s114, s115, s116, s117, s119, s120, s121 + , s122, s123, s124, s126, s127, s128, s129, s130 + , s131, s133, s134, s135, s136, s137, s138, s140 + , s141, s142, s143, s144, s145, s147, s148, s149 + , s150, s151, s152, s154, s155, s156, s157, s158 + , s159, s161, s162, s163, s164, s165, s166, s168 + , s169, s170, s171, s172, s173, s175, s176, s177 + , s178, s179, s180, s182, s183, s184, s185, s186 + , s187, s189, s190, s191, s192, s193, s194, s196 + , s197, s198, s199, s200, s201, s203, s204, s205 + , s206, s207, s208, s210, s211, s212, s213, s214 + , s215, s217, s218, s219, s220, s221, s222, s224 + , s225, t39, t40, t41, t42, t43, t44, t45 + , t46, t47, t48, t49, t50, t51, t52, t53 + , t54, t55, t56, t57, t58, t59, t60, t61 + , t62, t63, t64, t65, t66, t67, t68, t69 + , t70; + a818 = ((__m128i *) X); + s114 = *(a818); + a819 = (a818 + 8); + s115 = *(a819); + a820 = (8 * i9); + a821 = (syms + a820); + a822 = *(a821); + a823 = _mm_set1_epi32(a822); + a824 = ((__m128i *) Branchtab); + a825 = *(a824); + a826 = _mm_xor_si128(a823, a825); + b104 = (a820 + syms); + a827 = (b104 + 1); + a828 = *(a827); + a829 = _mm_set1_epi32(a828); + a830 = (a824 + 8); + a831 = *(a830); + a832 = _mm_xor_si128(a829, a831); + a833 = (b104 + 2); + a834 = *(a833); + a835 = _mm_set1_epi32(a834); + a836 = (a824 + 16); + a837 = *(a836); + a838 = _mm_xor_si128(a835, a837); + a839 = (b104 + 3); + a840 = *(a839); + a841 = _mm_set1_epi32(a840); + a842 = (a824 + 24); + a843 = *(a842); + a844 = _mm_xor_si128(a841, a843); + b105 = _mm_add_epi32(a826, a832); + b106 = _mm_add_epi32(b105, a838); + t39 = _mm_add_epi32(b106, a844); + t40 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t39); + m73 = _mm_add_epi32(s114, t39); + m74 = _mm_add_epi32(s115, t40); + m75 = _mm_add_epi32(s114, t40); + m76 = _mm_add_epi32(s115, t39); + d37 = _mm_cmpgt_epi32(m73, m74); + d38 = _mm_cmpgt_epi32(m75, m76); + a845 = _mm_andnot_si128(d37, m73); + a846 = _mm_and_si128(d37, m74); + s116 = _mm_or_si128(a845, a846); + a847 = _mm_andnot_si128(d38, m75); + a848 = _mm_and_si128(d38, m76); + s117 = _mm_or_si128(a847, a848); + s118 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d37,_mm_setzero_si128()),_mm_packs_epi16(d38,_mm_setzero_si128())),_mm_setzero_si128())); + a849 = ((unsigned char *) dec); + a850 = (16 * i9); + a851 = (a849 + a850); + *(a851) = s118; + s119 = _mm_unpacklo_epi32(s116, s117); + s120 = _mm_unpackhi_epi32(s116, s117); + a852 = ((__m128i *) Y); + *(a852) = s119; + a853 = (a852 + 1); + *(a853) = s120; + a854 = (a818 + 1); + s121 = *(a854); + a855 = (a818 + 9); + s122 = *(a855); + a856 = (a824 + 1); + a857 = *(a856); + a858 = _mm_xor_si128(a823, a857); + a859 = (a824 + 9); + a860 = *(a859); + a861 = _mm_xor_si128(a829, a860); + a862 = (a824 + 17); + a863 = *(a862); + a864 = _mm_xor_si128(a835, a863); + a865 = (a824 + 25); + a866 = *(a865); + a867 = _mm_xor_si128(a841, a866); + b107 = _mm_add_epi32(a858, a861); + b108 = _mm_add_epi32(b107, a864); + t41 = _mm_add_epi32(b108, a867); + t42 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t41); + m77 = _mm_add_epi32(s121, t41); + m78 = _mm_add_epi32(s122, t42); + m79 = _mm_add_epi32(s121, t42); + m80 = _mm_add_epi32(s122, t41); + d39 = _mm_cmpgt_epi32(m77, m78); + d40 = _mm_cmpgt_epi32(m79, m80); + a868 = _mm_andnot_si128(d39, m77); + a869 = _mm_and_si128(d39, m78); + s123 = _mm_or_si128(a868, a869); + a870 = _mm_andnot_si128(d40, m79); + a871 = _mm_and_si128(d40, m80); + s124 = _mm_or_si128(a870, a871); + s125 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d39,_mm_setzero_si128()),_mm_packs_epi16(d40,_mm_setzero_si128())),_mm_setzero_si128())); + a872 = (a851 + 1); + *(a872) = s125; + s126 = _mm_unpacklo_epi32(s123, s124); + s127 = _mm_unpackhi_epi32(s123, s124); + a873 = (a852 + 2); + *(a873) = s126; + a874 = (a852 + 3); + *(a874) = s127; + a875 = (a818 + 2); + s128 = *(a875); + a876 = (a818 + 10); + s129 = *(a876); + a877 = (a824 + 2); + a878 = *(a877); + a879 = _mm_xor_si128(a823, a878); + a880 = (a824 + 10); + a881 = *(a880); + a882 = _mm_xor_si128(a829, a881); + a883 = (a824 + 18); + a884 = *(a883); + a885 = _mm_xor_si128(a835, a884); + a886 = (a824 + 26); + a887 = *(a886); + a888 = _mm_xor_si128(a841, a887); + b109 = _mm_add_epi32(a879, a882); + b110 = _mm_add_epi32(b109, a885); + t43 = _mm_add_epi32(b110, a888); + t44 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t43); + m81 = _mm_add_epi32(s128, t43); + m82 = _mm_add_epi32(s129, t44); + m83 = _mm_add_epi32(s128, t44); + m84 = _mm_add_epi32(s129, t43); + d41 = _mm_cmpgt_epi32(m81, m82); + d42 = _mm_cmpgt_epi32(m83, m84); + a889 = _mm_andnot_si128(d41, m81); + a890 = _mm_and_si128(d41, m82); + s130 = _mm_or_si128(a889, a890); + a891 = _mm_andnot_si128(d42, m83); + a892 = _mm_and_si128(d42, m84); + s131 = _mm_or_si128(a891, a892); + s132 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d41,_mm_setzero_si128()),_mm_packs_epi16(d42,_mm_setzero_si128())),_mm_setzero_si128())); + a893 = (a851 + 2); + *(a893) = s132; + s133 = _mm_unpacklo_epi32(s130, s131); + s134 = _mm_unpackhi_epi32(s130, s131); + a894 = (a852 + 4); + *(a894) = s133; + a895 = (a852 + 5); + *(a895) = s134; + a896 = (a818 + 3); + s135 = *(a896); + a897 = (a818 + 11); + s136 = *(a897); + a898 = (a824 + 3); + a899 = *(a898); + a900 = _mm_xor_si128(a823, a899); + a901 = (a824 + 11); + a902 = *(a901); + a903 = _mm_xor_si128(a829, a902); + a904 = (a824 + 19); + a905 = *(a904); + a906 = _mm_xor_si128(a835, a905); + a907 = (a824 + 27); + a908 = *(a907); + a909 = _mm_xor_si128(a841, a908); + b111 = _mm_add_epi32(a900, a903); + b112 = _mm_add_epi32(b111, a906); + t45 = _mm_add_epi32(b112, a909); + t46 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t45); + m85 = _mm_add_epi32(s135, t45); + m86 = _mm_add_epi32(s136, t46); + m87 = _mm_add_epi32(s135, t46); + m88 = _mm_add_epi32(s136, t45); + d43 = _mm_cmpgt_epi32(m85, m86); + d44 = _mm_cmpgt_epi32(m87, m88); + a910 = _mm_andnot_si128(d43, m85); + a911 = _mm_and_si128(d43, m86); + s137 = _mm_or_si128(a910, a911); + a912 = _mm_andnot_si128(d44, m87); + a913 = _mm_and_si128(d44, m88); + s138 = _mm_or_si128(a912, a913); + s139 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d43,_mm_setzero_si128()),_mm_packs_epi16(d44,_mm_setzero_si128())),_mm_setzero_si128())); + a914 = (a851 + 3); + *(a914) = s139; + s140 = _mm_unpacklo_epi32(s137, s138); + s141 = _mm_unpackhi_epi32(s137, s138); + a915 = (a852 + 6); + *(a915) = s140; + a916 = (a852 + 7); + *(a916) = s141; + a917 = (a818 + 4); + s142 = *(a917); + a918 = (a818 + 12); + s143 = *(a918); + a919 = (a824 + 4); + a920 = *(a919); + a921 = _mm_xor_si128(a823, a920); + a922 = (a824 + 12); + a923 = *(a922); + a924 = _mm_xor_si128(a829, a923); + a925 = (a824 + 20); + a926 = *(a925); + a927 = _mm_xor_si128(a835, a926); + a928 = (a824 + 28); + a929 = *(a928); + a930 = _mm_xor_si128(a841, a929); + b113 = _mm_add_epi32(a921, a924); + b114 = _mm_add_epi32(b113, a927); + t47 = _mm_add_epi32(b114, a930); + t48 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t47); + m89 = _mm_add_epi32(s142, t47); + m90 = _mm_add_epi32(s143, t48); + m91 = _mm_add_epi32(s142, t48); + m92 = _mm_add_epi32(s143, t47); + d45 = _mm_cmpgt_epi32(m89, m90); + d46 = _mm_cmpgt_epi32(m91, m92); + a931 = _mm_andnot_si128(d45, m89); + a932 = _mm_and_si128(d45, m90); + s144 = _mm_or_si128(a931, a932); + a933 = _mm_andnot_si128(d46, m91); + a934 = _mm_and_si128(d46, m92); + s145 = _mm_or_si128(a933, a934); + s146 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d45,_mm_setzero_si128()),_mm_packs_epi16(d46,_mm_setzero_si128())),_mm_setzero_si128())); + a935 = (a851 + 4); + *(a935) = s146; + s147 = _mm_unpacklo_epi32(s144, s145); + s148 = _mm_unpackhi_epi32(s144, s145); + a936 = (a852 + 8); + *(a936) = s147; + a937 = (a852 + 9); + *(a937) = s148; + a938 = (a818 + 5); + s149 = *(a938); + a939 = (a818 + 13); + s150 = *(a939); + a940 = (a824 + 5); + a941 = *(a940); + a942 = _mm_xor_si128(a823, a941); + a943 = (a824 + 13); + a944 = *(a943); + a945 = _mm_xor_si128(a829, a944); + a946 = (a824 + 21); + a947 = *(a946); + a948 = _mm_xor_si128(a835, a947); + a949 = (a824 + 29); + a950 = *(a949); + a951 = _mm_xor_si128(a841, a950); + b115 = _mm_add_epi32(a942, a945); + b116 = _mm_add_epi32(b115, a948); + t49 = _mm_add_epi32(b116, a951); + t50 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t49); + m93 = _mm_add_epi32(s149, t49); + m94 = _mm_add_epi32(s150, t50); + m95 = _mm_add_epi32(s149, t50); + m96 = _mm_add_epi32(s150, t49); + d47 = _mm_cmpgt_epi32(m93, m94); + d48 = _mm_cmpgt_epi32(m95, m96); + a952 = _mm_andnot_si128(d47, m93); + a953 = _mm_and_si128(d47, m94); + s151 = _mm_or_si128(a952, a953); + a954 = _mm_andnot_si128(d48, m95); + a955 = _mm_and_si128(d48, m96); + s152 = _mm_or_si128(a954, a955); + s153 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d47,_mm_setzero_si128()),_mm_packs_epi16(d48,_mm_setzero_si128())),_mm_setzero_si128())); + a956 = (a851 + 5); + *(a956) = s153; + s154 = _mm_unpacklo_epi32(s151, s152); + s155 = _mm_unpackhi_epi32(s151, s152); + a957 = (a852 + 10); + *(a957) = s154; + a958 = (a852 + 11); + *(a958) = s155; + a959 = (a818 + 6); + s156 = *(a959); + a960 = (a818 + 14); + s157 = *(a960); + a961 = (a824 + 6); + a962 = *(a961); + a963 = _mm_xor_si128(a823, a962); + a964 = (a824 + 14); + a965 = *(a964); + a966 = _mm_xor_si128(a829, a965); + a967 = (a824 + 22); + a968 = *(a967); + a969 = _mm_xor_si128(a835, a968); + a970 = (a824 + 30); + a971 = *(a970); + a972 = _mm_xor_si128(a841, a971); + b117 = _mm_add_epi32(a963, a966); + b118 = _mm_add_epi32(b117, a969); + t51 = _mm_add_epi32(b118, a972); + t52 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t51); + m97 = _mm_add_epi32(s156, t51); + m98 = _mm_add_epi32(s157, t52); + m99 = _mm_add_epi32(s156, t52); + m100 = _mm_add_epi32(s157, t51); + d49 = _mm_cmpgt_epi32(m97, m98); + d50 = _mm_cmpgt_epi32(m99, m100); + a973 = _mm_andnot_si128(d49, m97); + a974 = _mm_and_si128(d49, m98); + s158 = _mm_or_si128(a973, a974); + a975 = _mm_andnot_si128(d50, m99); + a976 = _mm_and_si128(d50, m100); + s159 = _mm_or_si128(a975, a976); + s160 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d49,_mm_setzero_si128()),_mm_packs_epi16(d50,_mm_setzero_si128())),_mm_setzero_si128())); + a977 = (a851 + 6); + *(a977) = s160; + s161 = _mm_unpacklo_epi32(s158, s159); + s162 = _mm_unpackhi_epi32(s158, s159); + a978 = (a852 + 12); + *(a978) = s161; + a979 = (a852 + 13); + *(a979) = s162; + a980 = (a818 + 7); + s163 = *(a980); + a981 = (a818 + 15); + s164 = *(a981); + a982 = (a824 + 7); + a983 = *(a982); + a984 = _mm_xor_si128(a823, a983); + a985 = (a824 + 15); + a986 = *(a985); + a987 = _mm_xor_si128(a829, a986); + a988 = (a824 + 23); + a989 = *(a988); + a990 = _mm_xor_si128(a835, a989); + a991 = (a824 + 31); + a992 = *(a991); + a993 = _mm_xor_si128(a841, a992); + b119 = _mm_add_epi32(a984, a987); + b120 = _mm_add_epi32(b119, a990); + t53 = _mm_add_epi32(b120, a993); + t54 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t53); + m101 = _mm_add_epi32(s163, t53); + m102 = _mm_add_epi32(s164, t54); + m103 = _mm_add_epi32(s163, t54); + m104 = _mm_add_epi32(s164, t53); + d51 = _mm_cmpgt_epi32(m101, m102); + d52 = _mm_cmpgt_epi32(m103, m104); + a994 = _mm_andnot_si128(d51, m101); + a995 = _mm_and_si128(d51, m102); + s165 = _mm_or_si128(a994, a995); + a996 = _mm_andnot_si128(d52, m103); + a997 = _mm_and_si128(d52, m104); + s166 = _mm_or_si128(a996, a997); + s167 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d51,_mm_setzero_si128()),_mm_packs_epi16(d52,_mm_setzero_si128())),_mm_setzero_si128())); + a998 = (a851 + 7); + *(a998) = s167; + s168 = _mm_unpacklo_epi32(s165, s166); + s169 = _mm_unpackhi_epi32(s165, s166); + a999 = (a852 + 14); + *(a999) = s168; + a1000 = (a852 + 15); + *(a1000) = s169; + s170 = *(a852); + s171 = *(a936); + a1001 = (b104 + 4); + a1002 = *(a1001); + a1003 = _mm_set1_epi32(a1002); + a1004 = _mm_xor_si128(a1003, a825); + a1005 = (b104 + 5); + a1006 = *(a1005); + a1007 = _mm_set1_epi32(a1006); + a1008 = _mm_xor_si128(a1007, a831); + a1009 = (b104 + 6); + a1010 = *(a1009); + a1011 = _mm_set1_epi32(a1010); + a1012 = _mm_xor_si128(a1011, a837); + a1013 = (b104 + 7); + a1014 = *(a1013); + a1015 = _mm_set1_epi32(a1014); + a1016 = _mm_xor_si128(a1015, a843); + b121 = _mm_add_epi32(a1004, a1008); + b122 = _mm_add_epi32(b121, a1012); + t55 = _mm_add_epi32(b122, a1016); + t56 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t55); + m105 = _mm_add_epi32(s170, t55); + m106 = _mm_add_epi32(s171, t56); + m107 = _mm_add_epi32(s170, t56); + m108 = _mm_add_epi32(s171, t55); + d53 = _mm_cmpgt_epi32(m105, m106); + d54 = _mm_cmpgt_epi32(m107, m108); + a1017 = _mm_andnot_si128(d53, m105); + a1018 = _mm_and_si128(d53, m106); + s172 = _mm_or_si128(a1017, a1018); + a1019 = _mm_andnot_si128(d54, m107); + a1020 = _mm_and_si128(d54, m108); + s173 = _mm_or_si128(a1019, a1020); + s174 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d53,_mm_setzero_si128()),_mm_packs_epi16(d54,_mm_setzero_si128())),_mm_setzero_si128())); + a1021 = (a851 + 8); + *(a1021) = s174; + s175 = _mm_unpacklo_epi32(s172, s173); + s176 = _mm_unpackhi_epi32(s172, s173); + *(a818) = s175; + *(a854) = s176; + s177 = *(a853); + s178 = *(a937); + a1022 = _mm_xor_si128(a1003, a857); + a1023 = _mm_xor_si128(a1007, a860); + a1024 = _mm_xor_si128(a1011, a863); + a1025 = _mm_xor_si128(a1015, a866); + b123 = _mm_add_epi32(a1022, a1023); + b124 = _mm_add_epi32(b123, a1024); + t57 = _mm_add_epi32(b124, a1025); + t58 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t57); + m109 = _mm_add_epi32(s177, t57); + m110 = _mm_add_epi32(s178, t58); + m111 = _mm_add_epi32(s177, t58); + m112 = _mm_add_epi32(s178, t57); + d55 = _mm_cmpgt_epi32(m109, m110); + d56 = _mm_cmpgt_epi32(m111, m112); + a1026 = _mm_andnot_si128(d55, m109); + a1027 = _mm_and_si128(d55, m110); + s179 = _mm_or_si128(a1026, a1027); + a1028 = _mm_andnot_si128(d56, m111); + a1029 = _mm_and_si128(d56, m112); + s180 = _mm_or_si128(a1028, a1029); + s181 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d55,_mm_setzero_si128()),_mm_packs_epi16(d56,_mm_setzero_si128())),_mm_setzero_si128())); + a1030 = (a851 + 9); + *(a1030) = s181; + s182 = _mm_unpacklo_epi32(s179, s180); + s183 = _mm_unpackhi_epi32(s179, s180); + *(a875) = s182; + *(a896) = s183; + s184 = *(a873); + s185 = *(a957); + a1031 = _mm_xor_si128(a1003, a878); + a1032 = _mm_xor_si128(a1007, a881); + a1033 = _mm_xor_si128(a1011, a884); + a1034 = _mm_xor_si128(a1015, a887); + b125 = _mm_add_epi32(a1031, a1032); + b126 = _mm_add_epi32(b125, a1033); + t59 = _mm_add_epi32(b126, a1034); + t60 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t59); + m113 = _mm_add_epi32(s184, t59); + m114 = _mm_add_epi32(s185, t60); + m115 = _mm_add_epi32(s184, t60); + m116 = _mm_add_epi32(s185, t59); + d57 = _mm_cmpgt_epi32(m113, m114); + d58 = _mm_cmpgt_epi32(m115, m116); + a1035 = _mm_andnot_si128(d57, m113); + a1036 = _mm_and_si128(d57, m114); + s186 = _mm_or_si128(a1035, a1036); + a1037 = _mm_andnot_si128(d58, m115); + a1038 = _mm_and_si128(d58, m116); + s187 = _mm_or_si128(a1037, a1038); + s188 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d57,_mm_setzero_si128()),_mm_packs_epi16(d58,_mm_setzero_si128())),_mm_setzero_si128())); + a1039 = (a851 + 10); + *(a1039) = s188; + s189 = _mm_unpacklo_epi32(s186, s187); + s190 = _mm_unpackhi_epi32(s186, s187); + *(a917) = s189; + *(a938) = s190; + s191 = *(a874); + s192 = *(a958); + a1040 = _mm_xor_si128(a1003, a899); + a1041 = _mm_xor_si128(a1007, a902); + a1042 = _mm_xor_si128(a1011, a905); + a1043 = _mm_xor_si128(a1015, a908); + b127 = _mm_add_epi32(a1040, a1041); + b128 = _mm_add_epi32(b127, a1042); + t61 = _mm_add_epi32(b128, a1043); + t62 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t61); + m117 = _mm_add_epi32(s191, t61); + m118 = _mm_add_epi32(s192, t62); + m119 = _mm_add_epi32(s191, t62); + m120 = _mm_add_epi32(s192, t61); + d59 = _mm_cmpgt_epi32(m117, m118); + d60 = _mm_cmpgt_epi32(m119, m120); + a1044 = _mm_andnot_si128(d59, m117); + a1045 = _mm_and_si128(d59, m118); + s193 = _mm_or_si128(a1044, a1045); + a1046 = _mm_andnot_si128(d60, m119); + a1047 = _mm_and_si128(d60, m120); + s194 = _mm_or_si128(a1046, a1047); + s195 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d59,_mm_setzero_si128()),_mm_packs_epi16(d60,_mm_setzero_si128())),_mm_setzero_si128())); + a1048 = (a851 + 11); + *(a1048) = s195; + s196 = _mm_unpacklo_epi32(s193, s194); + s197 = _mm_unpackhi_epi32(s193, s194); + *(a959) = s196; + *(a980) = s197; + s198 = *(a894); + s199 = *(a978); + a1049 = _mm_xor_si128(a1003, a920); + a1050 = _mm_xor_si128(a1007, a923); + a1051 = _mm_xor_si128(a1011, a926); + a1052 = _mm_xor_si128(a1015, a929); + b129 = _mm_add_epi32(a1049, a1050); + b130 = _mm_add_epi32(b129, a1051); + t63 = _mm_add_epi32(b130, a1052); + t64 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t63); + m121 = _mm_add_epi32(s198, t63); + m122 = _mm_add_epi32(s199, t64); + m123 = _mm_add_epi32(s198, t64); + m124 = _mm_add_epi32(s199, t63); + d61 = _mm_cmpgt_epi32(m121, m122); + d62 = _mm_cmpgt_epi32(m123, m124); + a1053 = _mm_andnot_si128(d61, m121); + a1054 = _mm_and_si128(d61, m122); + s200 = _mm_or_si128(a1053, a1054); + a1055 = _mm_andnot_si128(d62, m123); + a1056 = _mm_and_si128(d62, m124); + s201 = _mm_or_si128(a1055, a1056); + s202 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d61,_mm_setzero_si128()),_mm_packs_epi16(d62,_mm_setzero_si128())),_mm_setzero_si128())); + a1057 = (a851 + 12); + *(a1057) = s202; + s203 = _mm_unpacklo_epi32(s200, s201); + s204 = _mm_unpackhi_epi32(s200, s201); + *(a819) = s203; + *(a855) = s204; + s205 = *(a895); + s206 = *(a979); + a1058 = _mm_xor_si128(a1003, a941); + a1059 = _mm_xor_si128(a1007, a944); + a1060 = _mm_xor_si128(a1011, a947); + a1061 = _mm_xor_si128(a1015, a950); + b131 = _mm_add_epi32(a1058, a1059); + b132 = _mm_add_epi32(b131, a1060); + t65 = _mm_add_epi32(b132, a1061); + t66 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t65); + m125 = _mm_add_epi32(s205, t65); + m126 = _mm_add_epi32(s206, t66); + m127 = _mm_add_epi32(s205, t66); + m128 = _mm_add_epi32(s206, t65); + d63 = _mm_cmpgt_epi32(m125, m126); + d64 = _mm_cmpgt_epi32(m127, m128); + a1062 = _mm_andnot_si128(d63, m125); + a1063 = _mm_and_si128(d63, m126); + s207 = _mm_or_si128(a1062, a1063); + a1064 = _mm_andnot_si128(d64, m127); + a1065 = _mm_and_si128(d64, m128); + s208 = _mm_or_si128(a1064, a1065); + s209 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d63,_mm_setzero_si128()),_mm_packs_epi16(d64,_mm_setzero_si128())),_mm_setzero_si128())); + a1066 = (a851 + 13); + *(a1066) = s209; + s210 = _mm_unpacklo_epi32(s207, s208); + s211 = _mm_unpackhi_epi32(s207, s208); + *(a876) = s210; + *(a897) = s211; + s212 = *(a915); + s213 = *(a999); + a1067 = _mm_xor_si128(a1003, a962); + a1068 = _mm_xor_si128(a1007, a965); + a1069 = _mm_xor_si128(a1011, a968); + a1070 = _mm_xor_si128(a1015, a971); + b133 = _mm_add_epi32(a1067, a1068); + b134 = _mm_add_epi32(b133, a1069); + t67 = _mm_add_epi32(b134, a1070); + t68 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t67); + m129 = _mm_add_epi32(s212, t67); + m130 = _mm_add_epi32(s213, t68); + m131 = _mm_add_epi32(s212, t68); + m132 = _mm_add_epi32(s213, t67); + d65 = _mm_cmpgt_epi32(m129, m130); + d66 = _mm_cmpgt_epi32(m131, m132); + a1071 = _mm_andnot_si128(d65, m129); + a1072 = _mm_and_si128(d65, m130); + s214 = _mm_or_si128(a1071, a1072); + a1073 = _mm_andnot_si128(d66, m131); + a1074 = _mm_and_si128(d66, m132); + s215 = _mm_or_si128(a1073, a1074); + s216 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d65,_mm_setzero_si128()),_mm_packs_epi16(d66,_mm_setzero_si128())),_mm_setzero_si128())); + a1075 = (a851 + 14); + *(a1075) = s216; + s217 = _mm_unpacklo_epi32(s214, s215); + s218 = _mm_unpackhi_epi32(s214, s215); + *(a918) = s217; + *(a939) = s218; + s219 = *(a916); + s220 = *(a1000); + a1076 = _mm_xor_si128(a1003, a983); + a1077 = _mm_xor_si128(a1007, a986); + a1078 = _mm_xor_si128(a1011, a989); + a1079 = _mm_xor_si128(a1015, a992); + b135 = _mm_add_epi32(a1076, a1077); + b136 = _mm_add_epi32(b135, a1078); + t69 = _mm_add_epi32(b136, a1079); + t70 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t69); + m133 = _mm_add_epi32(s219, t69); + m134 = _mm_add_epi32(s220, t70); + m135 = _mm_add_epi32(s219, t70); + m136 = _mm_add_epi32(s220, t69); + d67 = _mm_cmpgt_epi32(m133, m134); + d68 = _mm_cmpgt_epi32(m135, m136); + a1080 = _mm_andnot_si128(d67, m133); + a1081 = _mm_and_si128(d67, m134); + s221 = _mm_or_si128(a1080, a1081); + a1082 = _mm_andnot_si128(d68, m135); + a1083 = _mm_and_si128(d68, m136); + s222 = _mm_or_si128(a1082, a1083); + s223 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d67,_mm_setzero_si128()),_mm_packs_epi16(d68,_mm_setzero_si128())),_mm_setzero_si128())); + a1084 = (a851 + 15); + *(a1084) = s223; + s224 = _mm_unpacklo_epi32(s221, s222); + s225 = _mm_unpackhi_epi32(s221, s222); + *(a960) = s224; + *(a981) = s225; + } + /* skip */ +} diff --git a/src/backend/viterbi_768-old/spiral-sse.h b/src/backend/viterbi_768-old/spiral-sse.h new file mode 100644 index 0000000..9d8369c --- /dev/null +++ b/src/backend/viterbi_768-old/spiral-sse.h @@ -0,0 +1,36 @@ +/*************************************************************** +This code was generated by Spiral 6.0 beta, www.spiral.net -- +Copyright (c) 2005-2008, Carnegie Mellon University. +All rights reserved. +The code is distributed under the GNU General Public License (GPL) +(see http://www.gnu.org/copyleft/gpl.html) + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +*AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************/ +#include + +#define K 7 +#define RATE 4 +#define POLYS { 109, 79, 83, 109 } +#define NUMSTATES 64 +#define FRAMEBITS 2048 +#define DECISIONTYPE unsigned int +#define DECISIONTYPE_BITSIZE 32 +#define COMPUTETYPE uint32_t +#define EBN0 3 +#define TRIALS 10000 +#define __int32 int +#define FUNC FULL_SPIRAL +#define METRICSHIFT 0 +#define PRECISIONSHIFT 0 +#define RENORMALIZE_THRESHOLD 2000000000 diff --git a/src/backend/viterbi_768-old/viterbi-768.cpp b/src/backend/viterbi_768-old/viterbi-768.cpp new file mode 100644 index 0000000..4042580 --- /dev/null +++ b/src/backend/viterbi_768-old/viterbi-768.cpp @@ -0,0 +1,370 @@ +# +/* + * Copyright (C) 201 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * The convolutional decoder for the FIC blocks has fixed sized + * blocks, so we can use pre-generated code - for that specific + * sized blocks - generated by the spiral project + */ +#include +#include +#include "mm_malloc.h" +#include "viterbi-768.h" +#include +#ifdef __MINGW32__ +#include +#include +#include +#endif + +// +// It took a while to discover that the polynomes we used +// in our own "straightforward" implementation was bitreversed!! +// The official one is on top. +#define K 7 +#define POLYS { 0155, 0117, 0123, 0155} +//#define POLYS {109, 79, 83, 109} +// In the reversed form the polys look: +//#define POLYS { 0133, 0171, 0145, 0133 } +//#define POLYS { 91, 121, 101, 91 } + +#define METRICSHIFT 0 +#define PRECISIONSHIFT 0 +#define RENORMALIZE_THRESHOLD 137 + +// +/* ADDSHIFT and SUBSHIFT make sure that the thing returned is a byte. */ +#if (K-1<8) +#define ADDSHIFT (8-(K-1)) +#define SUBSHIFT 0 +#elif (K-1>8) +#define ADDSHIFT 0 +#define SUBSHIFT ((K-1)-8) +#else +#define ADDSHIFT 0 +#define SUBSHIFT 0 +#endif + + +static uint8_t Partab [] = +{ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0}; + +// +// One could create the table above, i.e. a 256 entry +// odd-parity lookup table by the following function +// It is now precomputed +void viterbi_768::partab_init (void){ +int16_t i,cnt,ti; + + for (i = 0; i < 256; i++){ + cnt = 0; + ti = i; + while (ti != 0) { + if (ti & 1) cnt++; + ti >>= 1; + } + Partab [i] = cnt & 1; + } +} + +int viterbi_768::parity (int x){ + /* Fold down to one byte */ + x ^= (x >> 16); + x ^= (x >> 8); + return Partab [x]; +} + +static inline +void renormalize (COMPUTETYPE* X, COMPUTETYPE threshold){ +int32_t i; + + if (X [0] > threshold){ + COMPUTETYPE min = X [0]; + for (i = 0; i < NUMSTATES; i++) + if (min > X[i]) + min = X[i]; + for (i = 0; i < NUMSTATES; i++) + X[i] -= min; + } +} +// +// +// The main use of the viterbi decoder is in handling the FIC blocks +// There are (in mode 1) 3 ofdm blocks, giving 4 FIC blocks +// There all have a predefined length. In that case we use the +// "fast" (i.e. spiral) code, otherwise we use the generic code + viterbi_768::viterbi_768 (int16_t wordlength, bool spiral) { +int polys [RATE] = POLYS; +int16_t i, state; +#ifdef __MINGW32__ +uint32_t size; +#endif + + frameBits = wordlength; + this -> spiral = spiral; +// partab_init (); + +// B I G N O T E The spiral code uses (wordLength + (K - 1) * sizeof ... +// However, the application then crashes, so something is not OK +// By doubling the size, the problem disappears. It is not solved though +// and not further investigation. +#ifdef __MINGW32__ + size = 2 * ((wordlength + (K - 1)) / 8 + 1 + 16) & ~0xF; + data = (uint8_t *)_aligned_malloc (size, 16); + size = 2 * (RATE * (wordlength + (K - 1)) * sizeof(COMPUTETYPE) + 16) & ~0xF; + symbols = (COMPUTETYPE *)_aligned_malloc (size, 16); + size = 2 * (wordlength + (K - 1)) * sizeof (decision_t); + size = (size + 16) & ~0xF; + vp. decisions = (decision_t *)_aligned_malloc (size, 16); +#else + if (posix_memalign ((void**)&data, 16, + (wordlength + (K - 1))/ 8 + 1)){ + printf("Allocation of data array failed\n"); + } + if (posix_memalign ((void**)&symbols, 16, + RATE * (wordlength + (K - 1)) * sizeof(COMPUTETYPE))){ + printf("Allocation of symbols array failed\n"); + } + if (posix_memalign ((void**)&(vp. decisions), + 16, + 2 * (wordlength + (K - 1)) * sizeof (decision_t))){ + printf ("Allocation of vp decisions failed\n"); + } +#endif + + for (state = 0; state < NUMSTATES / 2; state++) { + for (i = 0; i < RATE; i++) + Branchtab [i * NUMSTATES / 2 + state] = + (polys[i] < 0) ^ + parity((2 * state) & abs (polys[i])) ? 255 : 0; + } +// + init_viterbi (&vp, 0); +} + + + viterbi_768::~viterbi_768 (void) { +#ifdef __MINGW32__ + _aligned_free (vp. decisions); + _aligned_free (data); + _aligned_free (symbols); +#else + free (vp. decisions); + free (data); + free (symbols); +#endif +} + +static int maskTable [] = {128, 64, 32, 16, 8, 4, 2, 1}; +static inline +uint8_t getbit (uint8_t v, int32_t o) { + return (v & maskTable [o]) ? 1 : 0; +} + + +// depends: POLYS, RATE, COMPUTETYPE +// encode was only used for testing purposes +//void encode (/*const*/ unsigned char *bytes, COMPUTETYPE *symbols, int nbits) { +//int i, k; +//int polys [RATE] = POLYS; +//int sr = 0; +// +//// FIXME: this is slowish +//// -- remember about the padding! +// for (i = 0; i < nbits + (K - 1); i++) { +// int b = bytes[i/8]; +// int j = i % 8; +// int bit = (b >> (7-j)) & 1; +// +// sr = (sr << 1) | bit; +// for (k = 0; k < RATE; k++) +// *(symbols++) = parity(sr & polys[k]); +// } +//} + +// Note that our DAB environment maps the softbits to -127 .. 127 +// we have to map that onto 0 .. 255 + +void viterbi_768::deconvolve (int16_t *input, uint8_t *output) { +uint32_t i; + + init_viterbi (&vp, 0); + for (i = 0; i < (uint16_t)(frameBits + (K - 1)) * RATE; i ++) { + int16_t temp = input [i] + 127; + if (temp < 0) temp = 0; + if (temp > 255) temp = 255; + symbols [i] = temp; + } + if (!spiral) + update_viterbi_blk_GENERIC (&vp, symbols, frameBits + (K - 1)); + else + update_viterbi_blk_SPIRAL (&vp, symbols, frameBits + (K - 1)); + + chainback_viterbi (&vp, data, frameBits, 0); + + for (i = 0; i < (uint16_t)frameBits; i ++) + output [i] = getbit (data [i >> 3], i & 07); +} + +/* C-language butterfly */ +void viterbi_768::BFLY (int i, int s, COMPUTETYPE * syms, + struct v * vp, decision_t * d) { +int32_t j, decision0, decision1; +COMPUTETYPE metric,m0,m1,m2,m3; + + metric =0; + for (j = 0; j < RATE;j++) + metric += (Branchtab [i + j * NUMSTATES/2] ^ syms[s*RATE+j]) >> + METRICSHIFT ; + metric = metric >> PRECISIONSHIFT; + const COMPUTETYPE max = + ((RATE * ((256 - 1) >> METRICSHIFT)) >> PRECISIONSHIFT); + + m0 = vp->old_metrics->t [i] + metric; + m1 = vp->old_metrics->t [i + NUMSTATES / 2] + (max - metric); + m2 = vp->old_metrics->t [i] + (max - metric); + m3 = vp->old_metrics->t [i + NUMSTATES / 2] + metric; + + decision0 = ((int32_t)(m0 - m1)) > 0; + decision1 = ((int32_t)(m2 - m3)) > 0; + + vp -> new_metrics-> t[2 * i] = decision0 ? m1 : m0; + vp -> new_metrics-> t[2 * i + 1] = decision1 ? m3 : m2; + + d -> w[i/(sizeof(uint32_t)*8/2)+s*(sizeof(decision_t)/sizeof(uint32_t))] |= + (decision0|decision1<<1) << ((2*i)&(sizeof(uint32_t)*8-1)); +} + +/* Update decoder with a block of demodulated symbols + * Note that nbits is the number of decoded data bits, not the number + * of symbols! + */ +void viterbi_768::update_viterbi_blk_GENERIC (struct v *vp, + COMPUTETYPE *syms, + int16_t nbits){ +decision_t *d = (decision_t *)vp -> decisions; +int32_t s, i; + + for (s = 0; s < nbits; s++) + memset (&d [s], 0, sizeof (decision_t)); + + for (s = 0; s < nbits; s++){ + void *tmp; + for (i = 0; i < NUMSTATES / 2; i++) + BFLY (i, s, syms, vp, vp -> decisions); + + renormalize (vp -> new_metrics -> t, RENORMALIZE_THRESHOLD); +// Swap pointers to old and new metrics + tmp = vp -> old_metrics; + vp -> old_metrics = vp -> new_metrics; + vp -> new_metrics = (metric_t *)tmp; + } +} + +extern "C" { +#ifndef SSE_AVAILABLE +void FULL_SPIRAL_no_sse (int, +#else +void FULL_SPIRAL_sse (int, +#endif + COMPUTETYPE *Y, + COMPUTETYPE *X, + COMPUTETYPE *syms, + DECISIONTYPE *dec, + COMPUTETYPE *Branchtab); +} + +void viterbi_768::update_viterbi_blk_SPIRAL (struct v *vp, + COMPUTETYPE *syms, + int16_t nbits){ +decision_t *d = (decision_t *)vp -> decisions; +int32_t s; + + for (s = 0; s < nbits; s++) + memset (d + s, 0, sizeof(decision_t)); + +#ifndef SSE_AVAILABLE + FULL_SPIRAL_no_sse (nbits, +#else + FULL_SPIRAL_sse (nbits, +#endif + vp -> new_metrics -> t, + vp -> old_metrics -> t, + syms, + d -> t, Branchtab); +} + +// +/* Viterbi chainback */ +void viterbi_768::chainback_viterbi (struct v *vp, + uint8_t *data, /* Decoded output data */ + int16_t nbits, /* Number of data bits */ + uint16_t endstate){ /*Terminal encoder state */ +decision_t *d = vp -> decisions; + +/* Make room beyond the end of the encoder register so we can + * accumulate a full byte of decoded data + */ + endstate = (endstate % NUMSTATES) << ADDSHIFT; +/* The store into data[] only needs to be done every 8 bits. + * But this avoids a conditional branch, and the writes will + * combine in the cache anyway + */ + d += (K - 1); /* Look past tail */ + while (nbits-- != 0){ + int k; +// int l = (endstate >> ADDSHIFT) / 32; +// int m = (endstate >> ADDSHIFT) % 32; + k = (d [nbits].w [(endstate >> ADDSHIFT) / 32] >> + ((endstate>>ADDSHIFT) % 32)) & 1; + endstate = (endstate >> 1) | (k << (K - 2 + ADDSHIFT)); + data [nbits >> 3] = endstate >> SUBSHIFT; + } +} + +/* Initialize Viterbi decoder for start of new frame */ +void viterbi_768::init_viterbi (struct v *p, int16_t starting_state){ +struct v *vp = p; +int32_t i; + + for (i = 0; i < NUMSTATES; i++) + vp -> metrics1.t[i] = 63; + + vp -> old_metrics = &vp -> metrics1; + vp -> new_metrics = &vp -> metrics2; +/* Bias known start state */ + vp -> old_metrics-> t[starting_state & (NUMSTATES-1)] = 0; +} + diff --git a/src/backend/viterbi_768/README b/src/backend/viterbi_768/README new file mode 100644 index 0000000..e9ea564 --- /dev/null +++ b/src/backend/viterbi_768/README @@ -0,0 +1,11 @@ + +The viterbi implementation is copied from the spiral one, all +rights gratefully acknowledged. +Since we serve more than a single platform, we do not use the SSE +implementation. + +The particular spiral implementation (see the file spiral_no_sse.c" +is generated for the wordsize and the other parameters for FIC blocks. +The implementation therefore has a "switch", that - when set to true - +selects the spiral implementation, and - when set to false (the default) - +it uses the generic implementation. diff --git a/src/backend/viterbi_768/SSE2NEON.h b/src/backend/viterbi_768/SSE2NEON.h new file mode 100644 index 0000000..8e6aa5a --- /dev/null +++ b/src/backend/viterbi_768/SSE2NEON.h @@ -0,0 +1,1688 @@ +#ifndef SSE2NEON_H +#define SSE2NEON_H + +// This header file provides a simple API translation layer +// between SSE intrinsics to their corresponding ARM NEON versions +// +// This header file does not (yet) translate *all* of the SSE intrinsics. +// Since this is in support of a specific porting effort, I have only +// included the intrinsics I needed to get my port to work. +// +// Questions/Comments/Feedback send to: jratcliffscarab@gmail.com +// +// If you want to improve or add to this project, send me an +// email and I will probably approve your access to the depot. +// +// Project is located here: +// +// https://github.com/jratcliff63367/sse2neon +// +// Show your appreciation for open source by sending me a bitcoin tip to the following +// address. +// +// TipJar: 1PzgWDSyq4pmdAXRH8SPUtta4SWGrt4B1p : +// https://blockchain.info/address/1PzgWDSyq4pmdAXRH8SPUtta4SWGrt4B1p +// +// +// Contributors to this project are: +// +// John W. Ratcliff : jratcliffscarab@gmail.com +// Brandon Rowlett : browlett@nvidia.com +// Ken Fast : kfast@gdeb.com +// Eric van Beurden : evanbeurden@nvidia.com +// Alexander Potylitsin : apotylitsin@nvidia.com +// +// +// ********************************************************************************************************************* +// apoty: March 17, 2017 +// Current version was changed in most to fix issues and potential issues. +// All unit tests were rewritten as a part of forge lib project to cover all implemented functions. +// ********************************************************************************************************************* +// Release notes for January 20, 2017 version: +// +// The unit tests have been refactored. They no longer assert on an error, instead they return a pass/fail condition +// The unit-tests now test 10,000 random float and int values against each intrinsic. +// +// SSE2NEON now supports 95 SSE intrinsics. 39 of them have formal unit tests which have been implemented and +// fully tested on NEON/ARM. The remaining 56 still need unit tests implemented. +// +// A struct is now defined in this header file called 'SIMDVec' which can be used by applications which +// attempt to access the contents of an _m128 struct directly. It is important to note that accessing the __m128 +// struct directly is bad coding practice by Microsoft: @see: https://msdn.microsoft.com/en-us/library/ayeb3ayc.aspx +// +// However, some legacy source code may try to access the contents of an __m128 struct directly so the developer +// can use the SIMDVec as an alias for it. Any casting must be done manually by the developer, as you cannot +// cast or otherwise alias the base NEON data type for intrinsic operations. +// +// A bug was found with the _mm_shuffle_ps intrinsic. If the shuffle permutation was not one of the ones with +// a custom/unique implementation causing it to fall through to the default shuffle implementation it was failing +// to return the correct value. This is now fixed. +// +// A bug was found with the _mm_cvtps_epi32 intrinsic. This converts floating point values to integers. +// It was not honoring the correct rounding mode. In SSE the default rounding mode when converting from float to int +// is to use 'round to even' otherwise known as 'bankers rounding'. ARMv7 did not support this feature but ARMv8 does. +// As it stands today, this header file assumes ARMv8. If you are trying to target really old ARM devices, you may get +// a build error. +// +// Support for a number of new intrinsics was added, however, none of them yet have unit-tests to 100% confirm they are +// producing the correct results on NEON. These unit tests will be added as soon as possible. +// +// Here is the list of new instrinsics which have been added: +// +// _mm_cvtss_f32 : extracts the lower order floating point value from the parameter +// _mm_add_ss : adds the scalar single - precision floating point values of a and b +// _mm_div_ps : Divides the four single - precision, floating - point values of a and b. +// _mm_div_ss : Divides the scalar single - precision floating point value of a by b. +// _mm_sqrt_ss : Computes the approximation of the square root of the scalar single - precision floating point value of in. +// _mm_rsqrt_ps : Computes the approximations of the reciprocal square roots of the four single - precision floating point values of in. +// _mm_comilt_ss : Compares the lower single - precision floating point scalar values of a and b using a less than operation +// _mm_comigt_ss : Compares the lower single - precision floating point scalar values of a and b using a greater than operation. +// _mm_comile_ss : Compares the lower single - precision floating point scalar values of a and b using a less than or equal operation. +// _mm_comige_ss : Compares the lower single - precision floating point scalar values of a and b using a greater than or equal operation. +// _mm_comieq_ss : Compares the lower single - precision floating point scalar values of a and b using an equality operation. +// _mm_comineq_s : Compares the lower single - precision floating point scalar values of a and b using an inequality operation +// _mm_unpackhi_epi8 : Interleaves the upper 8 signed or unsigned 8 - bit integers in a with the upper 8 signed or unsigned 8 - bit integers in b. +// _mm_unpackhi_epi16: Interleaves the upper 4 signed or unsigned 16 - bit integers in a with the upper 4 signed or unsigned 16 - bit integers in b. +// +// ********************************************************************************************************************* +/* +** The MIT license: +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and associated documentation files (the "Software"), to deal +** in the Software without restriction, including without limitation the rights +** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +** copies of the Software, and to permit persons to whom the Software is furnished +** to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in all +** copies or substantial portions of the Software. + +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +** WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +** CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#define ENABLE_CPP_VERSION 0 + +#if defined(__GNUC__) || defined(__clang__) +# pragma push_macro("FORCE_INLINE") +# pragma push_macro("ALIGN_STRUCT") +# define FORCE_INLINE static inline __attribute__((always_inline)) +# define ALIGN_STRUCT(x) __attribute__((aligned(x))) +#else +# error "Macro name collisions may happens with unknown compiler" +# define FORCE_INLINE static inline +# define ALIGN_STRUCT(x) __declspec(align(x)) +#endif + +#include +#include "arm_neon.h" + + +/*******************************************************/ +/* MACRO for shuffle parameter for _mm_shuffle_ps(). */ +/* Argument fp3 is a digit[0123] that represents the fp*/ +/* from argument "b" of mm_shuffle_ps that will be */ +/* placed in fp3 of result. fp2 is the same for fp2 in */ +/* result. fp1 is a digit[0123] that represents the fp */ +/* from argument "a" of mm_shuffle_ps that will be */ +/* places in fp1 of result. fp0 is the same for fp0 of */ +/* result */ +/*******************************************************/ +#define _MM_SHUFFLE(fp3,fp2,fp1,fp0) \ + (((fp3) << 6) | ((fp2) << 4) | ((fp1) << 2) | ((fp0))) + +/* indicate immediate constant argument in a given range */ +#define __constrange(a,b) \ + const + +typedef float32x4_t __m128; +typedef int32x4_t __m128i; + + +// ****************************************** +// type-safe casting between types +// ****************************************** + +#define vreinterpretq_m128_f16(x) \ + vreinterpretq_f32_f16(x) + +#define vreinterpretq_m128_f32(x) \ + (x) + +#define vreinterpretq_m128_f64(x) \ + vreinterpretq_f32_f64(x) + + +#define vreinterpretq_m128_u8(x) \ + vreinterpretq_f32_u8(x) + +#define vreinterpretq_m128_u16(x) \ + vreinterpretq_f32_u16(x) + +#define vreinterpretq_m128_u32(x) \ + vreinterpretq_f32_u32(x) + +#define vreinterpretq_m128_u64(x) \ + vreinterpretq_f32_u64(x) + + +#define vreinterpretq_m128_s8(x) \ + vreinterpretq_f32_s8(x) + +#define vreinterpretq_m128_s16(x) \ + vreinterpretq_f32_s16(x) + +#define vreinterpretq_m128_s32(x) \ + vreinterpretq_f32_s32(x) + +#define vreinterpretq_m128_s64(x) \ + vreinterpretq_f32_s64(x) + + +#define vreinterpretq_f16_m128(x) \ + vreinterpretq_f16_f32(x) + +#define vreinterpretq_f32_m128(x) \ + (x) + +#define vreinterpretq_f64_m128(x) \ + vreinterpretq_f64_f32(x) + + +#define vreinterpretq_u8_m128(x) \ + vreinterpretq_u8_f32(x) + +#define vreinterpretq_u16_m128(x) \ + vreinterpretq_u16_f32(x) + +#define vreinterpretq_u32_m128(x) \ + vreinterpretq_u32_f32(x) + +#define vreinterpretq_u64_m128(x) \ + vreinterpretq_u64_f32(x) + + +#define vreinterpretq_s8_m128(x) \ + vreinterpretq_s8_f32(x) + +#define vreinterpretq_s16_m128(x) \ + vreinterpretq_s16_f32(x) + +#define vreinterpretq_s32_m128(x) \ + vreinterpretq_s32_f32(x) + +#define vreinterpretq_s64_m128(x) \ + vreinterpretq_s64_f32(x) + + +#define vreinterpretq_m128i_s8(x) \ + vreinterpretq_s32_s8(x) + +#define vreinterpretq_m128i_s16(x) \ + vreinterpretq_s32_s16(x) + +#define vreinterpretq_m128i_s32(x) \ + (x) + +#define vreinterpretq_m128i_s64(x) \ + vreinterpretq_s32_s64(x) + + +#define vreinterpretq_m128i_u8(x) \ + vreinterpretq_s32_u8(x) + +#define vreinterpretq_m128i_u16(x) \ + vreinterpretq_s32_u16(x) + +#define vreinterpretq_m128i_u32(x) \ + vreinterpretq_s32_u32(x) + +#define vreinterpretq_m128i_u64(x) \ + vreinterpretq_s32_u64(x) + + +#define vreinterpretq_s8_m128i(x) \ + vreinterpretq_s8_s32(x) + +#define vreinterpretq_s16_m128i(x) \ + vreinterpretq_s16_s32(x) + +#define vreinterpretq_s32_m128i(x) \ + (x) + +#define vreinterpretq_s64_m128i(x) \ + vreinterpretq_s64_s32(x) + + +#define vreinterpretq_u8_m128i(x) \ + vreinterpretq_u8_s32(x) + +#define vreinterpretq_u16_m128i(x) \ + vreinterpretq_u16_s32(x) + +#define vreinterpretq_u32_m128i(x) \ + vreinterpretq_u32_s32(x) + +#define vreinterpretq_u64_m128i(x) \ + vreinterpretq_u64_s32(x) + + +// union intended to allow direct access to an __m128 variable using the names that the MSVC +// compiler provides. This union should really only be used when trying to access the members +// of the vector as integer values. GCC/clang allow native access to the float members through +// a simple array access operator (in C since 4.6, in C++ since 4.8). +// +// Ideally direct accesses to SIMD vectors should not be used since it can cause a performance +// hit. If it really is needed however, the original __m128 variable can be aliased with a +// pointer to this union and used to access individual components. The use of this union should +// be hidden behind a macro that is used throughout the codebase to access the members instead +// of always declaring this type of variable. +typedef union ALIGN_STRUCT(16) SIMDVec +{ + float m128_f32[4]; // as floats - do not to use this. Added for convenience. + int8_t m128_i8[16]; // as signed 8-bit integers. + int16_t m128_i16[8]; // as signed 16-bit integers. + int32_t m128_i32[4]; // as signed 32-bit integers. + int64_t m128_i64[2]; // as signed 64-bit integers. + uint8_t m128_u8[16]; // as unsigned 8-bit integers. + uint16_t m128_u16[8]; // as unsigned 16-bit integers. + uint32_t m128_u32[4]; // as unsigned 32-bit integers. + uint64_t m128_u64[2]; // as unsigned 64-bit integers. +} SIMDVec; + + +// ****************************************** +// Set/get methods +// ****************************************** + +// extracts the lower order floating point value from the parameter : https://msdn.microsoft.com/en-us/library/bb514059%28v=vs.120%29.aspx?f=255&MSPPError=-2147217396 +FORCE_INLINE float _mm_cvtss_f32(__m128 a) +{ + return vgetq_lane_f32(vreinterpretq_f32_m128(a), 0); +} + +// Sets the 128-bit value to zero https://msdn.microsoft.com/en-us/library/vstudio/ys7dw0kh(v=vs.100).aspx +FORCE_INLINE __m128i _mm_setzero_si128() +{ + return vreinterpretq_m128i_s32(vdupq_n_s32(0)); +} + +// Clears the four single-precision, floating-point values. https://msdn.microsoft.com/en-us/library/vstudio/tk1t2tbz(v=vs.100).aspx +FORCE_INLINE __m128 _mm_setzero_ps(void) +{ + return vreinterpretq_m128_f32(vdupq_n_f32(0)); +} + +// Sets the four single-precision, floating-point values to w. https://msdn.microsoft.com/en-us/library/vstudio/2x1se8ha(v=vs.100).aspx +FORCE_INLINE __m128 _mm_set1_ps(float _w) +{ + return vreinterpretq_m128_f32(vdupq_n_f32(_w)); +} + +// Sets the four single-precision, floating-point values to w. https://msdn.microsoft.com/en-us/library/vstudio/2x1se8ha(v=vs.100).aspx +FORCE_INLINE __m128 _mm_set_ps1(float _w) +{ + return vreinterpretq_m128_f32(vdupq_n_f32(_w)); +} + +// Sets the four single-precision, floating-point values to the four inputs. https://msdn.microsoft.com/en-us/library/vstudio/afh0zf75(v=vs.100).aspx +FORCE_INLINE __m128 _mm_set_ps(float w, float z, float y, float x) +{ + float __attribute__((aligned(16))) data[4] = { x, y, z, w }; + return vreinterpretq_m128_f32(vld1q_f32(data)); +} + +// Sets the four single-precision, floating-point values to the four inputs in reverse order. https://msdn.microsoft.com/en-us/library/vstudio/d2172ct3(v=vs.100).aspx +FORCE_INLINE __m128 _mm_setr_ps(float w, float z , float y , float x ) +{ + float __attribute__ ((aligned (16))) data[4] = { w, z, y, x }; + return vreinterpretq_m128_f32(vld1q_f32(data)); +} + + +//added by hasindu +//Sets the 4 signed 32-bit integer values in reverse order https://technet.microsoft.com/en-us/library/security/27yb3ee5(v=vs.90).aspx +FORCE_INLINE __m128i _mm_setr_epi32(int i3, int i2, int i1, int i0) +{ + int32_t __attribute__((aligned(16))) data[4] = { i3, i2, i1, i0 }; + return vreinterpretq_m128i_s32(vld1q_s32(data)); +} + +//following added by hasindu +//Sets the 16 signed 8-bit integer values to b.https://msdn.microsoft.com/en-us/library/6e14xhyf(v=vs.100).aspx +FORCE_INLINE __m128i _mm_set1_epi8(char w) +{ + return vreinterpretq_m128i_s8(vdupq_n_s8(w)); +} + + +//following added by hasindu +//Sets the 8 signed 16-bit integer values to w. https://msdn.microsoft.com/en-us/library/k0ya3x0e(v=vs.90).aspx +FORCE_INLINE __m128i _mm_set1_epi16(short w) +{ + return vreinterpretq_m128i_s16(vdupq_n_s16(w)); +} + +//following added by hasindu +//Sets the 8 signed 16-bit integer values. https://msdn.microsoft.com/en-au/library/3e0fek84(v=vs.90).aspx +FORCE_INLINE __m128i _mm_set_epi16(short i7, short i6, short i5, short i4, short i3, short i2, short i1, short i0) +{ + int16_t __attribute__((aligned(16))) data[8] = { i0, i1, i2, i3, i4, i5, i6, i7 }; + return vreinterpretq_m128i_s16(vld1q_s16(data)); +} + + +// Sets the 4 signed 32-bit integer values to i. https://msdn.microsoft.com/en-us/library/vstudio/h4xscxat(v=vs.100).aspx +FORCE_INLINE __m128i _mm_set1_epi32(int _i) +{ + return vreinterpretq_m128i_s32(vdupq_n_s32(_i)); +} + +// Sets the 4 signed 32-bit integer values. https://msdn.microsoft.com/en-us/library/vstudio/019beekt(v=vs.100).aspx +FORCE_INLINE __m128i _mm_set_epi32(int i3, int i2, int i1, int i0) +{ + int32_t __attribute__((aligned(16))) data[4] = { i0, i1, i2, i3 }; + return vreinterpretq_m128i_s32(vld1q_s32(data)); +} + +// Stores four single-precision, floating-point values. https://msdn.microsoft.com/en-us/library/vstudio/s3h4ay6y(v=vs.100).aspx +FORCE_INLINE void _mm_store_ps(float *p, __m128 a) +{ + vst1q_f32(p, vreinterpretq_f32_m128(a)); +} + +// Stores four single-precision, floating-point values. https://msdn.microsoft.com/en-us/library/44e30x22(v=vs.100).aspx +FORCE_INLINE void _mm_storeu_ps(float *p, __m128 a) +{ + vst1q_f32(p, vreinterpretq_f32_m128(a)); +} + +// Stores four 32-bit integer values as (as a __m128i value) at the address p. https://msdn.microsoft.com/en-us/library/vstudio/edk11s13(v=vs.100).aspx +FORCE_INLINE void _mm_store_si128(__m128i *p, __m128i a) +{ + vst1q_s32((int32_t*) p, vreinterpretq_s32_m128i(a)); +} + +//added by hasindu (verify this for requirement of alignment) +// Stores four 32-bit integer values as (as a __m128i value) at the address p. https://msdn.microsoft.com/en-us/library/vstudio/edk11s13(v=vs.100).aspx +FORCE_INLINE void _mm_storeu_si128(__m128i *p, __m128i a) +{ + vst1q_s32((int32_t*) p, vreinterpretq_s32_m128i(a)); +} + +// Stores the lower single - precision, floating - point value. https://msdn.microsoft.com/en-us/library/tzz10fbx(v=vs.100).aspx +FORCE_INLINE void _mm_store_ss(float *p, __m128 a) +{ + vst1q_lane_f32(p, vreinterpretq_f32_m128(a), 0); +} + +// Reads the lower 64 bits of b and stores them into the lower 64 bits of a. https://msdn.microsoft.com/en-us/library/hhwf428f%28v=vs.90%29.aspx +FORCE_INLINE void _mm_storel_epi64(__m128i* a, __m128i b) +{ + uint64x1_t hi = vget_high_u64(vreinterpretq_u64_m128i(*a)); + uint64x1_t lo = vget_low_u64(vreinterpretq_u64_m128i(b)); + *a = vreinterpretq_m128i_u64(vcombine_u64(lo, hi)); +} + +// Loads a single single-precision, floating-point value, copying it into all four words https://msdn.microsoft.com/en-us/library/vstudio/5cdkf716(v=vs.100).aspx +FORCE_INLINE __m128 _mm_load1_ps(const float * p) +{ + return vreinterpretq_m128_f32(vld1q_dup_f32(p)); +} + +// Loads four single-precision, floating-point values. https://msdn.microsoft.com/en-us/library/vstudio/zzd50xxt(v=vs.100).aspx +FORCE_INLINE __m128 _mm_load_ps(const float * p) +{ + return vreinterpretq_m128_f32(vld1q_f32(p)); +} + +// Loads four single-precision, floating-point values. https://msdn.microsoft.com/en-us/library/x1b16s7z%28v=vs.90%29.aspx +FORCE_INLINE __m128 _mm_loadu_ps(const float * p) +{ + // for neon, alignment doesn't matter, so _mm_load_ps and _mm_loadu_ps are equivalent for neon + return vreinterpretq_m128_f32(vld1q_f32(p)); +} + +// Loads an single - precision, floating - point value into the low word and clears the upper three words. https://msdn.microsoft.com/en-us/library/548bb9h4%28v=vs.90%29.aspx +FORCE_INLINE __m128 _mm_load_ss(const float * p) +{ + return vreinterpretq_m128_f32(vsetq_lane_f32(*p, vdupq_n_f32(0), 0)); +} + + +// ****************************************** +// Logic/Binary operations +// ****************************************** + +// Compares for inequality. https://msdn.microsoft.com/en-us/library/sf44thbx(v=vs.100).aspx +FORCE_INLINE __m128 _mm_cmpneq_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_u32( vmvnq_u32( vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)) ) ); +} + +// Computes the bitwise AND-NOT of the four single-precision, floating-point values of a and b. https://msdn.microsoft.com/en-us/library/vstudio/68h7wd02(v=vs.100).aspx +FORCE_INLINE __m128 _mm_andnot_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_s32( vbicq_s32(vreinterpretq_s32_m128(b), vreinterpretq_s32_m128(a)) ); // *NOTE* argument swap +} + +// Computes the bitwise AND of the 128-bit value in b and the bitwise NOT of the 128-bit value in a. https://msdn.microsoft.com/en-us/library/vstudio/1beaceh8(v=vs.100).aspx +FORCE_INLINE __m128i _mm_andnot_si128(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s32( vbicq_s32(vreinterpretq_s32_m128i(b), vreinterpretq_s32_m128i(a)) ); // *NOTE* argument swap +} + +// Computes the bitwise AND of the 128-bit value in a and the 128-bit value in b. https://msdn.microsoft.com/en-us/library/vstudio/6d1txsa8(v=vs.100).aspx +FORCE_INLINE __m128i _mm_and_si128(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s32( vandq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b)) ); +} + +// Computes the bitwise AND of the four single-precision, floating-point values of a and b. https://msdn.microsoft.com/en-us/library/vstudio/73ck1xc5(v=vs.100).aspx +FORCE_INLINE __m128 _mm_and_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_s32( vandq_s32(vreinterpretq_s32_m128(a), vreinterpretq_s32_m128(b)) ); +} + +// Computes the bitwise OR of the four single-precision, floating-point values of a and b. https://msdn.microsoft.com/en-us/library/vstudio/7ctdsyy0(v=vs.100).aspx +FORCE_INLINE __m128 _mm_or_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_s32( vorrq_s32(vreinterpretq_s32_m128(a), vreinterpretq_s32_m128(b)) ); +} + +// Computes bitwise EXOR (exclusive-or) of the four single-precision, floating-point values of a and b. https://msdn.microsoft.com/en-us/library/ss6k3wk8(v=vs.100).aspx +FORCE_INLINE __m128 _mm_xor_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_s32( veorq_s32(vreinterpretq_s32_m128(a), vreinterpretq_s32_m128(b)) ); +} + +// Computes the bitwise OR of the 128-bit value in a and the 128-bit value in b. https://msdn.microsoft.com/en-us/library/vstudio/ew8ty0db(v=vs.100).aspx +FORCE_INLINE __m128i _mm_or_si128(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s32( vorrq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b)) ); +} + +// Computes the bitwise XOR of the 128-bit value in a and the 128-bit value in b. https://msdn.microsoft.com/en-us/library/fzt08www(v=vs.100).aspx +FORCE_INLINE __m128i _mm_xor_si128(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s32( veorq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b)) ); +} + +// NEON does not provide this method +// Creates a 4-bit mask from the most significant bits of the four single-precision, floating-point values. https://msdn.microsoft.com/en-us/library/vstudio/4490ys29(v=vs.100).aspx +FORCE_INLINE int _mm_movemask_ps(__m128 a) +{ +#if ENABLE_CPP_VERSION // I am not yet convinced that the NEON version is faster than the C version of this + uint32x4_t &ia = *(uint32x4_t *)&a; + return (ia[0] >> 31) | ((ia[1] >> 30) & 2) | ((ia[2] >> 29) & 4) | ((ia[3] >> 28) & 8); +#else + static const uint32x4_t movemask = { 1, 2, 4, 8 }; + static const uint32x4_t highbit = { 0x80000000, 0x80000000, 0x80000000, 0x80000000 }; + uint32x4_t t0 = vreinterpretq_u32_m128(a); + uint32x4_t t1 = vtstq_u32(t0, highbit); + uint32x4_t t2 = vandq_u32(t1, movemask); + uint32x2_t t3 = vorr_u32(vget_low_u32(t2), vget_high_u32(t2)); + return vget_lane_u32(t3, 0) | vget_lane_u32(t3, 1); +#endif +} + +// Takes the upper 64 bits of a and places it in the low end of the result +// Takes the lower 64 bits of b and places it into the high end of the result. +FORCE_INLINE __m128 _mm_shuffle_ps_1032(__m128 a, __m128 b) +{ + float32x2_t a32 = vget_high_f32(vreinterpretq_f32_m128(a)); + float32x2_t b10 = vget_low_f32(vreinterpretq_f32_m128(b)); + return vreinterpretq_m128_f32(vcombine_f32(a32, b10)); +} + +// takes the lower two 32-bit values from a and swaps them and places in high end of result +// takes the higher two 32 bit values from b and swaps them and places in low end of result. +FORCE_INLINE __m128 _mm_shuffle_ps_2301(__m128 a, __m128 b) +{ + float32x2_t a01 = vrev64_f32(vget_low_f32(vreinterpretq_f32_m128(a))); + float32x2_t b23 = vrev64_f32(vget_high_f32(vreinterpretq_f32_m128(b))); + return vreinterpretq_m128_f32(vcombine_f32(a01, b23)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_0321(__m128 a, __m128 b) +{ + float32x2_t a21 = vget_high_f32(vextq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a), 3)); + float32x2_t b03 = vget_low_f32(vextq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b), 3)); + return vreinterpretq_m128_f32(vcombine_f32(a21, b03)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_2103(__m128 a, __m128 b) +{ + float32x2_t a03 = vget_low_f32(vextq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a), 3)); + float32x2_t b21 = vget_high_f32(vextq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b), 3)); + return vreinterpretq_m128_f32(vcombine_f32(a03, b21)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_1010(__m128 a, __m128 b) +{ + float32x2_t a10 = vget_low_f32(vreinterpretq_f32_m128(a)); + float32x2_t b10 = vget_low_f32(vreinterpretq_f32_m128(b)); + return vreinterpretq_m128_f32(vcombine_f32(a10, b10)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_1001(__m128 a, __m128 b) +{ + float32x2_t a01 = vrev64_f32(vget_low_f32(vreinterpretq_f32_m128(a))); + float32x2_t b10 = vget_low_f32(vreinterpretq_f32_m128(b)); + return vreinterpretq_m128_f32(vcombine_f32(a01, b10)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_0101(__m128 a, __m128 b) +{ + float32x2_t a01 = vrev64_f32(vget_low_f32(vreinterpretq_f32_m128(a))); + float32x2_t b01 = vrev64_f32(vget_low_f32(vreinterpretq_f32_m128(b))); + return vreinterpretq_m128_f32(vcombine_f32(a01, b01)); +} + +// keeps the low 64 bits of b in the low and puts the high 64 bits of a in the high +FORCE_INLINE __m128 _mm_shuffle_ps_3210(__m128 a, __m128 b) +{ + float32x2_t a10 = vget_low_f32(vreinterpretq_f32_m128(a)); + float32x2_t b32 = vget_high_f32(vreinterpretq_f32_m128(b)); + return vreinterpretq_m128_f32(vcombine_f32(a10, b32)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_0011(__m128 a, __m128 b) +{ + float32x2_t a11 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(a)), 1); + float32x2_t b00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 0); + return vreinterpretq_m128_f32(vcombine_f32(a11, b00)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_0022(__m128 a, __m128 b) +{ + float32x2_t a22 = vdup_lane_f32(vget_high_f32(vreinterpretq_f32_m128(a)), 0); + float32x2_t b00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 0); + return vreinterpretq_m128_f32(vcombine_f32(a22, b00)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_2200(__m128 a, __m128 b) +{ + float32x2_t a00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(a)), 0); + float32x2_t b22 = vdup_lane_f32(vget_high_f32(vreinterpretq_f32_m128(b)), 0); + return vreinterpretq_m128_f32(vcombine_f32(a00, b22)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_3202(__m128 a, __m128 b) +{ + float32_t a0 = vgetq_lane_f32(vreinterpretq_f32_m128(a), 0); + float32x2_t a22 = vdup_lane_f32(vget_high_f32(vreinterpretq_f32_m128(a)), 0); + float32x2_t a02 = vset_lane_f32(a0, a22, 1); /* apoty: TODO: use vzip ?*/ + float32x2_t b32 = vget_high_f32(vreinterpretq_f32_m128(b)); + return vreinterpretq_m128_f32(vcombine_f32(a02, b32)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_1133(__m128 a, __m128 b) +{ + float32x2_t a33 = vdup_lane_f32(vget_high_f32(vreinterpretq_f32_m128(a)), 1); + float32x2_t b11 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 1); + return vreinterpretq_m128_f32(vcombine_f32(a33, b11)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_2010(__m128 a, __m128 b) +{ + float32x2_t a10 = vget_low_f32(vreinterpretq_f32_m128(a)); + float32_t b2 = vgetq_lane_f32(vreinterpretq_f32_m128(b), 2); + float32x2_t b00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 0); + float32x2_t b20 = vset_lane_f32(b2, b00, 1); + return vreinterpretq_m128_f32(vcombine_f32(a10, b20)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_2001(__m128 a, __m128 b) +{ + float32x2_t a01 = vrev64_f32(vget_low_f32(vreinterpretq_f32_m128(a))); + float32_t b2 = vgetq_lane_f32(b, 2); + float32x2_t b00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 0); + float32x2_t b20 = vset_lane_f32(b2, b00, 1); + return vreinterpretq_m128_f32(vcombine_f32(a01, b20)); +} + +FORCE_INLINE __m128 _mm_shuffle_ps_2032(__m128 a, __m128 b) +{ + float32x2_t a32 = vget_high_f32(vreinterpretq_f32_m128(a)); + float32_t b2 = vgetq_lane_f32(b, 2); + float32x2_t b00 = vdup_lane_f32(vget_low_f32(vreinterpretq_f32_m128(b)), 0); + float32x2_t b20 = vset_lane_f32(b2, b00, 1); + return vreinterpretq_m128_f32(vcombine_f32(a32, b20)); +} + +// NEON does not support a general purpose permute intrinsic +// Currently I am not sure whether the C implementation is faster or slower than the NEON version. +// Note, this has to be expanded as a template because the shuffle value must be an immediate value. +// The same is true on SSE as well. +// Selects four specific single-precision, floating-point values from a and b, based on the mask i. https://msdn.microsoft.com/en-us/library/vstudio/5f0858x0(v=vs.100).aspx +#if ENABLE_CPP_VERSION // I am not convinced that the NEON version is faster than the C version yet. +FORCE_INLINE __m128 _mm_shuffle_ps_default(__m128 a, __m128 b, __constrange(0,255) int imm) +{ + __m128 ret; + ret[0] = a[imm & 0x3]; + ret[1] = a[(imm >> 2) & 0x3]; + ret[2] = b[(imm >> 4) & 0x03]; + ret[3] = b[(imm >> 6) & 0x03]; + return ret; +} +#else +#define _mm_shuffle_ps_default(a, b, imm) \ +({ \ + float32x4_t ret; \ + ret = vmovq_n_f32(vgetq_lane_f32(vreinterpretq_f32_m128(a), (imm) & 0x3)); \ + ret = vsetq_lane_f32(vgetq_lane_f32(vreinterpretq_f32_m128(a), ((imm) >> 2) & 0x3), ret, 1); \ + ret = vsetq_lane_f32(vgetq_lane_f32(vreinterpretq_f32_m128(b), ((imm) >> 4) & 0x3), ret, 2); \ + ret = vsetq_lane_f32(vgetq_lane_f32(vreinterpretq_f32_m128(b), ((imm) >> 6) & 0x3), ret, 3); \ + vreinterpretq_m128_f32(ret); \ +}) +#endif + +//FORCE_INLINE __m128 _mm_shuffle_ps(__m128 a, __m128 b, __constrange(0,255) int imm) +#define _mm_shuffle_ps(a, b, imm) \ +({ \ + __m128 ret; \ + switch (imm) \ + { \ + case _MM_SHUFFLE(1, 0, 3, 2): ret = _mm_shuffle_ps_1032((a), (b)); break; \ + case _MM_SHUFFLE(2, 3, 0, 1): ret = _mm_shuffle_ps_2301((a), (b)); break; \ + case _MM_SHUFFLE(0, 3, 2, 1): ret = _mm_shuffle_ps_0321((a), (b)); break; \ + case _MM_SHUFFLE(2, 1, 0, 3): ret = _mm_shuffle_ps_2103((a), (b)); break; \ + case _MM_SHUFFLE(1, 0, 1, 0): ret = _mm_shuffle_ps_1010((a), (b)); break; \ + case _MM_SHUFFLE(1, 0, 0, 1): ret = _mm_shuffle_ps_1001((a), (b)); break; \ + case _MM_SHUFFLE(0, 1, 0, 1): ret = _mm_shuffle_ps_0101((a), (b)); break; \ + case _MM_SHUFFLE(3, 2, 1, 0): ret = _mm_shuffle_ps_3210((a), (b)); break; \ + case _MM_SHUFFLE(0, 0, 1, 1): ret = _mm_shuffle_ps_0011((a), (b)); break; \ + case _MM_SHUFFLE(0, 0, 2, 2): ret = _mm_shuffle_ps_0022((a), (b)); break; \ + case _MM_SHUFFLE(2, 2, 0, 0): ret = _mm_shuffle_ps_2200((a), (b)); break; \ + case _MM_SHUFFLE(3, 2, 0, 2): ret = _mm_shuffle_ps_3202((a), (b)); break; \ + case _MM_SHUFFLE(1, 1, 3, 3): ret = _mm_shuffle_ps_1133((a), (b)); break; \ + case _MM_SHUFFLE(2, 0, 1, 0): ret = _mm_shuffle_ps_2010((a), (b)); break; \ + case _MM_SHUFFLE(2, 0, 0, 1): ret = _mm_shuffle_ps_2001((a), (b)); break; \ + case _MM_SHUFFLE(2, 0, 3, 2): ret = _mm_shuffle_ps_2032((a), (b)); break; \ + default: ret = _mm_shuffle_ps_default((a), (b), (imm)); break; \ + } \ + ret; \ +}) + +// Takes the upper 64 bits of a and places it in the low end of the result +// Takes the lower 64 bits of a and places it into the high end of the result. +FORCE_INLINE __m128i _mm_shuffle_epi_1032(__m128i a) +{ + int32x2_t a32 = vget_high_s32(vreinterpretq_s32_m128i(a)); + int32x2_t a10 = vget_low_s32(vreinterpretq_s32_m128i(a)); + return vreinterpretq_m128i_s32(vcombine_s32(a32, a10)); +} + +// takes the lower two 32-bit values from a and swaps them and places in low end of result +// takes the higher two 32 bit values from a and swaps them and places in high end of result. +FORCE_INLINE __m128i _mm_shuffle_epi_2301(__m128i a) +{ + int32x2_t a01 = vrev64_s32(vget_low_s32(vreinterpretq_s32_m128i(a))); + int32x2_t a23 = vrev64_s32(vget_high_s32(vreinterpretq_s32_m128i(a))); + return vreinterpretq_m128i_s32(vcombine_s32(a01, a23)); +} + +// rotates the least significant 32 bits into the most signficant 32 bits, and shifts the rest down +FORCE_INLINE __m128i _mm_shuffle_epi_0321(__m128i a) +{ + return vreinterpretq_m128i_s32(vextq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(a), 1)); +} + +// rotates the most significant 32 bits into the least signficant 32 bits, and shifts the rest up +FORCE_INLINE __m128i _mm_shuffle_epi_2103(__m128i a) +{ + return vreinterpretq_m128i_s32(vextq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(a), 3)); +} + +// gets the lower 64 bits of a, and places it in the upper 64 bits +// gets the lower 64 bits of a and places it in the lower 64 bits +FORCE_INLINE __m128i _mm_shuffle_epi_1010(__m128i a) +{ + int32x2_t a10 = vget_low_s32(vreinterpretq_s32_m128i(a)); + return vreinterpretq_m128i_s32(vcombine_s32(a10, a10)); +} + +// gets the lower 64 bits of a, swaps the 0 and 1 elements, and places it in the lower 64 bits +// gets the lower 64 bits of a, and places it in the upper 64 bits +FORCE_INLINE __m128i _mm_shuffle_epi_1001(__m128i a) +{ + int32x2_t a01 = vrev64_s32(vget_low_s32(vreinterpretq_s32_m128i(a))); + int32x2_t a10 = vget_low_s32(vreinterpretq_s32_m128i(a)); + return vreinterpretq_m128i_s32(vcombine_s32(a01, a10)); +} + +// gets the lower 64 bits of a, swaps the 0 and 1 elements and places it in the upper 64 bits +// gets the lower 64 bits of a, swaps the 0 and 1 elements, and places it in the lower 64 bits +FORCE_INLINE __m128i _mm_shuffle_epi_0101(__m128i a) +{ + int32x2_t a01 = vrev64_s32(vget_low_s32(vreinterpretq_s32_m128i(a))); + return vreinterpretq_m128i_s32(vcombine_s32(a01, a01)); +} + +FORCE_INLINE __m128i _mm_shuffle_epi_2211(__m128i a) +{ + int32x2_t a11 = vdup_lane_s32(vget_low_s32(vreinterpretq_s32_m128i(a)), 1); + int32x2_t a22 = vdup_lane_s32(vget_high_s32(vreinterpretq_s32_m128i(a)), 0); + return vreinterpretq_m128i_s32(vcombine_s32(a11, a22)); +} + +FORCE_INLINE __m128i _mm_shuffle_epi_0122(__m128i a) +{ + int32x2_t a22 = vdup_lane_s32(vget_high_s32(vreinterpretq_s32_m128i(a)), 0); + int32x2_t a01 = vrev64_s32(vget_low_s32(vreinterpretq_s32_m128i(a))); + return vreinterpretq_m128i_s32(vcombine_s32(a22, a01)); +} + +FORCE_INLINE __m128i _mm_shuffle_epi_3332(__m128i a) +{ + int32x2_t a32 = vget_high_s32(vreinterpretq_s32_m128i(a)); + int32x2_t a33 = vdup_lane_s32(vget_high_s32(vreinterpretq_s32_m128i(a)), 1); + return vreinterpretq_m128i_s32(vcombine_s32(a32, a33)); +} + +//FORCE_INLINE __m128i _mm_shuffle_epi32_default(__m128i a, __constrange(0,255) int imm) +#if ENABLE_CPP_VERSION +FORCE_INLINE __m128i _mm_shuffle_epi32_default(__m128i a, __constrange(0,255) int imm) +{ + __m128i ret; + ret[0] = a[imm & 0x3]; + ret[1] = a[(imm >> 2) & 0x3]; + ret[2] = a[(imm >> 4) & 0x03]; + ret[3] = a[(imm >> 6) & 0x03]; + return ret; +} +#else +#define _mm_shuffle_epi32_default(a, imm) \ +({ \ + int32x4_t ret; \ + ret = vmovq_n_s32(vgetq_lane_s32(vreinterpretq_s32_m128i(a), (imm) & 0x3)); \ + ret = vsetq_lane_s32(vgetq_lane_s32(vreinterpretq_s32_m128i(a), ((imm) >> 2) & 0x3), ret, 1); \ + ret = vsetq_lane_s32(vgetq_lane_s32(vreinterpretq_s32_m128i(a), ((imm) >> 4) & 0x3), ret, 2); \ + ret = vsetq_lane_s32(vgetq_lane_s32(vreinterpretq_s32_m128i(a), ((imm) >> 6) & 0x3), ret, 3); \ + vreinterpretq_m128i_s32(ret); \ +}) +#endif + +//FORCE_INLINE __m128i _mm_shuffle_epi32_splat(__m128i a, __constrange(0,255) int imm) +#if defined(__aarch64__) +#define _mm_shuffle_epi32_splat(a, imm) \ +({ \ + vreinterpretq_m128i_s32(vdupq_laneq_s32(vreinterpretq_s32_m128i(a), (imm))); \ +}) +#else +#define _mm_shuffle_epi32_splat(a, imm) \ +({ \ + vreinterpretq_m128i_s32(vdupq_n_s32(vgetq_lane_s32(vreinterpretq_s32_m128i(a), (imm)))); \ +}) +#endif + +// Shuffles the 4 signed or unsigned 32-bit integers in a as specified by imm. https://msdn.microsoft.com/en-us/library/56f67xbk%28v=vs.90%29.aspx +//FORCE_INLINE __m128i _mm_shuffle_epi32(__m128i a, __constrange(0,255) int imm) +#define _mm_shuffle_epi32(a, imm) \ +({ \ + __m128i ret; \ + switch (imm) \ + { \ + case _MM_SHUFFLE(1, 0, 3, 2): ret = _mm_shuffle_epi_1032((a)); break; \ + case _MM_SHUFFLE(2, 3, 0, 1): ret = _mm_shuffle_epi_2301((a)); break; \ + case _MM_SHUFFLE(0, 3, 2, 1): ret = _mm_shuffle_epi_0321((a)); break; \ + case _MM_SHUFFLE(2, 1, 0, 3): ret = _mm_shuffle_epi_2103((a)); break; \ + case _MM_SHUFFLE(1, 0, 1, 0): ret = _mm_shuffle_epi_1010((a)); break; \ + case _MM_SHUFFLE(1, 0, 0, 1): ret = _mm_shuffle_epi_1001((a)); break; \ + case _MM_SHUFFLE(0, 1, 0, 1): ret = _mm_shuffle_epi_0101((a)); break; \ + case _MM_SHUFFLE(2, 2, 1, 1): ret = _mm_shuffle_epi_2211((a)); break; \ + case _MM_SHUFFLE(0, 1, 2, 2): ret = _mm_shuffle_epi_0122((a)); break; \ + case _MM_SHUFFLE(3, 3, 3, 2): ret = _mm_shuffle_epi_3332((a)); break; \ + case _MM_SHUFFLE(0, 0, 0, 0): ret = _mm_shuffle_epi32_splat((a),0); break; \ + case _MM_SHUFFLE(1, 1, 1, 1): ret = _mm_shuffle_epi32_splat((a),1); break; \ + case _MM_SHUFFLE(2, 2, 2, 2): ret = _mm_shuffle_epi32_splat((a),2); break; \ + case _MM_SHUFFLE(3, 3, 3, 3): ret = _mm_shuffle_epi32_splat((a),3); break; \ + default: ret = _mm_shuffle_epi32_default((a), (imm)); break; \ + } \ + ret; \ +}) + +// Shuffles the upper 4 signed or unsigned 16 - bit integers in a as specified by imm. https://msdn.microsoft.com/en-us/library/13ywktbs(v=vs.100).aspx +//FORCE_INLINE __m128i _mm_shufflehi_epi16_function(__m128i a, __constrange(0,255) int imm) +#define _mm_shufflehi_epi16_function(a, imm) \ +({ \ + int16x8_t ret = vreinterpretq_s16_s32(a); \ + int16x4_t highBits = vget_high_s16(ret); \ + ret = vsetq_lane_s16(vget_lane_s16(highBits, (imm) & 0x3), ret, 4); \ + ret = vsetq_lane_s16(vget_lane_s16(highBits, ((imm) >> 2) & 0x3), ret, 5); \ + ret = vsetq_lane_s16(vget_lane_s16(highBits, ((imm) >> 4) & 0x3), ret, 6); \ + ret = vsetq_lane_s16(vget_lane_s16(highBits, ((imm) >> 6) & 0x3), ret, 7); \ + vreinterpretq_s32_s16(ret); \ +}) + +//FORCE_INLINE __m128i _mm_shufflehi_epi16(__m128i a, __constrange(0,255) int imm) +#define _mm_shufflehi_epi16(a, imm) \ + _mm_shufflehi_epi16_function((a), (imm)) + + +//added by hasindu +//Shifts the 8 signed or unsigned 16-bit integers in a left by count bits while shifting in zeros. https://msdn.microsoft.com/en-us/library/es73bcsy(v=vs.90).aspx +#define _mm_slli_epi16(a, imm) \ +({ \ + __m128i ret; \ + if ((imm) <= 0) {\ + ret = a; \ + } \ + else if ((imm) > 31) { \ + ret = _mm_setzero_si128(); \ + } \ + else { \ + ret = vreinterpretq_m128i_s16(vshlq_n_s16(vreinterpretq_s16_m128i(a), (imm))); \ + } \ + ret; \ +}) + + + +// Shifts the 4 signed or unsigned 32-bit integers in a left by count bits while shifting in zeros. : https://msdn.microsoft.com/en-us/library/z2k3bbtb%28v=vs.90%29.aspx +//FORCE_INLINE __m128i _mm_slli_epi32(__m128i a, __constrange(0,255) int imm) +#define _mm_slli_epi32(a, imm) \ +({ \ + __m128i ret; \ + if ((imm) <= 0) {\ + ret = a; \ + } \ + else if ((imm) > 31) { \ + ret = _mm_setzero_si128(); \ + } \ + else { \ + ret = vreinterpretq_m128i_s32(vshlq_n_s32(vreinterpretq_s32_m128i(a), (imm))); \ + } \ + ret; \ +}) + + +//added by hasindu +// Shifts the 8 signed or unsigned 16-bit integers in a right by count bits while shifting in zeros. +//https://msdn.microsoft.com/en-us/library/6tcwd38t(v=vs.90).aspx +#define _mm_srli_epi16(a, imm) \ +({ \ + __m128i ret; \ + if ((imm) <= 0) { \ + ret = a; \ + } \ + else if ((imm)> 31) { \ + ret = _mm_setzero_si128(); \ + } \ + else { \ + ret = vreinterpretq_m128i_u16(vshrq_n_u16(vreinterpretq_u16_m128i(a), (imm))); \ + } \ + ret; \ +}) + + +//Shifts the 4 signed or unsigned 32-bit integers in a right by count bits while shifting in zeros. https://msdn.microsoft.com/en-us/library/w486zcfa(v=vs.100).aspx +//FORCE_INLINE __m128i _mm_srli_epi32(__m128i a, __constrange(0,255) int imm) +#define _mm_srli_epi32(a, imm) \ +({ \ + __m128i ret; \ + if ((imm) <= 0) { \ + ret = a; \ + } \ + else if ((imm)> 31) { \ + ret = _mm_setzero_si128(); \ + } \ + else { \ + ret = vreinterpretq_m128i_u32(vshrq_n_u32(vreinterpretq_u32_m128i(a), (imm))); \ + } \ + ret; \ +}) + +// Shifts the 4 signed 32 - bit integers in a right by count bits while shifting in the sign bit. https://msdn.microsoft.com/en-us/library/z1939387(v=vs.100).aspx +//FORCE_INLINE __m128i _mm_srai_epi32(__m128i a, __constrange(0,255) int imm) +#define _mm_srai_epi32(a, imm) \ +({ \ + __m128i ret; \ + if ((imm) <= 0) { \ + ret = a; \ + } \ + else if ((imm) > 31) { \ + ret = vreinterpretq_m128i_s32(vshrq_n_s32(vreinterpretq_s32_m128i(a), 16)); \ + ret = vreinterpretq_m128i_s32(vshrq_n_s32(vreinterpretq_s32_m128i(ret), 16)); \ + } \ + else { \ + ret = vreinterpretq_m128i_s32(vshrq_n_s32(vreinterpretq_s32_m128i(a), (imm))); \ + } \ + ret; \ +}) + +// Shifts the 128 - bit value in a right by imm bytes while shifting in zeros.imm must be an immediate. https://msdn.microsoft.com/en-us/library/305w28yz(v=vs.100).aspx +//FORCE_INLINE _mm_srli_si128(__m128i a, __constrange(0,255) int imm) +#define _mm_srli_si128(a, imm) \ +({ \ + __m128i ret; \ + if ((imm) <= 0) { \ + ret = a; \ + } \ + else if ((imm) > 15) { \ + ret = _mm_setzero_si128(); \ + } \ + else { \ + ret = vreinterpretq_m128i_s8(vextq_s8(vreinterpretq_s8_m128i(a), vdupq_n_s8(0), (imm))); \ + } \ + ret; \ +}) + +// Shifts the 128-bit value in a left by imm bytes while shifting in zeros. imm must be an immediate. https://msdn.microsoft.com/en-us/library/34d3k2kt(v=vs.100).aspx +//FORCE_INLINE __m128i _mm_slli_si128(__m128i a, __constrange(0,255) int imm) +#define _mm_slli_si128(a, imm) \ +({ \ + __m128i ret; \ + if ((imm) <= 0) { \ + ret = a; \ + } \ + else if ((imm) > 15) { \ + ret = _mm_setzero_si128(); \ + } \ + else { \ + ret = vreinterpretq_m128i_s8(vextq_s8(vdupq_n_s8(0), vreinterpretq_s8_m128i(a), 16 - (imm))); \ + } \ + ret; \ +}) + +// NEON does not provide a version of this function, here is an article about some ways to repro the results. +// http://stackoverflow.com/questions/11870910/sse-mm-movemask-epi8-equivalent-method-for-arm-neon +// Creates a 16-bit mask from the most significant bits of the 16 signed or unsigned 8-bit integers in a and zero extends the upper bits. https://msdn.microsoft.com/en-us/library/vstudio/s090c8fk(v=vs.100).aspx +FORCE_INLINE int _mm_movemask_epi8(__m128i _a) +{ + uint8x16_t input = vreinterpretq_u8_m128i(_a); + static const int8_t __attribute__((aligned(16))) xr[8] = { -7, -6, -5, -4, -3, -2, -1, 0 }; + uint8x8_t mask_and = vdup_n_u8(0x80); + int8x8_t mask_shift = vld1_s8(xr); + + uint8x8_t lo = vget_low_u8(input); + uint8x8_t hi = vget_high_u8(input); + + lo = vand_u8(lo, mask_and); + lo = vshl_u8(lo, mask_shift); + + hi = vand_u8(hi, mask_and); + hi = vshl_u8(hi, mask_shift); + + lo = vpadd_u8(lo, lo); + lo = vpadd_u8(lo, lo); + lo = vpadd_u8(lo, lo); + + hi = vpadd_u8(hi, hi); + hi = vpadd_u8(hi, hi); + hi = vpadd_u8(hi, hi); + + return ((hi[0] << 8) | (lo[0] & 0xFF)); +} + + +// ****************************************** +// Math operations +// ****************************************** + +// Subtracts the four single-precision, floating-point values of a and b. https://msdn.microsoft.com/en-us/library/vstudio/1zad2k61(v=vs.100).aspx +FORCE_INLINE __m128 _mm_sub_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_f32(vsubq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); +} + +// Subtracts the 4 signed or unsigned 32-bit integers of b from the 4 signed or unsigned 32-bit integers of a. https://msdn.microsoft.com/en-us/library/vstudio/fhh866h0(v=vs.100).aspx +FORCE_INLINE __m128i _mm_sub_epi32(__m128i a, __m128i b) +{ + return vreinterpretq_m128_f32(vsubq_s32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); +} + +FORCE_INLINE __m128i _mm_sub_epi16(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s16(vsubq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); +} + +//added by hasindu +FORCE_INLINE __m128i _mm_sub_epi8(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s8(vsubq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); +} + +//added by hasindu +//Subtracts the 8 unsigned 16-bit integers of bfrom the 8 unsigned 16-bit integers of a and saturates.. https://technet.microsoft.com/en-us/subscriptions/index/f44y0s19(v=vs.90).aspx +FORCE_INLINE __m128i _mm_subs_epu16(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u16(vqsubq_u16(vreinterpretq_u16_m128i(a), vreinterpretq_u16_m128i(b))); +} + +//added by hasindu +//Subtracts the 16 unsigned 8-bit integers of b from the 16 unsigned 8-bit integers of a and saturates.. https://technet.microsoft.com/en-us/subscriptions/yadkxc18(v=vs.90) +FORCE_INLINE __m128i _mm_subs_epu8(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u8(vqsubq_u8(vreinterpretq_u8_m128i(a), vreinterpretq_u8_m128i(b))); +} + +// Adds the four single-precision, floating-point values of a and b. https://msdn.microsoft.com/en-us/library/vstudio/c9848chc(v=vs.100).aspx +FORCE_INLINE __m128 _mm_add_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_f32(vaddq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); +} + +// adds the scalar single-precision floating point values of a and b. https://msdn.microsoft.com/en-us/library/be94x2y6(v=vs.100).aspx +FORCE_INLINE __m128 _mm_add_ss(__m128 a, __m128 b) +{ + float32_t b0 = vgetq_lane_f32(vreinterpretq_f32_m128(b), 0); + float32x4_t value = vsetq_lane_f32(b0, vdupq_n_f32(0), 0); + //the upper values in the result must be the remnants of . + return vreinterpretq_m128_f32(vaddq_f32(a, value)); +} + +// Adds the 4 signed or unsigned 32-bit integers in a to the 4 signed or unsigned 32-bit integers in b. https://msdn.microsoft.com/en-us/library/vstudio/09xs4fkk(v=vs.100).aspx +FORCE_INLINE __m128i _mm_add_epi32(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s32(vaddq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); +} + +// Adds the 8 signed or unsigned 16-bit integers in a to the 8 signed or unsigned 16-bit integers in b. https://msdn.microsoft.com/en-us/library/fceha5k4(v=vs.100).aspx +FORCE_INLINE __m128i _mm_add_epi16(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s16(vaddq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); +} + +//added by hasindu +// Adds the 16 signed or unsigned 8-bit integers in a to the 16 signed or unsigned 8-bit integers in b. https://technet.microsoft.com/en-us/subscriptions/yc7tcyzs(v=vs.90) +FORCE_INLINE __m128i _mm_add_epi8(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s8(vaddq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); +} + +//added by hasindu +// Adds the 8 signed 16-bit integers in a to the 8 signed 16-bit integers in b and saturates. https://msdn.microsoft.com/en-us/library/1a306ef8(v=vs.100).aspx +FORCE_INLINE __m128i _mm_adds_epi16(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s16(vqaddq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); +} + +//added by hasindu +//Adds the 16 unsigned 8-bit integers in a to the 16 unsigned 8-bit integers in b and saturates.. https://msdn.microsoft.com/en-us/library/9hahyddy(v=vs.100).aspx +FORCE_INLINE __m128i _mm_adds_epu8(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u8(vqaddq_u8(vreinterpretq_u8_m128i(a), vreinterpretq_u8_m128i(b))); +} + + +// Multiplies the 8 signed or unsigned 16-bit integers from a by the 8 signed or unsigned 16-bit integers from b. https://msdn.microsoft.com/en-us/library/vstudio/9ks1472s(v=vs.100).aspx +FORCE_INLINE __m128i _mm_mullo_epi16(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s16(vmulq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); +} + +// Multiplies the 4 signed or unsigned 32-bit integers from a by the 4 signed or unsigned 32-bit integers from b. https://msdn.microsoft.com/en-us/library/vstudio/bb531409(v=vs.100).aspx +FORCE_INLINE __m128i _mm_mullo_epi32(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s32(vmulq_s32(vreinterpretq_s32_m128i(a),vreinterpretq_s32_m128i(b))); +} + +// Multiplies the four single-precision, floating-point values of a and b. https://msdn.microsoft.com/en-us/library/vstudio/22kbk6t9(v=vs.100).aspx +FORCE_INLINE __m128 _mm_mul_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_f32(vmulq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); +} + +// Divides the four single-precision, floating-point values of a and b. https://msdn.microsoft.com/en-us/library/edaw8147(v=vs.100).aspx +FORCE_INLINE __m128 _mm_div_ps(__m128 a, __m128 b) +{ + float32x4_t recip0 = vrecpeq_f32(vreinterpretq_f32_m128(b)); + float32x4_t recip1 = vmulq_f32(recip0, vrecpsq_f32(recip0, vreinterpretq_f32_m128(b))); + return vreinterpretq_m128_f32(vmulq_f32(vreinterpretq_f32_m128(a), recip1)); +} + +// Divides the scalar single-precision floating point value of a by b. https://msdn.microsoft.com/en-us/library/4y73xa49(v=vs.100).aspx +FORCE_INLINE __m128 _mm_div_ss(__m128 a, __m128 b) +{ + float32_t value = vgetq_lane_f32(vreinterpretq_f32_m128(_mm_div_ps(a, b)), 0); + return vreinterpretq_m128_f32(vsetq_lane_f32(value, vreinterpretq_f32_m128(a), 0)); +} + +// This version does additional iterations to improve accuracy. Between 1 and 4 recommended. +// Computes the approximations of reciprocals of the four single-precision, floating-point values of a. https://msdn.microsoft.com/en-us/library/vstudio/796k1tty(v=vs.100).aspx +FORCE_INLINE __m128 recipq_newton(__m128 in, int n) +{ + int i; + float32x4_t recip = vrecpeq_f32(vreinterpretq_f32_m128(in)); + for (i = 0; i < n; ++i) + { + recip = vmulq_f32(recip, vrecpsq_f32(recip, vreinterpretq_f32_m128(in))); + } + return vreinterpretq_m128_f32(recip); +} + +// Computes the approximations of reciprocals of the four single-precision, floating-point values of a. https://msdn.microsoft.com/en-us/library/vstudio/796k1tty(v=vs.100).aspx +FORCE_INLINE __m128 _mm_rcp_ps(__m128 in) +{ + float32x4_t recip = vrecpeq_f32(vreinterpretq_f32_m128(in)); + recip = vmulq_f32(recip, vrecpsq_f32(recip, vreinterpretq_f32_m128(in))); + return vreinterpretq_m128_f32(recip); +} + +// Computes the approximations of square roots of the four single-precision, floating-point values of a. First computes reciprocal square roots and then reciprocals of the four values. https://msdn.microsoft.com/en-us/library/vstudio/8z67bwwk(v=vs.100).aspx +FORCE_INLINE __m128 _mm_sqrt_ps(__m128 in) +{ + float32x4_t recipsq = vrsqrteq_f32(vreinterpretq_f32_m128(in)); + float32x4_t sq = vrecpeq_f32(recipsq); + // ??? use step versions of both sqrt and recip for better accuracy? + return vreinterpretq_m128_f32(sq); +} + +// Computes the approximation of the square root of the scalar single-precision floating point value of in. https://msdn.microsoft.com/en-us/library/ahfsc22d(v=vs.100).aspx +FORCE_INLINE __m128 _mm_sqrt_ss(__m128 in) +{ + float32_t value = vgetq_lane_f32(vreinterpretq_f32_m128(_mm_sqrt_ps(in)), 0); + return vreinterpretq_m128_f32(vsetq_lane_f32(value, vreinterpretq_f32_m128(in), 0)); +} + +// Computes the approximations of the reciprocal square roots of the four single-precision floating point values of in. https://msdn.microsoft.com/en-us/library/22hfsh53(v=vs.100).aspx +FORCE_INLINE __m128 _mm_rsqrt_ps(__m128 in) +{ + return vreinterpretq_m128_f32(vrsqrteq_f32(vreinterpretq_f32_m128(in))); +} + +// Computes the maximums of the four single-precision, floating-point values of a and b. https://msdn.microsoft.com/en-us/library/vstudio/ff5d607a(v=vs.100).aspx +FORCE_INLINE __m128 _mm_max_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_f32(vmaxq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); +} + +// Computes the minima of the four single-precision, floating-point values of a and b. https://msdn.microsoft.com/en-us/library/vstudio/wh13kadz(v=vs.100).aspx +FORCE_INLINE __m128 _mm_min_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_f32(vminq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); +} + +// Computes the maximum of the two lower scalar single-precision floating point values of a and b. https://msdn.microsoft.com/en-us/library/s6db5esz(v=vs.100).aspx +FORCE_INLINE __m128 _mm_max_ss(__m128 a, __m128 b) +{ + float32_t value = vgetq_lane_f32(vmaxq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)), 0); + return vreinterpretq_m128_f32(vsetq_lane_f32(value, vreinterpretq_f32_m128(a), 0)); +} + +// Computes the minimum of the two lower scalar single-precision floating point values of a and b. https://msdn.microsoft.com/en-us/library/0a9y7xaa(v=vs.100).aspx +FORCE_INLINE __m128 _mm_min_ss(__m128 a, __m128 b) +{ + float32_t value = vgetq_lane_f32(vminq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)), 0); + return vreinterpretq_m128_f32(vsetq_lane_f32(value, vreinterpretq_f32_m128(a), 0)); +} + +//added by hasindu +//Computes the pairwise maxima of the 16 unsigned 8-bit integers from a and the 16 unsigned 8-bit integers from b. https://msdn.microsoft.com/en-us/library/st6634za(v=vs.100).aspx +FORCE_INLINE __m128i _mm_max_epu8(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u8(vmaxq_u8(vreinterpretq_u8_m128i(a), vreinterpretq_u8_m128i(b))); +} + +//added by hasindu +//Computes the pairwise minima of the 16 unsigned 8-bit integers from a and the 16 unsigned 8-bit integers from b. https://msdn.microsoft.com/ko-kr/library/17k8cf58(v=vs.100).aspxx +FORCE_INLINE __m128i _mm_min_epu8(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u8(vminq_u8(vreinterpretq_u8_m128i(a), vreinterpretq_u8_m128i(b))); +} + + +// Computes the pairwise minima of the 8 signed 16-bit integers from a and the 8 signed 16-bit integers from b. https://msdn.microsoft.com/en-us/library/vstudio/6te997ew(v=vs.100).aspx +FORCE_INLINE __m128i _mm_min_epi16(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s16(vminq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); +} + +//added by hasindu +//Computes the pairwise maxima of the 8 signed 16-bit integers from a and the 8 signed 16-bit integers from b. https://msdn.microsoft.com/en-us/LIBRary/3x060h7c(v=vs.100).aspx +FORCE_INLINE __m128i _mm_max_epi16(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s16(vmaxq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); +} + + +// epi versions of min/max +// Computes the pariwise maximums of the four signed 32-bit integer values of a and b. https://msdn.microsoft.com/en-us/library/vstudio/bb514055(v=vs.100).aspx +FORCE_INLINE __m128i _mm_max_epi32(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s32(vmaxq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); +} + +// Computes the pariwise minima of the four signed 32-bit integer values of a and b. https://msdn.microsoft.com/en-us/library/vstudio/bb531476(v=vs.100).aspx +FORCE_INLINE __m128i _mm_min_epi32(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s32(vminq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); +} + +// Multiplies the 8 signed 16-bit integers from a by the 8 signed 16-bit integers from b. https://msdn.microsoft.com/en-us/library/vstudio/59hddw1d(v=vs.100).aspx +FORCE_INLINE __m128i _mm_mulhi_epi16(__m128i a, __m128i b) +{ + /* apoty: issue with large values because of result saturation */ + //int16x8_t ret = vqdmulhq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b)); /* =2*a*b */ + //return vreinterpretq_m128i_s16(vshrq_n_s16(ret, 1)); + int16x4_t a3210 = vget_low_s16(vreinterpretq_s16_m128i(a)); + int16x4_t b3210 = vget_low_s16(vreinterpretq_s16_m128i(b)); + int32x4_t ab3210 = vmull_s16(a3210, b3210); /* 3333222211110000 */ + int16x4_t a7654 = vget_high_s16(vreinterpretq_s16_m128i(a)); + int16x4_t b7654 = vget_high_s16(vreinterpretq_s16_m128i(b)); + int32x4_t ab7654 = vmull_s16(a7654, b7654); /* 7777666655554444 */ + uint16x8x2_t r = vuzpq_u16(vreinterpretq_u16_s32(ab3210), vreinterpretq_u16_s32(ab7654)); + return vreinterpretq_m128i_u16(r.val[1]); +} + +// Computes pairwise add of each argument as single-precision, floating-point values a and b. +//https://msdn.microsoft.com/en-us/library/yd9wecaa.aspx +FORCE_INLINE __m128 _mm_hadd_ps(__m128 a, __m128 b ) +{ +#if defined(__aarch64__) + return vreinterpretq_m128_f32(vpaddq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); //AArch64 +#else + float32x2_t a10 = vget_low_f32(vreinterpretq_f32_m128(a)); + float32x2_t a32 = vget_high_f32(vreinterpretq_f32_m128(a)); + float32x2_t b10 = vget_low_f32(vreinterpretq_f32_m128(b)); + float32x2_t b32 = vget_high_f32(vreinterpretq_f32_m128(b)); + return vreinterpretq_m128_f32(vcombine_f32(vpadd_f32(a10, a32), vpadd_f32(b10, b32))); +#endif +} + +// ****************************************** +// Compare operations +// ****************************************** + +// Compares for less than https://msdn.microsoft.com/en-us/library/vstudio/f330yhc8(v=vs.100).aspx +FORCE_INLINE __m128 _mm_cmplt_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_u32(vcltq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); +} + +// Compares for greater than. https://msdn.microsoft.com/en-us/library/vstudio/11dy102s(v=vs.100).aspx +FORCE_INLINE __m128 _mm_cmpgt_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_u32(vcgtq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); +} + +// Compares for greater than or equal. https://msdn.microsoft.com/en-us/library/vstudio/fs813y2t(v=vs.100).aspx +FORCE_INLINE __m128 _mm_cmpge_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_u32(vcgeq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); +} + +// Compares for less than or equal. https://msdn.microsoft.com/en-us/library/vstudio/1s75w83z(v=vs.100).aspx +FORCE_INLINE __m128 _mm_cmple_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_u32(vcleq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); +} + +// Compares for equality. https://msdn.microsoft.com/en-us/library/vstudio/36aectz5(v=vs.100).aspx +FORCE_INLINE __m128 _mm_cmpeq_ps(__m128 a, __m128 b) +{ + return vreinterpretq_m128_u32(vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); +} + + +//added by hasindu +//Compares the 16 signed or unsigned 8-bit integers in a and the 16 signed or unsigned 8-bit integers in b for equality. https://msdn.microsoft.com/en-us/library/windows/desktop/bz5xk21a(v=vs.90).aspx +FORCE_INLINE __m128i _mm_cmpeq_epi8 (__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u8(vceqq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); +} + +//added by hasindu +//Compares the 8 signed or unsigned 16-bit integers in a and the 8 signed or unsigned 16-bit integers in b for equality. +//https://msdn.microsoft.com/en-us/library/2ay060te(v=vs.100).aspx +FORCE_INLINE __m128i _mm_cmpeq_epi16 (__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u16(vceqq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); +} + +//added by hasindu +//Compares the 16 signed 8-bit integers in a and the 16 signed 8-bit integers in b for lesser than. https://msdn.microsoft.com/en-us/library/windows/desktop/9s46csht(v=vs.90).aspx +FORCE_INLINE __m128i _mm_cmplt_epi8 (__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u8(vcltq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); +} + + +//added by hasindu +//Compares the 16 signed 8-bit integers in a and the 16 signed 8-bit integers in b for greater than. https://msdn.microsoft.com/zh-tw/library/wf45zt2b(v=vs.100).aspx +FORCE_INLINE __m128i _mm_cmpgt_epi8 (__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u8(vcgtq_s8(vreinterpretq_s8_m128i(a), vreinterpretq_s8_m128i(b))); +} + +//added by hasindu +//Compares the 8 signed 16-bit integers in a and the 8 signed 16-bit integers in b for greater than. https://technet.microsoft.com/en-us/library/xd43yfsa(v=vs.100).aspx +FORCE_INLINE __m128i _mm_cmpgt_epi16 (__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u16(vcgtq_s16(vreinterpretq_s16_m128i(a), vreinterpretq_s16_m128i(b))); +} + + +// Compares the 4 signed 32-bit integers in a and the 4 signed 32-bit integers in b for less than. https://msdn.microsoft.com/en-us/library/vstudio/4ak0bf5d(v=vs.100).aspx +FORCE_INLINE __m128i _mm_cmplt_epi32(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u32(vcltq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); +} + +// Compares the 4 signed 32-bit integers in a and the 4 signed 32-bit integers in b for greater than. https://msdn.microsoft.com/en-us/library/vstudio/1s9f2z0y(v=vs.100).aspx +FORCE_INLINE __m128i _mm_cmpgt_epi32(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_u32(vcgtq_s32(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b))); +} + +// Compares the four 32-bit floats in a and b to check if any values are NaN. Ordered compare between each value returns true for "orderable" and false for "not orderable" (NaN). https://msdn.microsoft.com/en-us/library/vstudio/0h9w00fx(v=vs.100).aspx +// see also: +// http://stackoverflow.com/questions/8627331/what-does-ordered-unordered-comparison-mean +// http://stackoverflow.com/questions/29349621/neon-isnanval-intrinsics +FORCE_INLINE __m128 _mm_cmpord_ps(__m128 a, __m128 b ) +{ + // Note: NEON does not have ordered compare builtin + // Need to compare a eq a and b eq b to check for NaN + // Do AND of results to get final + uint32x4_t ceqaa = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); + uint32x4_t ceqbb = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); + return vreinterpretq_m128_u32(vandq_u32(ceqaa, ceqbb)); +} + +// Compares the lower single-precision floating point scalar values of a and b using a less than operation. : https://msdn.microsoft.com/en-us/library/2kwe606b(v=vs.90).aspx +// Important note!! The documentation on MSDN is incorrect! If either of the values is a NAN the docs say you will get a one, but in fact, it will return a zero!! +FORCE_INLINE int _mm_comilt_ss(__m128 a, __m128 b) +{ + uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); + uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); + uint32x4_t a_or_b_nan = vmvnq_u32(vandq_u32(a_not_nan, b_not_nan)); + uint32x4_t a_lt_b = vcltq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)); + return (vgetq_lane_u32(vorrq_u32(a_or_b_nan, a_lt_b), 0) != 0) ? 1 : 0; +} + +// Compares the lower single-precision floating point scalar values of a and b using a greater than operation. : https://msdn.microsoft.com/en-us/library/b0738e0t(v=vs.100).aspx +FORCE_INLINE int _mm_comigt_ss(__m128 a, __m128 b) +{ + //return vgetq_lane_u32(vcgtq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)), 0); + uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); + uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); + uint32x4_t a_and_b_not_nan = vandq_u32(a_not_nan, b_not_nan); + uint32x4_t a_gt_b = vcgtq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)); + return (vgetq_lane_u32(vandq_u32(a_and_b_not_nan, a_gt_b), 0) != 0) ? 1 : 0; +} + +// Compares the lower single-precision floating point scalar values of a and b using a less than or equal operation. : https://msdn.microsoft.com/en-us/library/1w4t7c57(v=vs.90).aspx +FORCE_INLINE int _mm_comile_ss(__m128 a, __m128 b) +{ + //return vgetq_lane_u32(vcleq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)), 0); + uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); + uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); + uint32x4_t a_or_b_nan = vmvnq_u32(vandq_u32(a_not_nan, b_not_nan)); + uint32x4_t a_le_b = vcleq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)); + return (vgetq_lane_u32(vorrq_u32(a_or_b_nan, a_le_b), 0) != 0) ? 1 : 0; +} + +// Compares the lower single-precision floating point scalar values of a and b using a greater than or equal operation. : https://msdn.microsoft.com/en-us/library/8t80des6(v=vs.100).aspx +FORCE_INLINE int _mm_comige_ss(__m128 a, __m128 b) +{ + //return vgetq_lane_u32(vcgeq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)), 0); + uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); + uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); + uint32x4_t a_and_b_not_nan = vandq_u32(a_not_nan, b_not_nan); + uint32x4_t a_ge_b = vcgeq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)); + return (vgetq_lane_u32(vandq_u32(a_and_b_not_nan, a_ge_b), 0) != 0) ? 1 : 0; +} + +// Compares the lower single-precision floating point scalar values of a and b using an equality operation. : https://msdn.microsoft.com/en-us/library/93yx2h2b(v=vs.100).aspx +FORCE_INLINE int _mm_comieq_ss(__m128 a, __m128 b) +{ + //return vgetq_lane_u32(vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)), 0); + uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); + uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); + uint32x4_t a_or_b_nan = vmvnq_u32(vandq_u32(a_not_nan, b_not_nan)); + uint32x4_t a_eq_b = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)); + return (vgetq_lane_u32(vorrq_u32(a_or_b_nan, a_eq_b), 0) != 0) ? 1 : 0; +} + +// Compares the lower single-precision floating point scalar values of a and b using an inequality operation. : https://msdn.microsoft.com/en-us/library/bafh5e0a(v=vs.90).aspx +FORCE_INLINE int _mm_comineq_ss(__m128 a, __m128 b) +{ + //return !vgetq_lane_u32(vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b)), 0); + uint32x4_t a_not_nan = vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(a)); + uint32x4_t b_not_nan = vceqq_f32(vreinterpretq_f32_m128(b), vreinterpretq_f32_m128(b)); + uint32x4_t a_and_b_not_nan = vandq_u32(a_not_nan, b_not_nan); + uint32x4_t a_neq_b = vmvnq_u32(vceqq_f32(vreinterpretq_f32_m128(a), vreinterpretq_f32_m128(b))); + return (vgetq_lane_u32(vandq_u32(a_and_b_not_nan, a_neq_b), 0) != 0) ? 1 : 0; +} + +// according to the documentation, these intrinsics behave the same as the non-'u' versions. We'll just alias them here. +#define _mm_ucomilt_ss _mm_comilt_ss +#define _mm_ucomile_ss _mm_comile_ss +#define _mm_ucomigt_ss _mm_comigt_ss +#define _mm_ucomige_ss _mm_comige_ss +#define _mm_ucomieq_ss _mm_comieq_ss +#define _mm_ucomineq_ss _mm_comineq_ss + +// ****************************************** +// Conversions +// ****************************************** + +// Converts the four single-precision, floating-point values of a to signed 32-bit integer values using truncate. https://msdn.microsoft.com/en-us/library/vstudio/1h005y6x(v=vs.100).aspx +FORCE_INLINE __m128i _mm_cvttps_epi32(__m128 a) +{ + return vreinterpretq_m128i_s32(vcvtq_s32_f32(vreinterpretq_f32_m128(a))); +} + +// Converts the four signed 32-bit integer values of a to single-precision, floating-point values https://msdn.microsoft.com/en-us/library/vstudio/36bwxcx5(v=vs.100).aspx +FORCE_INLINE __m128 _mm_cvtepi32_ps(__m128i a) +{ + return vreinterpretq_m128_f32(vcvtq_f32_s32(vreinterpretq_s32_m128i(a))); +} + +// Converts the four unsigned 8-bit integers in the lower 32 bits to four unsigned 32-bit integers. https://msdn.microsoft.com/en-us/library/bb531467%28v=vs.100%29.aspx +FORCE_INLINE __m128i _mm_cvtepu8_epi32(__m128i a) +{ + uint8x16_t u8x16 = vreinterpretq_u8_s32(a); /* xxxx xxxx xxxx DCBA */ + uint16x8_t u16x8 = vmovl_u8(vget_low_u8(u8x16)); /* 0x0x 0x0x 0D0C 0B0A */ + uint32x4_t u32x4 = vmovl_u16(vget_low_u16(u16x8)); /* 000D 000C 000B 000A */ + return vreinterpretq_s32_u32(u32x4); +} + +// Converts the four signed 16-bit integers in the lower 64 bits to four signed 32-bit integers. https://msdn.microsoft.com/en-us/library/bb514079%28v=vs.100%29.aspx +FORCE_INLINE __m128i _mm_cvtepi16_epi32(__m128i a) +{ + return vreinterpretq_m128i_s32(vmovl_s16(vget_low_s16(vreinterpretq_s16_m128i(a)))); +} + +// Converts the four single-precision, floating-point values of a to signed 32-bit integer values. https://msdn.microsoft.com/en-us/library/vstudio/xdc42k5e(v=vs.100).aspx +// *NOTE*. The default rounding mode on SSE is 'round to even', which ArmV7 does not support! +// It is supported on ARMv8 however. +FORCE_INLINE __m128i _mm_cvtps_epi32(__m128 a) +{ +#if defined(__aarch64__) + return vcvtnq_s32_f32(a); +#else + uint32x4_t signmask = vdupq_n_u32(0x80000000); + float32x4_t half = vbslq_f32(signmask, vreinterpretq_f32_m128(a), vdupq_n_f32(0.5f)); /* +/- 0.5 */ + int32x4_t r_normal = vcvtq_s32_f32(vaddq_f32(vreinterpretq_f32_m128(a), half)); /* round to integer: [a + 0.5]*/ + int32x4_t r_trunc = vcvtq_s32_f32(vreinterpretq_f32_m128(a)); /* truncate to integer: [a] */ + int32x4_t plusone = vreinterpretq_s32_u32(vshrq_n_u32(vreinterpretq_u32_s32(vnegq_s32(r_trunc)), 31)); /* 1 or 0 */ + int32x4_t r_even = vbicq_s32(vaddq_s32(r_trunc, plusone), vdupq_n_s32(1)); /* ([a] + {0,1}) & ~1 */ + float32x4_t delta = vsubq_f32(vreinterpretq_f32_m128(a), vcvtq_f32_s32(r_trunc)); /* compute delta: delta = (a - [a]) */ + uint32x4_t is_delta_half = vceqq_f32(delta, half); /* delta == +/- 0.5 */ + return vreinterpretq_m128i_s32(vbslq_s32(is_delta_half, r_even, r_normal)); +#endif +} + +// Moves the least significant 32 bits of a to a 32-bit integer. https://msdn.microsoft.com/en-us/library/5z7a9642%28v=vs.90%29.aspx +FORCE_INLINE int _mm_cvtsi128_si32(__m128i a) +{ + return vgetq_lane_s32(vreinterpretq_s32_m128i(a), 0); +} + +// Moves 32-bit integer a to the least significant 32 bits of an __m128 object, zero extending the upper bits. https://msdn.microsoft.com/en-us/library/ct3539ha%28v=vs.90%29.aspx +FORCE_INLINE __m128i _mm_cvtsi32_si128(int a) +{ + return vreinterpretq_m128i_s32(vsetq_lane_s32(a, vdupq_n_s32(0), 0)); +} + + +// Applies a type cast to reinterpret four 32-bit floating point values passed in as a 128-bit parameter as packed 32-bit integers. https://msdn.microsoft.com/en-us/library/bb514099.aspx +FORCE_INLINE __m128i _mm_castps_si128(__m128 a) +{ + return vreinterpretq_m128i_s32(vreinterpretq_s32_m128(a)); +} + +// Applies a type cast to reinterpret four 32-bit integers passed in as a 128-bit parameter as packed 32-bit floating point values. https://msdn.microsoft.com/en-us/library/bb514029.aspx +FORCE_INLINE __m128 _mm_castsi128_ps(__m128i a) +{ + return vreinterpretq_m128_s32(vreinterpretq_s32_m128i(a)); +} + +// Loads 128-bit value. : https://msdn.microsoft.com/en-us/library/atzzad1h(v=vs.80).aspx +FORCE_INLINE __m128i _mm_load_si128(const __m128i *p) +{ + return vreinterpretq_m128i_s32(vld1q_s32((int32_t *)p)); +} + +//added by hasindu (verify this for requirement of alignment) +// Loads 128-bit value. : https://msdn.microsoft.com/zh-cn/library/f4k12ae8(v=vs.90).aspx +FORCE_INLINE __m128i _mm_loadu_si128(const __m128i *p) +{ + return vreinterpretq_m128i_s32(vld1q_s32((int32_t *)p)); +} + + +// ****************************************** +// Miscellaneous Operations +// ****************************************** + +// Packs the 16 signed 16-bit integers from a and b into 8-bit integers and saturates. https://msdn.microsoft.com/en-us/library/k4y4f7w5%28v=vs.90%29.aspx +FORCE_INLINE __m128i _mm_packs_epi16(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s8(vcombine_s8(vqmovn_s16(vreinterpretq_s16_m128i(a)), vqmovn_s16(vreinterpretq_s16_m128i(b)))); +} + +// Packs the 16 signed 16 - bit integers from a and b into 8 - bit unsigned integers and saturates. https://msdn.microsoft.com/en-us/library/07ad1wx4(v=vs.100).aspx +FORCE_INLINE __m128i _mm_packus_epi16(const __m128i a, const __m128i b) +{ + return vreinterpretq_m128i_u8(vcombine_u8(vqmovun_s16(vreinterpretq_s16_m128i(a)), vqmovun_s16(vreinterpretq_s16_m128i(b)))); +} + +// Packs the 8 signed 32-bit integers from a and b into signed 16-bit integers and saturates. https://msdn.microsoft.com/en-us/library/393t56f9%28v=vs.90%29.aspx +FORCE_INLINE __m128i _mm_packs_epi32(__m128i a, __m128i b) +{ + return vreinterpretq_m128i_s16(vcombine_s16(vqmovn_s32(vreinterpretq_s32_m128i(a)), vqmovn_s32(vreinterpretq_s32_m128i(b)))); +} + +// Interleaves the lower 8 signed or unsigned 8-bit integers in a with the lower 8 signed or unsigned 8-bit integers in b. https://msdn.microsoft.com/en-us/library/xf7k860c%28v=vs.90%29.aspx +FORCE_INLINE __m128i _mm_unpacklo_epi8(__m128i a, __m128i b) +{ + int8x8_t a1 = vreinterpret_s8_s16(vget_low_s16(vreinterpretq_s16_m128i(a))); + int8x8_t b1 = vreinterpret_s8_s16(vget_low_s16(vreinterpretq_s16_m128i(b))); + int8x8x2_t result = vzip_s8(a1, b1); + return vreinterpretq_m128i_s8(vcombine_s8(result.val[0], result.val[1])); +} + +// Interleaves the lower 4 signed or unsigned 16-bit integers in a with the lower 4 signed or unsigned 16-bit integers in b. https://msdn.microsoft.com/en-us/library/btxb17bw%28v=vs.90%29.aspx +FORCE_INLINE __m128i _mm_unpacklo_epi16(__m128i a, __m128i b) +{ + int16x4_t a1 = vget_low_s16(vreinterpretq_s16_m128i(a)); + int16x4_t b1 = vget_low_s16(vreinterpretq_s16_m128i(b)); + int16x4x2_t result = vzip_s16(a1, b1); + return vreinterpretq_m128i_s16(vcombine_s16(result.val[0], result.val[1])); +} + +// Interleaves the lower 2 signed or unsigned 32 - bit integers in a with the lower 2 signed or unsigned 32 - bit integers in b. https://msdn.microsoft.com/en-us/library/x8atst9d(v=vs.100).aspx +FORCE_INLINE __m128i _mm_unpacklo_epi32(__m128i a, __m128i b) +{ + int32x2_t a1 = vget_low_s32(vreinterpretq_s32_m128i(a)); + int32x2_t b1 = vget_low_s32(vreinterpretq_s32_m128i(b)); + int32x2x2_t result = vzip_s32(a1, b1); + return vreinterpretq_m128i_s32(vcombine_s32(result.val[0], result.val[1])); +} + +// Selects and interleaves the lower two single-precision, floating-point values from a and b. https://msdn.microsoft.com/en-us/library/25st103b%28v=vs.90%29.aspx +FORCE_INLINE __m128 _mm_unpacklo_ps(__m128 a, __m128 b) +{ + float32x2_t a1 = vget_low_f32(vreinterpretq_f32_m128(a)); + float32x2_t b1 = vget_low_f32(vreinterpretq_f32_m128(b)); + float32x2x2_t result = vzip_f32(a1, b1); + return vreinterpretq_m128_f32(vcombine_f32(result.val[0], result.val[1])); +} + +// Selects and interleaves the upper two single-precision, floating-point values from a and b. https://msdn.microsoft.com/en-us/library/skccxx7d%28v=vs.90%29.aspx +FORCE_INLINE __m128 _mm_unpackhi_ps(__m128 a, __m128 b) +{ + float32x2_t a1 = vget_high_f32(vreinterpretq_f32_m128(a)); + float32x2_t b1 = vget_high_f32(vreinterpretq_f32_m128(b)); + float32x2x2_t result = vzip_f32(a1, b1); + return vreinterpretq_m128_f32(vcombine_f32(result.val[0], result.val[1])); +} + +// Interleaves the upper 8 signed or unsigned 8-bit integers in a with the upper 8 signed or unsigned 8-bit integers in b. https://msdn.microsoft.com/en-us/library/t5h7783k(v=vs.100).aspx +FORCE_INLINE __m128i _mm_unpackhi_epi8(__m128i a, __m128i b) +{ + int8x8_t a1 = vreinterpret_s8_s16(vget_high_s16(vreinterpretq_s16_m128i(a))); + int8x8_t b1 = vreinterpret_s8_s16(vget_high_s16(vreinterpretq_s16_m128i(b))); + int8x8x2_t result = vzip_s8(a1, b1); + return vreinterpretq_m128i_s8(vcombine_s8(result.val[0], result.val[1])); +} + +// Interleaves the upper 4 signed or unsigned 16-bit integers in a with the upper 4 signed or unsigned 16-bit integers in b. https://msdn.microsoft.com/en-us/library/03196cz7(v=vs.100).aspx +FORCE_INLINE __m128i _mm_unpackhi_epi16(__m128i a, __m128i b) +{ + int16x4_t a1 = vget_high_s16(vreinterpretq_s16_m128i(a)); + int16x4_t b1 = vget_high_s16(vreinterpretq_s16_m128i(b)); + int16x4x2_t result = vzip_s16(a1, b1); + return vreinterpretq_m128i_s16(vcombine_s16(result.val[0], result.val[1])); +} + +// Interleaves the upper 2 signed or unsigned 32-bit integers in a with the upper 2 signed or unsigned 32-bit integers in b. https://msdn.microsoft.com/en-us/library/65sa7cbs(v=vs.100).aspx +FORCE_INLINE __m128i _mm_unpackhi_epi32(__m128i a, __m128i b) +{ + int32x2_t a1 = vget_high_s32(vreinterpretq_s32_m128i(a)); + int32x2_t b1 = vget_high_s32(vreinterpretq_s32_m128i(b)); + int32x2x2_t result = vzip_s32(a1, b1); + return vreinterpretq_m128i_s32(vcombine_s32(result.val[0], result.val[1])); +} + +// Extracts the selected signed or unsigned 16-bit integer from a and zero extends. https://msdn.microsoft.com/en-us/library/6dceta0c(v=vs.100).aspx +//FORCE_INLINE int _mm_extract_epi16(__m128i a, __constrange(0,8) int imm) +#define _mm_extract_epi16(a, imm) \ +({ \ + (vgetq_lane_s16(vreinterpretq_s16_m128i(a), (imm)) & 0x0000ffffUL); \ +}) + +// Inserts the least significant 16 bits of b into the selected 16-bit integer of a. https://msdn.microsoft.com/en-us/library/kaze8hz1%28v=vs.100%29.aspx +//FORCE_INLINE __m128i _mm_insert_epi16(__m128i a, const int b, __constrange(0,8) int imm) +#define _mm_insert_epi16(a, b, imm) \ +({ \ + vreinterpretq_m128i_s16(vsetq_lane_s16((b), vreinterpretq_s16_m128i(a), (imm))); \ +}) + +// ****************************************** +// Streaming Extensions +// ****************************************** + +// Guarantees that every preceding store is globally visible before any subsequent store. https://msdn.microsoft.com/en-us/library/5h2w73d1%28v=vs.90%29.aspx +FORCE_INLINE void _mm_sfence(void) +{ + __sync_synchronize(); +} + +// Stores the data in a to the address p without polluting the caches. If the cache line containing address p is already in the cache, the cache will be updated.Address p must be 16 - byte aligned. https://msdn.microsoft.com/en-us/library/ba08y07y%28v=vs.90%29.aspx +FORCE_INLINE void _mm_stream_si128(__m128i *p, __m128i a) +{ + *p = a; +} + +// Cache line containing p is flushed and invalidated from all caches in the coherency domain. : https://msdn.microsoft.com/en-us/library/ba08y07y(v=vs.100).aspx +FORCE_INLINE void _mm_clflush(void const*p) +{ + // no corollary for Neon? +} + +#if defined(__GNUC__) || defined(__clang__) +# pragma pop_macro("ALIGN_STRUCT") +# pragma pop_macro("FORCE_INLINE") +#endif + +#endif diff --git a/src/backend/viterbi_768/spiral-neon.c b/src/backend/viterbi_768/spiral-neon.c new file mode 100644 index 0000000..3978b39 --- /dev/null +++ b/src/backend/viterbi_768/spiral-neon.c @@ -0,0 +1,701 @@ +#ifdef NEON_AVAILABLE +/*************************************************************** +This code was generated by Spiral 6.0 beta, www.spiral.net -- +Copyright (c) 2005-2008, Carnegie Mellon University. +All rights reserved. +The code is distributed under the GNU General Public License (GPL) +(see http://www.gnu.org/copyleft/gpl.html) + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +*AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************/ + +//#include +//#include +//#include +//#include +//#include +#include "SSE2NEON.h" +#include "spiral-neon.h" +void init_FULL_SPIRAL() { +} + +void FULL_SPIRAL_neon(int amount, int32_t *Y, int32_t *X, int32_t *syms, unsigned char *dec, int32_t *Branchtab) { +int i9; +// for(i9 = 0; i9 <= amount; i9++) { + for(i9 = 0; i9 < amount; i9++) { + int32_t a1002, a1006, a1010, a1014, a822, a828, a834 + , a840; + int a820, a850; + unsigned char s118, s125, s132, s139, s146, s153, s160 + , s167, s174, s181, s188, s195, s202, s209, s216 + , s223; + int32_t *a1001, *a1005, *a1009, *a1013, *a821, *a827, *a833 + , *a839, *b104; + unsigned char *a1021, *a1030, *a1039, *a1048, *a1057, *a1066, *a1075 + , *a1084, *a849, *a851, *a872, *a893, *a914, *a935, *a956 + , *a977, *a998; + __m128i *a1000, *a818, *a819, *a824, *a830, *a836, *a842 + , *a852, *a853, *a854, *a855, *a856, *a859, *a862, *a865 + , *a873, *a874, *a875, *a876, *a877, *a880, *a883, *a886 + , *a894, *a895, *a896, *a897, *a898, *a901, *a904, *a907 + , *a915, *a916, *a917, *a918, *a919, *a922, *a925, *a928 + , *a936, *a937, *a938, *a939, *a940, *a943, *a946, *a949 + , *a957, *a958, *a959, *a960, *a961, *a964, *a967, *a970 + , *a978, *a979, *a980, *a981, *a982, *a985, *a988, *a991 + , *a999; + __m128i a1003, a1004, a1007, a1008, a1011, a1012, a1015 + , a1016, a1017, a1018, a1019, a1020, a1022, a1023, a1024 + , a1025, a1026, a1027, a1028, a1029, a1031, a1032, a1033 + , a1034, a1035, a1036, a1037, a1038, a1040, a1041, a1042 + , a1043, a1044, a1045, a1046, a1047, a1049, a1050, a1051 + , a1052, a1053, a1054, a1055, a1056, a1058, a1059, a1060 + , a1061, a1062, a1063, a1064, a1065, a1067, a1068, a1069 + , a1070, a1071, a1072, a1073, a1074, a1076, a1077, a1078 + , a1079, a1080, a1081, a1082, a1083, a823, a825, a826 + , a829, a831, a832, a835, a837, a838, a841, a843 + , a844, a845, a846, a847, a848, a857, a858, a860 + , a861, a863, a864, a866, a867, a868, a869, a870 + , a871, a878, a879, a881, a882, a884, a885, a887 + , a888, a889, a890, a891, a892, a899, a900, a902 + , a903, a905, a906, a908, a909, a910, a911, a912 + , a913, a920, a921, a923, a924, a926, a927, a929 + , a930, a931, a932, a933, a934, a941, a942, a944 + , a945, a947, a948, a950, a951, a952, a953, a954 + , a955, a962, a963, a965, a966, a968, a969, a971 + , a972, a973, a974, a975, a976, a983, a984, a986 + , a987, a989, a990, a992, a993, a994, a995, a996 + , a997, b105, b106, b107, b108, b109, b110, b111 + , b112, b113, b114, b115, b116, b117, b118, b119 + , b120, b121, b122, b123, b124, b125, b126, b127 + , b128, b129, b130, b131, b132, b133, b134, b135 + , b136, d37, d38, d39, d40, d41, d42, d43 + , d44, d45, d46, d47, d48, d49, d50, d51 + , d52, d53, d54, d55, d56, d57, d58, d59 + , d60, d61, d62, d63, d64, d65, d66, d67 + , d68, m100, m101, m102, m103, m104, m105, m106 + , m107, m108, m109, m110, m111, m112, m113, m114 + , m115, m116, m117, m118, m119, m120, m121, m122 + , m123, m124, m125, m126, m127, m128, m129, m130 + , m131, m132, m133, m134, m135, m136, m73, m74 + , m75, m76, m77, m78, m79, m80, m81, m82 + , m83, m84, m85, m86, m87, m88, m89, m90 + , m91, m92, m93, m94, m95, m96, m97, m98 + , m99, s114, s115, s116, s117, s119, s120, s121 + , s122, s123, s124, s126, s127, s128, s129, s130 + , s131, s133, s134, s135, s136, s137, s138, s140 + , s141, s142, s143, s144, s145, s147, s148, s149 + , s150, s151, s152, s154, s155, s156, s157, s158 + , s159, s161, s162, s163, s164, s165, s166, s168 + , s169, s170, s171, s172, s173, s175, s176, s177 + , s178, s179, s180, s182, s183, s184, s185, s186 + , s187, s189, s190, s191, s192, s193, s194, s196 + , s197, s198, s199, s200, s201, s203, s204, s205 + , s206, s207, s208, s210, s211, s212, s213, s214 + , s215, s217, s218, s219, s220, s221, s222, s224 + , s225, t39, t40, t41, t42, t43, t44, t45 + , t46, t47, t48, t49, t50, t51, t52, t53 + , t54, t55, t56, t57, t58, t59, t60, t61 + , t62, t63, t64, t65, t66, t67, t68, t69 + , t70; + a818 = ((__m128i *) X); + s114 = *(a818); + a819 = (a818 + 8); + s115 = *(a819); + a820 = (8 * i9); + a821 = (syms + a820); + a822 = *(a821); + a823 = _mm_set1_epi32(a822); + a824 = ((__m128i *) Branchtab); + a825 = *(a824); + a826 = _mm_xor_si128(a823, a825); + b104 = (a820 + syms); + a827 = (b104 + 1); + a828 = *(a827); + a829 = _mm_set1_epi32(a828); + a830 = (a824 + 8); + a831 = *(a830); + a832 = _mm_xor_si128(a829, a831); + a833 = (b104 + 2); + a834 = *(a833); + a835 = _mm_set1_epi32(a834); + a836 = (a824 + 16); + a837 = *(a836); + a838 = _mm_xor_si128(a835, a837); + a839 = (b104 + 3); + a840 = *(a839); + a841 = _mm_set1_epi32(a840); + a842 = (a824 + 24); + a843 = *(a842); + a844 = _mm_xor_si128(a841, a843); + b105 = _mm_add_epi32(a826, a832); + b106 = _mm_add_epi32(b105, a838); + t39 = _mm_add_epi32(b106, a844); + t40 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t39); + m73 = _mm_add_epi32(s114, t39); + m74 = _mm_add_epi32(s115, t40); + m75 = _mm_add_epi32(s114, t40); + m76 = _mm_add_epi32(s115, t39); + d37 = _mm_cmpgt_epi32(m73, m74); + d38 = _mm_cmpgt_epi32(m75, m76); + a845 = _mm_andnot_si128(d37, m73); + a846 = _mm_and_si128(d37, m74); + s116 = _mm_or_si128(a845, a846); + a847 = _mm_andnot_si128(d38, m75); + a848 = _mm_and_si128(d38, m76); + s117 = _mm_or_si128(a847, a848); + s118 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d37,_mm_setzero_si128()),_mm_packs_epi16(d38,_mm_setzero_si128())),_mm_setzero_si128())); + a849 = ((unsigned char *) dec); + a850 = (16 * i9); + a851 = (a849 + a850); + *(a851) = s118; + s119 = _mm_unpacklo_epi32(s116, s117); + s120 = _mm_unpackhi_epi32(s116, s117); + a852 = ((__m128i *) Y); + *(a852) = s119; + a853 = (a852 + 1); + *(a853) = s120; + a854 = (a818 + 1); + s121 = *(a854); + a855 = (a818 + 9); + s122 = *(a855); + a856 = (a824 + 1); + a857 = *(a856); + a858 = _mm_xor_si128(a823, a857); + a859 = (a824 + 9); + a860 = *(a859); + a861 = _mm_xor_si128(a829, a860); + a862 = (a824 + 17); + a863 = *(a862); + a864 = _mm_xor_si128(a835, a863); + a865 = (a824 + 25); + a866 = *(a865); + a867 = _mm_xor_si128(a841, a866); + b107 = _mm_add_epi32(a858, a861); + b108 = _mm_add_epi32(b107, a864); + t41 = _mm_add_epi32(b108, a867); + t42 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t41); + m77 = _mm_add_epi32(s121, t41); + m78 = _mm_add_epi32(s122, t42); + m79 = _mm_add_epi32(s121, t42); + m80 = _mm_add_epi32(s122, t41); + d39 = _mm_cmpgt_epi32(m77, m78); + d40 = _mm_cmpgt_epi32(m79, m80); + a868 = _mm_andnot_si128(d39, m77); + a869 = _mm_and_si128(d39, m78); + s123 = _mm_or_si128(a868, a869); + a870 = _mm_andnot_si128(d40, m79); + a871 = _mm_and_si128(d40, m80); + s124 = _mm_or_si128(a870, a871); + s125 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d39,_mm_setzero_si128()),_mm_packs_epi16(d40,_mm_setzero_si128())),_mm_setzero_si128())); + a872 = (a851 + 1); + *(a872) = s125; + s126 = _mm_unpacklo_epi32(s123, s124); + s127 = _mm_unpackhi_epi32(s123, s124); + a873 = (a852 + 2); + *(a873) = s126; + a874 = (a852 + 3); + *(a874) = s127; + a875 = (a818 + 2); + s128 = *(a875); + a876 = (a818 + 10); + s129 = *(a876); + a877 = (a824 + 2); + a878 = *(a877); + a879 = _mm_xor_si128(a823, a878); + a880 = (a824 + 10); + a881 = *(a880); + a882 = _mm_xor_si128(a829, a881); + a883 = (a824 + 18); + a884 = *(a883); + a885 = _mm_xor_si128(a835, a884); + a886 = (a824 + 26); + a887 = *(a886); + a888 = _mm_xor_si128(a841, a887); + b109 = _mm_add_epi32(a879, a882); + b110 = _mm_add_epi32(b109, a885); + t43 = _mm_add_epi32(b110, a888); + t44 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t43); + m81 = _mm_add_epi32(s128, t43); + m82 = _mm_add_epi32(s129, t44); + m83 = _mm_add_epi32(s128, t44); + m84 = _mm_add_epi32(s129, t43); + d41 = _mm_cmpgt_epi32(m81, m82); + d42 = _mm_cmpgt_epi32(m83, m84); + a889 = _mm_andnot_si128(d41, m81); + a890 = _mm_and_si128(d41, m82); + s130 = _mm_or_si128(a889, a890); + a891 = _mm_andnot_si128(d42, m83); + a892 = _mm_and_si128(d42, m84); + s131 = _mm_or_si128(a891, a892); + s132 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d41,_mm_setzero_si128()),_mm_packs_epi16(d42,_mm_setzero_si128())),_mm_setzero_si128())); + a893 = (a851 + 2); + *(a893) = s132; + s133 = _mm_unpacklo_epi32(s130, s131); + s134 = _mm_unpackhi_epi32(s130, s131); + a894 = (a852 + 4); + *(a894) = s133; + a895 = (a852 + 5); + *(a895) = s134; + a896 = (a818 + 3); + s135 = *(a896); + a897 = (a818 + 11); + s136 = *(a897); + a898 = (a824 + 3); + a899 = *(a898); + a900 = _mm_xor_si128(a823, a899); + a901 = (a824 + 11); + a902 = *(a901); + a903 = _mm_xor_si128(a829, a902); + a904 = (a824 + 19); + a905 = *(a904); + a906 = _mm_xor_si128(a835, a905); + a907 = (a824 + 27); + a908 = *(a907); + a909 = _mm_xor_si128(a841, a908); + b111 = _mm_add_epi32(a900, a903); + b112 = _mm_add_epi32(b111, a906); + t45 = _mm_add_epi32(b112, a909); + t46 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t45); + m85 = _mm_add_epi32(s135, t45); + m86 = _mm_add_epi32(s136, t46); + m87 = _mm_add_epi32(s135, t46); + m88 = _mm_add_epi32(s136, t45); + d43 = _mm_cmpgt_epi32(m85, m86); + d44 = _mm_cmpgt_epi32(m87, m88); + a910 = _mm_andnot_si128(d43, m85); + a911 = _mm_and_si128(d43, m86); + s137 = _mm_or_si128(a910, a911); + a912 = _mm_andnot_si128(d44, m87); + a913 = _mm_and_si128(d44, m88); + s138 = _mm_or_si128(a912, a913); + s139 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d43,_mm_setzero_si128()),_mm_packs_epi16(d44,_mm_setzero_si128())),_mm_setzero_si128())); + a914 = (a851 + 3); + *(a914) = s139; + s140 = _mm_unpacklo_epi32(s137, s138); + s141 = _mm_unpackhi_epi32(s137, s138); + a915 = (a852 + 6); + *(a915) = s140; + a916 = (a852 + 7); + *(a916) = s141; + a917 = (a818 + 4); + s142 = *(a917); + a918 = (a818 + 12); + s143 = *(a918); + a919 = (a824 + 4); + a920 = *(a919); + a921 = _mm_xor_si128(a823, a920); + a922 = (a824 + 12); + a923 = *(a922); + a924 = _mm_xor_si128(a829, a923); + a925 = (a824 + 20); + a926 = *(a925); + a927 = _mm_xor_si128(a835, a926); + a928 = (a824 + 28); + a929 = *(a928); + a930 = _mm_xor_si128(a841, a929); + b113 = _mm_add_epi32(a921, a924); + b114 = _mm_add_epi32(b113, a927); + t47 = _mm_add_epi32(b114, a930); + t48 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t47); + m89 = _mm_add_epi32(s142, t47); + m90 = _mm_add_epi32(s143, t48); + m91 = _mm_add_epi32(s142, t48); + m92 = _mm_add_epi32(s143, t47); + d45 = _mm_cmpgt_epi32(m89, m90); + d46 = _mm_cmpgt_epi32(m91, m92); + a931 = _mm_andnot_si128(d45, m89); + a932 = _mm_and_si128(d45, m90); + s144 = _mm_or_si128(a931, a932); + a933 = _mm_andnot_si128(d46, m91); + a934 = _mm_and_si128(d46, m92); + s145 = _mm_or_si128(a933, a934); + s146 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d45,_mm_setzero_si128()),_mm_packs_epi16(d46,_mm_setzero_si128())),_mm_setzero_si128())); + a935 = (a851 + 4); + *(a935) = s146; + s147 = _mm_unpacklo_epi32(s144, s145); + s148 = _mm_unpackhi_epi32(s144, s145); + a936 = (a852 + 8); + *(a936) = s147; + a937 = (a852 + 9); + *(a937) = s148; + a938 = (a818 + 5); + s149 = *(a938); + a939 = (a818 + 13); + s150 = *(a939); + a940 = (a824 + 5); + a941 = *(a940); + a942 = _mm_xor_si128(a823, a941); + a943 = (a824 + 13); + a944 = *(a943); + a945 = _mm_xor_si128(a829, a944); + a946 = (a824 + 21); + a947 = *(a946); + a948 = _mm_xor_si128(a835, a947); + a949 = (a824 + 29); + a950 = *(a949); + a951 = _mm_xor_si128(a841, a950); + b115 = _mm_add_epi32(a942, a945); + b116 = _mm_add_epi32(b115, a948); + t49 = _mm_add_epi32(b116, a951); + t50 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t49); + m93 = _mm_add_epi32(s149, t49); + m94 = _mm_add_epi32(s150, t50); + m95 = _mm_add_epi32(s149, t50); + m96 = _mm_add_epi32(s150, t49); + d47 = _mm_cmpgt_epi32(m93, m94); + d48 = _mm_cmpgt_epi32(m95, m96); + a952 = _mm_andnot_si128(d47, m93); + a953 = _mm_and_si128(d47, m94); + s151 = _mm_or_si128(a952, a953); + a954 = _mm_andnot_si128(d48, m95); + a955 = _mm_and_si128(d48, m96); + s152 = _mm_or_si128(a954, a955); + s153 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d47,_mm_setzero_si128()),_mm_packs_epi16(d48,_mm_setzero_si128())),_mm_setzero_si128())); + a956 = (a851 + 5); + *(a956) = s153; + s154 = _mm_unpacklo_epi32(s151, s152); + s155 = _mm_unpackhi_epi32(s151, s152); + a957 = (a852 + 10); + *(a957) = s154; + a958 = (a852 + 11); + *(a958) = s155; + a959 = (a818 + 6); + s156 = *(a959); + a960 = (a818 + 14); + s157 = *(a960); + a961 = (a824 + 6); + a962 = *(a961); + a963 = _mm_xor_si128(a823, a962); + a964 = (a824 + 14); + a965 = *(a964); + a966 = _mm_xor_si128(a829, a965); + a967 = (a824 + 22); + a968 = *(a967); + a969 = _mm_xor_si128(a835, a968); + a970 = (a824 + 30); + a971 = *(a970); + a972 = _mm_xor_si128(a841, a971); + b117 = _mm_add_epi32(a963, a966); + b118 = _mm_add_epi32(b117, a969); + t51 = _mm_add_epi32(b118, a972); + t52 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t51); + m97 = _mm_add_epi32(s156, t51); + m98 = _mm_add_epi32(s157, t52); + m99 = _mm_add_epi32(s156, t52); + m100 = _mm_add_epi32(s157, t51); + d49 = _mm_cmpgt_epi32(m97, m98); + d50 = _mm_cmpgt_epi32(m99, m100); + a973 = _mm_andnot_si128(d49, m97); + a974 = _mm_and_si128(d49, m98); + s158 = _mm_or_si128(a973, a974); + a975 = _mm_andnot_si128(d50, m99); + a976 = _mm_and_si128(d50, m100); + s159 = _mm_or_si128(a975, a976); + s160 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d49,_mm_setzero_si128()),_mm_packs_epi16(d50,_mm_setzero_si128())),_mm_setzero_si128())); + a977 = (a851 + 6); + *(a977) = s160; + s161 = _mm_unpacklo_epi32(s158, s159); + s162 = _mm_unpackhi_epi32(s158, s159); + a978 = (a852 + 12); + *(a978) = s161; + a979 = (a852 + 13); + *(a979) = s162; + a980 = (a818 + 7); + s163 = *(a980); + a981 = (a818 + 15); + s164 = *(a981); + a982 = (a824 + 7); + a983 = *(a982); + a984 = _mm_xor_si128(a823, a983); + a985 = (a824 + 15); + a986 = *(a985); + a987 = _mm_xor_si128(a829, a986); + a988 = (a824 + 23); + a989 = *(a988); + a990 = _mm_xor_si128(a835, a989); + a991 = (a824 + 31); + a992 = *(a991); + a993 = _mm_xor_si128(a841, a992); + b119 = _mm_add_epi32(a984, a987); + b120 = _mm_add_epi32(b119, a990); + t53 = _mm_add_epi32(b120, a993); + t54 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t53); + m101 = _mm_add_epi32(s163, t53); + m102 = _mm_add_epi32(s164, t54); + m103 = _mm_add_epi32(s163, t54); + m104 = _mm_add_epi32(s164, t53); + d51 = _mm_cmpgt_epi32(m101, m102); + d52 = _mm_cmpgt_epi32(m103, m104); + a994 = _mm_andnot_si128(d51, m101); + a995 = _mm_and_si128(d51, m102); + s165 = _mm_or_si128(a994, a995); + a996 = _mm_andnot_si128(d52, m103); + a997 = _mm_and_si128(d52, m104); + s166 = _mm_or_si128(a996, a997); + s167 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d51,_mm_setzero_si128()),_mm_packs_epi16(d52,_mm_setzero_si128())),_mm_setzero_si128())); + a998 = (a851 + 7); + *(a998) = s167; + s168 = _mm_unpacklo_epi32(s165, s166); + s169 = _mm_unpackhi_epi32(s165, s166); + a999 = (a852 + 14); + *(a999) = s168; + a1000 = (a852 + 15); + *(a1000) = s169; + s170 = *(a852); + s171 = *(a936); + a1001 = (b104 + 4); + a1002 = *(a1001); + a1003 = _mm_set1_epi32(a1002); + a1004 = _mm_xor_si128(a1003, a825); + a1005 = (b104 + 5); + a1006 = *(a1005); + a1007 = _mm_set1_epi32(a1006); + a1008 = _mm_xor_si128(a1007, a831); + a1009 = (b104 + 6); + a1010 = *(a1009); + a1011 = _mm_set1_epi32(a1010); + a1012 = _mm_xor_si128(a1011, a837); + a1013 = (b104 + 7); + a1014 = *(a1013); + a1015 = _mm_set1_epi32(a1014); + a1016 = _mm_xor_si128(a1015, a843); + b121 = _mm_add_epi32(a1004, a1008); + b122 = _mm_add_epi32(b121, a1012); + t55 = _mm_add_epi32(b122, a1016); + t56 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t55); + m105 = _mm_add_epi32(s170, t55); + m106 = _mm_add_epi32(s171, t56); + m107 = _mm_add_epi32(s170, t56); + m108 = _mm_add_epi32(s171, t55); + d53 = _mm_cmpgt_epi32(m105, m106); + d54 = _mm_cmpgt_epi32(m107, m108); + a1017 = _mm_andnot_si128(d53, m105); + a1018 = _mm_and_si128(d53, m106); + s172 = _mm_or_si128(a1017, a1018); + a1019 = _mm_andnot_si128(d54, m107); + a1020 = _mm_and_si128(d54, m108); + s173 = _mm_or_si128(a1019, a1020); + s174 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d53,_mm_setzero_si128()),_mm_packs_epi16(d54,_mm_setzero_si128())),_mm_setzero_si128())); + a1021 = (a851 + 8); + *(a1021) = s174; + s175 = _mm_unpacklo_epi32(s172, s173); + s176 = _mm_unpackhi_epi32(s172, s173); + *(a818) = s175; + *(a854) = s176; + s177 = *(a853); + s178 = *(a937); + a1022 = _mm_xor_si128(a1003, a857); + a1023 = _mm_xor_si128(a1007, a860); + a1024 = _mm_xor_si128(a1011, a863); + a1025 = _mm_xor_si128(a1015, a866); + b123 = _mm_add_epi32(a1022, a1023); + b124 = _mm_add_epi32(b123, a1024); + t57 = _mm_add_epi32(b124, a1025); + t58 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t57); + m109 = _mm_add_epi32(s177, t57); + m110 = _mm_add_epi32(s178, t58); + m111 = _mm_add_epi32(s177, t58); + m112 = _mm_add_epi32(s178, t57); + d55 = _mm_cmpgt_epi32(m109, m110); + d56 = _mm_cmpgt_epi32(m111, m112); + a1026 = _mm_andnot_si128(d55, m109); + a1027 = _mm_and_si128(d55, m110); + s179 = _mm_or_si128(a1026, a1027); + a1028 = _mm_andnot_si128(d56, m111); + a1029 = _mm_and_si128(d56, m112); + s180 = _mm_or_si128(a1028, a1029); + s181 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d55,_mm_setzero_si128()),_mm_packs_epi16(d56,_mm_setzero_si128())),_mm_setzero_si128())); + a1030 = (a851 + 9); + *(a1030) = s181; + s182 = _mm_unpacklo_epi32(s179, s180); + s183 = _mm_unpackhi_epi32(s179, s180); + *(a875) = s182; + *(a896) = s183; + s184 = *(a873); + s185 = *(a957); + a1031 = _mm_xor_si128(a1003, a878); + a1032 = _mm_xor_si128(a1007, a881); + a1033 = _mm_xor_si128(a1011, a884); + a1034 = _mm_xor_si128(a1015, a887); + b125 = _mm_add_epi32(a1031, a1032); + b126 = _mm_add_epi32(b125, a1033); + t59 = _mm_add_epi32(b126, a1034); + t60 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t59); + m113 = _mm_add_epi32(s184, t59); + m114 = _mm_add_epi32(s185, t60); + m115 = _mm_add_epi32(s184, t60); + m116 = _mm_add_epi32(s185, t59); + d57 = _mm_cmpgt_epi32(m113, m114); + d58 = _mm_cmpgt_epi32(m115, m116); + a1035 = _mm_andnot_si128(d57, m113); + a1036 = _mm_and_si128(d57, m114); + s186 = _mm_or_si128(a1035, a1036); + a1037 = _mm_andnot_si128(d58, m115); + a1038 = _mm_and_si128(d58, m116); + s187 = _mm_or_si128(a1037, a1038); + s188 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d57,_mm_setzero_si128()),_mm_packs_epi16(d58,_mm_setzero_si128())),_mm_setzero_si128())); + a1039 = (a851 + 10); + *(a1039) = s188; + s189 = _mm_unpacklo_epi32(s186, s187); + s190 = _mm_unpackhi_epi32(s186, s187); + *(a917) = s189; + *(a938) = s190; + s191 = *(a874); + s192 = *(a958); + a1040 = _mm_xor_si128(a1003, a899); + a1041 = _mm_xor_si128(a1007, a902); + a1042 = _mm_xor_si128(a1011, a905); + a1043 = _mm_xor_si128(a1015, a908); + b127 = _mm_add_epi32(a1040, a1041); + b128 = _mm_add_epi32(b127, a1042); + t61 = _mm_add_epi32(b128, a1043); + t62 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t61); + m117 = _mm_add_epi32(s191, t61); + m118 = _mm_add_epi32(s192, t62); + m119 = _mm_add_epi32(s191, t62); + m120 = _mm_add_epi32(s192, t61); + d59 = _mm_cmpgt_epi32(m117, m118); + d60 = _mm_cmpgt_epi32(m119, m120); + a1044 = _mm_andnot_si128(d59, m117); + a1045 = _mm_and_si128(d59, m118); + s193 = _mm_or_si128(a1044, a1045); + a1046 = _mm_andnot_si128(d60, m119); + a1047 = _mm_and_si128(d60, m120); + s194 = _mm_or_si128(a1046, a1047); + s195 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d59,_mm_setzero_si128()),_mm_packs_epi16(d60,_mm_setzero_si128())),_mm_setzero_si128())); + a1048 = (a851 + 11); + *(a1048) = s195; + s196 = _mm_unpacklo_epi32(s193, s194); + s197 = _mm_unpackhi_epi32(s193, s194); + *(a959) = s196; + *(a980) = s197; + s198 = *(a894); + s199 = *(a978); + a1049 = _mm_xor_si128(a1003, a920); + a1050 = _mm_xor_si128(a1007, a923); + a1051 = _mm_xor_si128(a1011, a926); + a1052 = _mm_xor_si128(a1015, a929); + b129 = _mm_add_epi32(a1049, a1050); + b130 = _mm_add_epi32(b129, a1051); + t63 = _mm_add_epi32(b130, a1052); + t64 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t63); + m121 = _mm_add_epi32(s198, t63); + m122 = _mm_add_epi32(s199, t64); + m123 = _mm_add_epi32(s198, t64); + m124 = _mm_add_epi32(s199, t63); + d61 = _mm_cmpgt_epi32(m121, m122); + d62 = _mm_cmpgt_epi32(m123, m124); + a1053 = _mm_andnot_si128(d61, m121); + a1054 = _mm_and_si128(d61, m122); + s200 = _mm_or_si128(a1053, a1054); + a1055 = _mm_andnot_si128(d62, m123); + a1056 = _mm_and_si128(d62, m124); + s201 = _mm_or_si128(a1055, a1056); + s202 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d61,_mm_setzero_si128()),_mm_packs_epi16(d62,_mm_setzero_si128())),_mm_setzero_si128())); + a1057 = (a851 + 12); + *(a1057) = s202; + s203 = _mm_unpacklo_epi32(s200, s201); + s204 = _mm_unpackhi_epi32(s200, s201); + *(a819) = s203; + *(a855) = s204; + s205 = *(a895); + s206 = *(a979); + a1058 = _mm_xor_si128(a1003, a941); + a1059 = _mm_xor_si128(a1007, a944); + a1060 = _mm_xor_si128(a1011, a947); + a1061 = _mm_xor_si128(a1015, a950); + b131 = _mm_add_epi32(a1058, a1059); + b132 = _mm_add_epi32(b131, a1060); + t65 = _mm_add_epi32(b132, a1061); + t66 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t65); + m125 = _mm_add_epi32(s205, t65); + m126 = _mm_add_epi32(s206, t66); + m127 = _mm_add_epi32(s205, t66); + m128 = _mm_add_epi32(s206, t65); + d63 = _mm_cmpgt_epi32(m125, m126); + d64 = _mm_cmpgt_epi32(m127, m128); + a1062 = _mm_andnot_si128(d63, m125); + a1063 = _mm_and_si128(d63, m126); + s207 = _mm_or_si128(a1062, a1063); + a1064 = _mm_andnot_si128(d64, m127); + a1065 = _mm_and_si128(d64, m128); + s208 = _mm_or_si128(a1064, a1065); + s209 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d63,_mm_setzero_si128()),_mm_packs_epi16(d64,_mm_setzero_si128())),_mm_setzero_si128())); + a1066 = (a851 + 13); + *(a1066) = s209; + s210 = _mm_unpacklo_epi32(s207, s208); + s211 = _mm_unpackhi_epi32(s207, s208); + *(a876) = s210; + *(a897) = s211; + s212 = *(a915); + s213 = *(a999); + a1067 = _mm_xor_si128(a1003, a962); + a1068 = _mm_xor_si128(a1007, a965); + a1069 = _mm_xor_si128(a1011, a968); + a1070 = _mm_xor_si128(a1015, a971); + b133 = _mm_add_epi32(a1067, a1068); + b134 = _mm_add_epi32(b133, a1069); + t67 = _mm_add_epi32(b134, a1070); + t68 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t67); + m129 = _mm_add_epi32(s212, t67); + m130 = _mm_add_epi32(s213, t68); + m131 = _mm_add_epi32(s212, t68); + m132 = _mm_add_epi32(s213, t67); + d65 = _mm_cmpgt_epi32(m129, m130); + d66 = _mm_cmpgt_epi32(m131, m132); + a1071 = _mm_andnot_si128(d65, m129); + a1072 = _mm_and_si128(d65, m130); + s214 = _mm_or_si128(a1071, a1072); + a1073 = _mm_andnot_si128(d66, m131); + a1074 = _mm_and_si128(d66, m132); + s215 = _mm_or_si128(a1073, a1074); + s216 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d65,_mm_setzero_si128()),_mm_packs_epi16(d66,_mm_setzero_si128())),_mm_setzero_si128())); + a1075 = (a851 + 14); + *(a1075) = s216; + s217 = _mm_unpacklo_epi32(s214, s215); + s218 = _mm_unpackhi_epi32(s214, s215); + *(a918) = s217; + *(a939) = s218; + s219 = *(a916); + s220 = *(a1000); + a1076 = _mm_xor_si128(a1003, a983); + a1077 = _mm_xor_si128(a1007, a986); + a1078 = _mm_xor_si128(a1011, a989); + a1079 = _mm_xor_si128(a1015, a992); + b135 = _mm_add_epi32(a1076, a1077); + b136 = _mm_add_epi32(b135, a1078); + t69 = _mm_add_epi32(b136, a1079); + t70 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t69); + m133 = _mm_add_epi32(s219, t69); + m134 = _mm_add_epi32(s220, t70); + m135 = _mm_add_epi32(s219, t70); + m136 = _mm_add_epi32(s220, t69); + d67 = _mm_cmpgt_epi32(m133, m134); + d68 = _mm_cmpgt_epi32(m135, m136); + a1080 = _mm_andnot_si128(d67, m133); + a1081 = _mm_and_si128(d67, m134); + s221 = _mm_or_si128(a1080, a1081); + a1082 = _mm_andnot_si128(d68, m135); + a1083 = _mm_and_si128(d68, m136); + s222 = _mm_or_si128(a1082, a1083); + s223 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d67,_mm_setzero_si128()),_mm_packs_epi16(d68,_mm_setzero_si128())),_mm_setzero_si128())); + a1084 = (a851 + 15); + *(a1084) = s223; + s224 = _mm_unpacklo_epi32(s221, s222); + s225 = _mm_unpackhi_epi32(s221, s222); + *(a960) = s224; + *(a981) = s225; + } + /* skip */ +} +#endif diff --git a/src/backend/viterbi_768/spiral-neon.h b/src/backend/viterbi_768/spiral-neon.h new file mode 100644 index 0000000..9d8369c --- /dev/null +++ b/src/backend/viterbi_768/spiral-neon.h @@ -0,0 +1,36 @@ +/*************************************************************** +This code was generated by Spiral 6.0 beta, www.spiral.net -- +Copyright (c) 2005-2008, Carnegie Mellon University. +All rights reserved. +The code is distributed under the GNU General Public License (GPL) +(see http://www.gnu.org/copyleft/gpl.html) + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +*AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************/ +#include + +#define K 7 +#define RATE 4 +#define POLYS { 109, 79, 83, 109 } +#define NUMSTATES 64 +#define FRAMEBITS 2048 +#define DECISIONTYPE unsigned int +#define DECISIONTYPE_BITSIZE 32 +#define COMPUTETYPE uint32_t +#define EBN0 3 +#define TRIALS 10000 +#define __int32 int +#define FUNC FULL_SPIRAL +#define METRICSHIFT 0 +#define PRECISIONSHIFT 0 +#define RENORMALIZE_THRESHOLD 2000000000 diff --git a/src/backend/viterbi_768/spiral-no-sse.c b/src/backend/viterbi_768/spiral-no-sse.c new file mode 100644 index 0000000..8b91f03 --- /dev/null +++ b/src/backend/viterbi_768/spiral-no-sse.c @@ -0,0 +1,1691 @@ +#if !defined(NEON_AVAILABLE) && !defined(NEON_AVAILABLE) +/*************************************************************** +This code was generated by Spiral 6.0 beta, www.spiral.net -- +Copyright (c) 2005-2008, Carnegie Mellon University. +All rights reserved. +The code is distributed under the GNU General Public License (GPL) +(see http://www.gnu.org/copyleft/gpl.html) + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +*AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************/ +#include "spiral-no-sse.h" + +void init_FULL_SPIRAL() { +} + +void FULL_SPIRAL_no_sse (int amount, unsigned int *Y, unsigned int *X, unsigned int *syms, unsigned int *dec, unsigned int *Branchtab) { +int i3; + for(i3 = 0; i3 < amount; i3++) { +// for(i3 = 0; i3 <= amount; i3++) { + int a2082, a2083, a2084, a2085, a2086, a2087, a2088 + , a2089, a2090, a2091, a2092, a2093, a2094, a2095, a2096 + , a2097, a2098, a2099, a2100, a2101, a2102, a2103, a2104 + , a2105, a2106, a2107, a2108, a2109, a2110, a2111, a2112 + , a2113, a2114, a2115, a2116, a2117, a2118, a2119, a2120 + , a2121, a2122, a2123, a2124, a2125, a2126, a2127, a2128 + , a2129, a2130, a2131, a2132, a2133, a2134, a2135, a2136 + , a2137, a2138, a2139, a2140, a2141, a2142, a2143, a2144 + , a2145, a2146, a2147, a2148, a2149, a2150, a2151, a2152 + , a2153, a2154, a2155, a2156, a2157, a2158, a2159, a2160 + , a2161, a2162, a2163, a2164, a2165, a2166, a2167, a2168 + , a2169, a2170, a2171, a2172, a2173, a2174, a2175, a2176 + , a2177, a2178, a2179, a2180, a2181, a2182, a2183, a2184 + , a2185, a2186, a2187, a2188, a2189, a2190, a2191, a2192 + , a2193, a2194, a2195, a2196, a2197, a2198, a2199, a2200 + , a2201, a2202, a2203, a2204, a2205, a2206, a2207, a2208 + , a2209, a2210, a2211, a2212, a2213, a2214, a2215, a2216 + , a2217, a2218, a2219, a2220, a2221, a2222, a2223, a2224 + , a2225, a2226, a2227, a2228, a2229, a2230, a2231, a2232 + , a2233, a2234, a2235, a2236, a2237, a2238, a2239, a2240 + , a2241, a2242, a2243, a2244, a2245, a2246, a2247, a2248 + , a2249, a2250, a2251, a2252, a2253, a2254, a2255, a2256 + , a2257, a2258, a2259, a2260, a2261, a2262, a2263, a2264 + , a2265, a2266, a2267, a2268, a2269, a2270, a2271, a2272 + , a2273, a2274, a2275, a2276, a2277, a2278, a2279, a2280 + , a2281, a2282, a2283, a2284, a2285, a2286, a2287, a2288 + , a2289, a2290, a2291, a2292, a2293, a2294, a2295, a2296 + , a2297, a2298, a2299, a2300, a2301, a2302, a2303, a2304 + , a2305, a2306, a2307, a2308, a2309, a2310, a2311, a2312 + , a2313, a2314, a2315, a2316, a2317, a2318, a2319, a2320 + , a2321, a2322, a2323, a2324, a2325, a2326, a2327, a2328 + , a2329, a2330, a2331, a2332, a2333, a2334, a2335, a2336 + , a2337, a2338, a2339, a2340, a2341, a2342, a2343, a2344 + , a2345, a2346, a2347, a2348, a2349, a2350, a2351, a2352 + , a2353, a2354, a2355, a2356, a2357, a2358, a2359, a2360 + , a2361, a2362, a2363, a2364, a2365, a2366, a2367, a2368 + , a2369, a2370, a2371, a2372, a2373, a2374, a2375, a2376 + , a2377, a2378, a2379, a2380, a2381, a2382, a2383, a2384 + , a2385, a2386, a2387, a2388, a2389, a2390, a2391, a2392 + , a2393, a2394, a2395, a2396, a2397, a2398, a2399, a2400 + , a2401, a2402, a2403, a2404, a2405, a2406, a2407, a2408 + , a2409, a2410, a2411, a2412, a2413, a2414, a2415, a2416 + , a2417, a2418, a2419, a2420, a2421, a2422, a2423, a2424 + , a2425, a2426, a2427, a2428, a2429, a2430, a2431, a2432 + , a2433, a2434, a2435, a2436, a2437, a2438, a2439, a2440 + , a2441, a2442, a2443, a2444, a2445, a2446, a2447, a2448 + , a2449, a2450, a2451, a2452, a2453, a2454, a2455, a2456 + , a2457, a2458, a2459, a2460, a2461, a2462, a2463, a2464 + , a2465, a2466, a2467, a2468, a2469, a2470, a2471, a2472 + , a2473, a2474, a2475, a2476, a2477, a2478, a2479, a2480 + , a2481, a2482, a2483, a2484, a2485, a2486, a2487, a2488 + , a2489, a2490, a2491, a2492, a2493, a2494, a2495, a2496 + , a2497, a2498, a2499, a2500, a2501, a2502, a2503, a2504 + , a2505, a2506, a2507, a2508, a2509, a2510, a2511, a2512 + , a2513, a2514, a2515, a2516, a2517, a2518, a2519, a2520 + , a2521, a2522, a2523, a2524, a2525, a2526, a2527, a2528 + , a2529, a2530, a2531, a2532, a2533, a2534, a2535, a2536 + , a2537, a2538, a2539, a2540, a2541, a2542, a2543, a2544 + , a2545, a2546, a2547, a2548, a2549, a2550, a2551; + unsigned int d133, d134, d135, d136, d137, d138, d139 + , d140, d141, d142, d143, d144, d145, d146, d147 + , d148, d149, d150, d151, d152, d153, d154, d155 + , d156, d157, d158, d159, d160, d161, d162, d163 + , d164, d165, d166, d167, d168, d169, d170, d171 + , d172, d173, d174, d175, d176, d177, d178, d179 + , d180, d181, d182, d183, d184, d185, d186, d187 + , d188, d189, d190, d191, d192, d193, d194, d195 + , d196, d197, d198, d199, d200, d201, d202, d203 + , d204, d205, d206, d207, d208, d209, d210, d211 + , d212, d213, d214, d215, d216, d217, d218, d219 + , d220, d221, d222, d223, d224, d225, d226, d227 + , d228, d229, d230, d231, d232, d233, d234, d235 + , d236, d237, d238, d239, d240, d241, d242, d243 + , d244, d245, d246, d247, d248, d249, d250, d251 + , d252, d253, d254, d255, d256, d257, d258, d259 + , d260, m265, m266, m267, m268, m269, m270, m271 + , m272, m273, m274, m275, m276, m277, m278, m279 + , m280, m281, m282, m283, m284, m285, m286, m287 + , m288, m289, m290, m291, m292, m293, m294, m295 + , m296, m297, m298, m299, m300, m301, m302, m303 + , m304, m305, m306, m307, m308, m309, m310, m311 + , m312, m313, m314, m315, m316, m317, m318, m319 + , m320, m321, m322, m323, m324, m325, m326, m327 + , m328, m329, m330, m331, m332, m333, m334, m335 + , m336, m337, m338, m339, m340, m341, m342, m343 + , m344, m345, m346, m347, m348, m349, m350, m351 + , m352, m353, m354, m355, m356, m357, m358, m359 + , m360, m361, m362, m363, m364, m365, m366, m367 + , m368, m369, m370, m371, m372, m373, m374, m375 + , m376, m377, m378, m379, m380, m381, m382, m383 + , m384, m385, m387, m388, m389, m390, m391, m392 + , m393, m394, m395, m396, m397, m398, m399, m400 + , m401, m402, m403, m404, m405, m406, m407, m408 + , m409, m410, m411, m412, m413, m414, m415, m416 + , m417, m418, m419, m420, m421, m422, m423, m424 + , m425, m426, m427, m428, m429, m430, m431, m432 + , m433, m434, m435, m436, m437, m438, m439, m440 + , m441, m442, m443, m444, m445, m446, m447, m448 + , m449, m450, m451, m452, m453, m454, m455, m456 + , m457, m458, m459, m460, m461, m462, m463, m464 + , m465, m466, m467, m468, m469, m470, m471, m472 + , m473, m474, m475, m476, m477, m478, m479, m480 + , m481, m482, m483, m484, m485, m486, m487, m488 + , m489, m490, m491, m492, m493, m494, m495, m496 + , m497, m498, m499, m500, m501, m502, m503, m504 + , m505, m506, m507, m508, m509, m510, m511, m512 + , m513, m514, m515, m516, m517, m518, m519, m520 + , m521, s130, s131, s132, s133, s134, s135, s136 + , s137, s138, s139, s140, s141, s142, s143, s144 + , s145, s146, s147, s148, s149, s150, s151, s152 + , s153, s154, s155, s156, s157, s158, s159, s160 + , s161, s162, s163, s164, s165, s166, s167, s168 + , s169, s170, s171, s172, s173, s174, s175, s176 + , s177, s178, s179, s180, s181, s182, s183, s184 + , s185, s186, s187, s188, s189, s190, s191, s192 + , s193, s194, s195, s196, s197, s198, s199, s200 + , s201, s202, s203, s204, s205, s206, s207, s208 + , s209, s210, s211, s212, s213, s214, s215, s216 + , s217, s218, s219, s220, s221, s222, s223, s224 + , s225, s226, s227, s228, s229, s230, s231, s232 + , s233, s234, s235, s236, s237, s238, s239, s240 + , s241, s242, s243, s244, s245, s246, s247, s248 + , s249, s250, s251, s252, s253, s254, s255, s256 + , s257, t325, t326, t327, t328, t329, t330, t331 + , t332, t333, t334, t335, t336, t337, t338, t339 + , t340, t341, t342, t343, t344, t345, t346, t347 + , t348, t349, t350, t351, t352, t353, t354, t355 + , t356, t357, t358, t359, t360, t361, t362, t363 + , t364, t365, t366, t367, t368, t369, t370, t371 + , t372, t373, t374, t375, t376, t377, t378, t379 + , t380, t381, t382, t383, t384, t385, t387, t388 + , t389, t390, t391, t392, t393, t394, t395, t396 + , t397, t398, t399, t400, t401, t402, t403, t404 + , t405, t406, t407, t408, t409, t410, t411, t412 + , t413, t414, t415, t416, t417, t418, t419, t420 + , t421, t422, t423, t424, t425, t426, t427, t428 + , t429, t430, t431, t432, t433, t434, t435, t436 + , t437, t438, t439, t440, t441, t442, t443, t444 + , t445, t446, t447, t448, t449, t450, t451, t452 + , t453, t454, t455, t456, t457, t458, t459, t460 + , t461, t462, t463, t464, t465, t466, t467, t468 + , t469, t470, t471, t472, t473, t474, t475, t476 + , t477, t478, t479, t480, t481, t482, t483, t484 + , t485, t486, t487, t488, t489, t490, t491, t492 + , t493, t494, t495, t496, t497, t498, t499, t500 + , t501, t502, t503, t504, t505, t506, t507, t508 + , t509, t510, t511, t512, t513, t514, t515, t516 + , t517, t518, t519, t520, t521, t522, t523, t524 + , t525, t526, t527, t528, t529, t530, t531, t532 + , t533, t534, t535, t536, t537, t538, t539, t540 + , t541, t542, t543, t544, t545, t546, t547, t548 + , t549, t550, t551, t552, t553, t554, t555, t556 + , t557, t558, t559, t560, t561, t562, t563, t564 + , t565, t566, t567, t568, t569, t570, t571, t572 + , t573, t574, t575, t576, t577, t578, t579, t580 + , t581, t582, t583, t584, t585, t586, t587, t588 + , t589, t590, t591, t592, t593, t594, t595, t596 + , t597, t598, t599, t600, t601, t602, t603, t604 + , t605, t606, t607, t608, t609, t610, t611, t612 + , t613, t614, t615, t616, t617, t618, t619, t620 + , t621, t622, t623, t624, t625, t626, t627, t628 + , t629, t630, t631, t632, t633, t634, t635, t636 + , t637, t638, t639, t640, t641, t642, t643, t644 + , t645; + a2082 = (8*i3); + a2083 = syms[a2082]; + t325 = ((a2083)^(Branchtab[0])); + a2084 = (1 + a2082); + a2085 = syms[a2084]; + a2086 = ((a2085)^(Branchtab[32])); + t326 = (t325 + a2086); + a2087 = (2 + a2082); + a2088 = syms[a2087]; + a2089 = ((a2088)^(Branchtab[64])); + t327 = (t326 + a2089); + a2090 = (3 + a2082); + a2091 = syms[a2090]; + a2092 = ((a2091)^(Branchtab[96])); + t328 = (t327 + a2092); + t329 = (1020 - t328); + m265 = (X[0] + t328); + m266 = (X[32] + t329); + m267 = (X[0] + t329); + m268 = (X[32] + t328); + d133 = ((m265 > m266)); + d134 = ((m267 > m268)); + s130 = ((d133) ? (m266) : (m265)); + s131 = ((d134) ? (m268) : (m267)); + a2093 = (2*i3); + a2094 = ((a2093) << (1)); + a2095 = dec[a2094]; + a2096 = ((d134) << (1)); + a2097 = ((d133)|(a2096)); + a2098 = ((a2097) << (0)); + dec[a2094] = ((a2095)|(a2098)); + Y[0] = s130; + Y[1] = s131; + t330 = ((a2083)^(Branchtab[1])); + a2099 = ((a2085)^(Branchtab[33])); + t331 = (t330 + a2099); + a2100 = ((a2088)^(Branchtab[65])); + t332 = (t331 + a2100); + a2101 = ((a2091)^(Branchtab[97])); + t333 = (t332 + a2101); + t334 = (1020 - t333); + m269 = (X[1] + t333); + m270 = (X[33] + t334); + m271 = (X[1] + t334); + m272 = (X[33] + t333); + d135 = ((m269 > m270)); + d136 = ((m271 > m272)); + s132 = ((d135) ? (m270) : (m269)); + s133 = ((d136) ? (m272) : (m271)); + a2102 = dec[a2094]; + a2103 = ((d136) << (1)); + a2104 = ((d135)|(a2103)); + a2105 = ((a2104) << (2)); + dec[a2094] = ((a2102)|(a2105)); + Y[2] = s132; + Y[3] = s133; + t335 = ((a2083)^(Branchtab[2])); + a2106 = ((a2085)^(Branchtab[34])); + t336 = (t335 + a2106); + a2107 = ((a2088)^(Branchtab[66])); + t337 = (t336 + a2107); + a2108 = ((a2091)^(Branchtab[98])); + t338 = (t337 + a2108); + t339 = (1020 - t338); + m273 = (X[2] + t338); + m274 = (X[34] + t339); + m275 = (X[2] + t339); + m276 = (X[34] + t338); + d137 = ((m273 > m274)); + d138 = ((m275 > m276)); + s134 = ((d137) ? (m274) : (m273)); + s135 = ((d138) ? (m276) : (m275)); + a2109 = dec[a2094]; + a2110 = ((d138) << (1)); + a2111 = ((d137)|(a2110)); + a2112 = ((a2111) << (4)); + dec[a2094] = ((a2109)|(a2112)); + Y[4] = s134; + Y[5] = s135; + t340 = ((a2083)^(Branchtab[3])); + a2113 = ((a2085)^(Branchtab[35])); + t341 = (t340 + a2113); + a2114 = ((a2088)^(Branchtab[67])); + t342 = (t341 + a2114); + a2115 = ((a2091)^(Branchtab[99])); + t343 = (t342 + a2115); + t344 = (1020 - t343); + m277 = (X[3] + t343); + m278 = (X[35] + t344); + m279 = (X[3] + t344); + m280 = (X[35] + t343); + d139 = ((m277 > m278)); + d140 = ((m279 > m280)); + s136 = ((d139) ? (m278) : (m277)); + s137 = ((d140) ? (m280) : (m279)); + a2116 = dec[a2094]; + a2117 = ((d140) << (1)); + a2118 = ((d139)|(a2117)); + a2119 = ((a2118) << (6)); + dec[a2094] = ((a2116)|(a2119)); + Y[6] = s136; + Y[7] = s137; + t345 = ((a2083)^(Branchtab[4])); + a2120 = ((a2085)^(Branchtab[36])); + t346 = (t345 + a2120); + a2121 = ((a2088)^(Branchtab[68])); + t347 = (t346 + a2121); + a2122 = ((a2091)^(Branchtab[100])); + t348 = (t347 + a2122); + t349 = (1020 - t348); + m281 = (X[4] + t348); + m282 = (X[36] + t349); + m283 = (X[4] + t349); + m284 = (X[36] + t348); + d141 = ((m281 > m282)); + d142 = ((m283 > m284)); + s138 = ((d141) ? (m282) : (m281)); + s139 = ((d142) ? (m284) : (m283)); + a2123 = dec[a2094]; + a2124 = ((d142) << (1)); + a2125 = ((d141)|(a2124)); + a2126 = ((a2125) << (8)); + dec[a2094] = ((a2123)|(a2126)); + Y[8] = s138; + Y[9] = s139; + t350 = ((a2083)^(Branchtab[5])); + a2127 = ((a2085)^(Branchtab[37])); + t351 = (t350 + a2127); + a2128 = ((a2088)^(Branchtab[69])); + t352 = (t351 + a2128); + a2129 = ((a2091)^(Branchtab[101])); + t353 = (t352 + a2129); + t354 = (1020 - t353); + m285 = (X[5] + t353); + m286 = (X[37] + t354); + m287 = (X[5] + t354); + m288 = (X[37] + t353); + d143 = ((m285 > m286)); + d144 = ((m287 > m288)); + s140 = ((d143) ? (m286) : (m285)); + s141 = ((d144) ? (m288) : (m287)); + a2130 = dec[a2094]; + a2131 = ((d144) << (1)); + a2132 = ((d143)|(a2131)); + a2133 = ((a2132) << (10)); + dec[a2094] = ((a2130)|(a2133)); + Y[10] = s140; + Y[11] = s141; + t355 = ((a2083)^(Branchtab[6])); + a2134 = ((a2085)^(Branchtab[38])); + t356 = (t355 + a2134); + a2135 = ((a2088)^(Branchtab[70])); + t357 = (t356 + a2135); + a2136 = ((a2091)^(Branchtab[102])); + t358 = (t357 + a2136); + t359 = (1020 - t358); + m289 = (X[6] + t358); + m290 = (X[38] + t359); + m291 = (X[6] + t359); + m292 = (X[38] + t358); + d145 = ((m289 > m290)); + d146 = ((m291 > m292)); + s142 = ((d145) ? (m290) : (m289)); + s143 = ((d146) ? (m292) : (m291)); + a2137 = dec[a2094]; + a2138 = ((d146) << (1)); + a2139 = ((d145)|(a2138)); + a2140 = ((a2139) << (12)); + dec[a2094] = ((a2137)|(a2140)); + Y[12] = s142; + Y[13] = s143; + t360 = ((a2083)^(Branchtab[7])); + a2141 = ((a2085)^(Branchtab[39])); + t361 = (t360 + a2141); + a2142 = ((a2088)^(Branchtab[71])); + t362 = (t361 + a2142); + a2143 = ((a2091)^(Branchtab[103])); + t363 = (t362 + a2143); + t364 = (1020 - t363); + m293 = (X[7] + t363); + m294 = (X[39] + t364); + m295 = (X[7] + t364); + m296 = (X[39] + t363); + d147 = ((m293 > m294)); + d148 = ((m295 > m296)); + s144 = ((d147) ? (m294) : (m293)); + s145 = ((d148) ? (m296) : (m295)); + a2144 = dec[a2094]; + a2145 = ((d148) << (1)); + a2146 = ((d147)|(a2145)); + a2147 = ((a2146) << (14)); + dec[a2094] = ((a2144)|(a2147)); + Y[14] = s144; + Y[15] = s145; + t365 = ((a2083)^(Branchtab[8])); + a2148 = ((a2085)^(Branchtab[40])); + t366 = (t365 + a2148); + a2149 = ((a2088)^(Branchtab[72])); + t367 = (t366 + a2149); + a2150 = ((a2091)^(Branchtab[104])); + t368 = (t367 + a2150); + t369 = (1020 - t368); + m297 = (X[8] + t368); + m298 = (X[40] + t369); + m299 = (X[8] + t369); + m300 = (X[40] + t368); + d149 = ((m297 > m298)); + d150 = ((m299 > m300)); + s146 = ((d149) ? (m298) : (m297)); + s147 = ((d150) ? (m300) : (m299)); + a2151 = dec[a2094]; + a2152 = ((d150) << (1)); + a2153 = ((d149)|(a2152)); + a2154 = ((a2153) << (16)); + dec[a2094] = ((a2151)|(a2154)); + Y[16] = s146; + Y[17] = s147; + t370 = ((a2083)^(Branchtab[9])); + a2155 = ((a2085)^(Branchtab[41])); + t371 = (t370 + a2155); + a2156 = ((a2088)^(Branchtab[73])); + t372 = (t371 + a2156); + a2157 = ((a2091)^(Branchtab[105])); + t373 = (t372 + a2157); + t374 = (1020 - t373); + m301 = (X[9] + t373); + m302 = (X[41] + t374); + m303 = (X[9] + t374); + m304 = (X[41] + t373); + d151 = ((m301 > m302)); + d152 = ((m303 > m304)); + s148 = ((d151) ? (m302) : (m301)); + s149 = ((d152) ? (m304) : (m303)); + a2158 = dec[a2094]; + a2159 = ((d152) << (1)); + a2160 = ((d151)|(a2159)); + a2161 = ((a2160) << (18)); + dec[a2094] = ((a2158)|(a2161)); + Y[18] = s148; + Y[19] = s149; + t375 = ((a2083)^(Branchtab[10])); + a2162 = ((a2085)^(Branchtab[42])); + t376 = (t375 + a2162); + a2163 = ((a2088)^(Branchtab[74])); + t377 = (t376 + a2163); + a2164 = ((a2091)^(Branchtab[106])); + t378 = (t377 + a2164); + t379 = (1020 - t378); + m305 = (X[10] + t378); + m306 = (X[42] + t379); + m307 = (X[10] + t379); + m308 = (X[42] + t378); + d153 = ((m305 > m306)); + d154 = ((m307 > m308)); + s150 = ((d153) ? (m306) : (m305)); + s151 = ((d154) ? (m308) : (m307)); + a2165 = dec[a2094]; + a2166 = ((d154) << (1)); + a2167 = ((d153)|(a2166)); + a2168 = ((a2167) << (20)); + dec[a2094] = ((a2165)|(a2168)); + Y[20] = s150; + Y[21] = s151; + t380 = ((a2083)^(Branchtab[11])); + a2169 = ((a2085)^(Branchtab[43])); + t381 = (t380 + a2169); + a2170 = ((a2088)^(Branchtab[75])); + t382 = (t381 + a2170); + a2171 = ((a2091)^(Branchtab[107])); + t383 = (t382 + a2171); + t384 = (1020 - t383); + m309 = (X[11] + t383); + m310 = (X[43] + t384); + m311 = (X[11] + t384); + m312 = (X[43] + t383); + d155 = ((m309 > m310)); + d156 = ((m311 > m312)); + s152 = ((d155) ? (m310) : (m309)); + s153 = ((d156) ? (m312) : (m311)); + a2172 = dec[a2094]; + a2173 = ((d156) << (1)); + a2174 = ((d155)|(a2173)); + a2175 = ((a2174) << (22)); + dec[a2094] = ((a2172)|(a2175)); + Y[22] = s152; + Y[23] = s153; + t385 = ((a2083)^(Branchtab[12])); + a2176 = ((a2085)^(Branchtab[44])); + t387 = (t385 + a2176); + a2177 = ((a2088)^(Branchtab[76])); + t388 = (t387 + a2177); + a2178 = ((a2091)^(Branchtab[108])); + t389 = (t388 + a2178); + t390 = (1020 - t389); + m313 = (X[12] + t389); + m314 = (X[44] + t390); + m315 = (X[12] + t390); + m316 = (X[44] + t389); + d157 = ((m313 > m314)); + d158 = ((m315 > m316)); + s154 = ((d157) ? (m314) : (m313)); + s155 = ((d158) ? (m316) : (m315)); + a2179 = dec[a2094]; + a2180 = ((d158) << (1)); + a2181 = ((d157)|(a2180)); + a2182 = ((a2181) << (24)); + dec[a2094] = ((a2179)|(a2182)); + Y[24] = s154; + Y[25] = s155; + t391 = ((a2083)^(Branchtab[13])); + a2183 = ((a2085)^(Branchtab[45])); + t392 = (t391 + a2183); + a2184 = ((a2088)^(Branchtab[77])); + t393 = (t392 + a2184); + a2185 = ((a2091)^(Branchtab[109])); + t394 = (t393 + a2185); + t395 = (1020 - t394); + m317 = (X[13] + t394); + m318 = (X[45] + t395); + m319 = (X[13] + t395); + m320 = (X[45] + t394); + d159 = ((m317 > m318)); + d160 = ((m319 > m320)); + s156 = ((d159) ? (m318) : (m317)); + s157 = ((d160) ? (m320) : (m319)); + a2186 = dec[a2094]; + a2187 = ((d160) << (1)); + a2188 = ((d159)|(a2187)); + a2189 = ((a2188) << (26)); + dec[a2094] = ((a2186)|(a2189)); + Y[26] = s156; + Y[27] = s157; + t396 = ((a2083)^(Branchtab[14])); + a2190 = ((a2085)^(Branchtab[46])); + t397 = (t396 + a2190); + a2191 = ((a2088)^(Branchtab[78])); + t398 = (t397 + a2191); + a2192 = ((a2091)^(Branchtab[110])); + t399 = (t398 + a2192); + t400 = (1020 - t399); + m321 = (X[14] + t399); + m322 = (X[46] + t400); + m323 = (X[14] + t400); + m324 = (X[46] + t399); + d161 = ((m321 > m322)); + d162 = ((m323 > m324)); + s158 = ((d161) ? (m322) : (m321)); + s159 = ((d162) ? (m324) : (m323)); + a2193 = dec[a2094]; + a2194 = ((d162) << (1)); + a2195 = ((d161)|(a2194)); + a2196 = ((a2195) << (28)); + dec[a2094] = ((a2193)|(a2196)); + Y[28] = s158; + Y[29] = s159; + t401 = ((a2083)^(Branchtab[15])); + a2197 = ((a2085)^(Branchtab[47])); + t402 = (t401 + a2197); + a2198 = ((a2088)^(Branchtab[79])); + t403 = (t402 + a2198); + a2199 = ((a2091)^(Branchtab[111])); + t404 = (t403 + a2199); + t405 = (1020 - t404); + m325 = (X[15] + t404); + m326 = (X[47] + t405); + m327 = (X[15] + t405); + m328 = (X[47] + t404); + d163 = ((m325 > m326)); + d164 = ((m327 > m328)); + s160 = ((d163) ? (m326) : (m325)); + s161 = ((d164) ? (m328) : (m327)); + a2200 = dec[a2094]; + a2201 = ((d164) << (1)); + a2202 = ((d163)|(a2201)); + a2203 = ((a2202) << (30)); + dec[a2094] = ((a2200)|(a2203)); + Y[30] = s160; + Y[31] = s161; + t406 = ((a2083)^(Branchtab[16])); + a2204 = ((a2085)^(Branchtab[48])); + t407 = (t406 + a2204); + a2205 = ((a2088)^(Branchtab[80])); + t408 = (t407 + a2205); + a2206 = ((a2091)^(Branchtab[112])); + t409 = (t408 + a2206); + t410 = (1020 - t409); + m329 = (X[16] + t409); + m330 = (X[48] + t410); + m331 = (X[16] + t410); + m332 = (X[48] + t409); + d165 = ((m329 > m330)); + d166 = ((m331 > m332)); + s162 = ((d165) ? (m330) : (m329)); + s163 = ((d166) ? (m332) : (m331)); + a2207 = (1 + a2094); + a2208 = dec[a2207]; + a2209 = ((d166) << (1)); + a2210 = ((d165)|(a2209)); + a2211 = ((a2210) << (0)); + dec[a2207] = ((a2208)|(a2211)); + Y[32] = s162; + Y[33] = s163; + t411 = ((a2083)^(Branchtab[17])); + a2212 = ((a2085)^(Branchtab[49])); + t412 = (t411 + a2212); + a2213 = ((a2088)^(Branchtab[81])); + t413 = (t412 + a2213); + a2214 = ((a2091)^(Branchtab[113])); + t414 = (t413 + a2214); + t415 = (1020 - t414); + m333 = (X[17] + t414); + m334 = (X[49] + t415); + m335 = (X[17] + t415); + m336 = (X[49] + t414); + d167 = ((m333 > m334)); + d168 = ((m335 > m336)); + s164 = ((d167) ? (m334) : (m333)); + s165 = ((d168) ? (m336) : (m335)); + a2215 = dec[a2207]; + a2216 = ((d168) << (1)); + a2217 = ((d167)|(a2216)); + a2218 = ((a2217) << (2)); + dec[a2207] = ((a2215)|(a2218)); + Y[34] = s164; + Y[35] = s165; + t416 = ((a2083)^(Branchtab[18])); + a2219 = ((a2085)^(Branchtab[50])); + t417 = (t416 + a2219); + a2220 = ((a2088)^(Branchtab[82])); + t418 = (t417 + a2220); + a2221 = ((a2091)^(Branchtab[114])); + t419 = (t418 + a2221); + t420 = (1020 - t419); + m337 = (X[18] + t419); + m338 = (X[50] + t420); + m339 = (X[18] + t420); + m340 = (X[50] + t419); + d169 = ((m337 > m338)); + d170 = ((m339 > m340)); + s166 = ((d169) ? (m338) : (m337)); + s167 = ((d170) ? (m340) : (m339)); + a2222 = dec[a2207]; + a2223 = ((d170) << (1)); + a2224 = ((d169)|(a2223)); + a2225 = ((a2224) << (4)); + dec[a2207] = ((a2222)|(a2225)); + Y[36] = s166; + Y[37] = s167; + t421 = ((a2083)^(Branchtab[19])); + a2226 = ((a2085)^(Branchtab[51])); + t422 = (t421 + a2226); + a2227 = ((a2088)^(Branchtab[83])); + t423 = (t422 + a2227); + a2228 = ((a2091)^(Branchtab[115])); + t424 = (t423 + a2228); + t425 = (1020 - t424); + m341 = (X[19] + t424); + m342 = (X[51] + t425); + m343 = (X[19] + t425); + m344 = (X[51] + t424); + d171 = ((m341 > m342)); + d172 = ((m343 > m344)); + s168 = ((d171) ? (m342) : (m341)); + s169 = ((d172) ? (m344) : (m343)); + a2229 = dec[a2207]; + a2230 = ((d172) << (1)); + a2231 = ((d171)|(a2230)); + a2232 = ((a2231) << (6)); + dec[a2207] = ((a2229)|(a2232)); + Y[38] = s168; + Y[39] = s169; + t426 = ((a2083)^(Branchtab[20])); + a2233 = ((a2085)^(Branchtab[52])); + t427 = (t426 + a2233); + a2234 = ((a2088)^(Branchtab[84])); + t428 = (t427 + a2234); + a2235 = ((a2091)^(Branchtab[116])); + t429 = (t428 + a2235); + t430 = (1020 - t429); + m345 = (X[20] + t429); + m346 = (X[52] + t430); + m347 = (X[20] + t430); + m348 = (X[52] + t429); + d173 = ((m345 > m346)); + d174 = ((m347 > m348)); + s170 = ((d173) ? (m346) : (m345)); + s171 = ((d174) ? (m348) : (m347)); + a2236 = dec[a2207]; + a2237 = ((d174) << (1)); + a2238 = ((d173)|(a2237)); + a2239 = ((a2238) << (8)); + dec[a2207] = ((a2236)|(a2239)); + Y[40] = s170; + Y[41] = s171; + t431 = ((a2083)^(Branchtab[21])); + a2240 = ((a2085)^(Branchtab[53])); + t432 = (t431 + a2240); + a2241 = ((a2088)^(Branchtab[85])); + t433 = (t432 + a2241); + a2242 = ((a2091)^(Branchtab[117])); + t434 = (t433 + a2242); + t435 = (1020 - t434); + m349 = (X[21] + t434); + m350 = (X[53] + t435); + m351 = (X[21] + t435); + m352 = (X[53] + t434); + d175 = ((m349 > m350)); + d176 = ((m351 > m352)); + s172 = ((d175) ? (m350) : (m349)); + s173 = ((d176) ? (m352) : (m351)); + a2243 = dec[a2207]; + a2244 = ((d176) << (1)); + a2245 = ((d175)|(a2244)); + a2246 = ((a2245) << (10)); + dec[a2207] = ((a2243)|(a2246)); + Y[42] = s172; + Y[43] = s173; + t436 = ((a2083)^(Branchtab[22])); + a2247 = ((a2085)^(Branchtab[54])); + t437 = (t436 + a2247); + a2248 = ((a2088)^(Branchtab[86])); + t438 = (t437 + a2248); + a2249 = ((a2091)^(Branchtab[118])); + t439 = (t438 + a2249); + t440 = (1020 - t439); + m353 = (X[22] + t439); + m354 = (X[54] + t440); + m355 = (X[22] + t440); + m356 = (X[54] + t439); + d177 = ((m353 > m354)); + d178 = ((m355 > m356)); + s174 = ((d177) ? (m354) : (m353)); + s175 = ((d178) ? (m356) : (m355)); + a2250 = dec[a2207]; + a2251 = ((d178) << (1)); + a2252 = ((d177)|(a2251)); + a2253 = ((a2252) << (12)); + dec[a2207] = ((a2250)|(a2253)); + Y[44] = s174; + Y[45] = s175; + t441 = ((a2083)^(Branchtab[23])); + a2254 = ((a2085)^(Branchtab[55])); + t442 = (t441 + a2254); + a2255 = ((a2088)^(Branchtab[87])); + t443 = (t442 + a2255); + a2256 = ((a2091)^(Branchtab[119])); + t444 = (t443 + a2256); + t445 = (1020 - t444); + m357 = (X[23] + t444); + m358 = (X[55] + t445); + m359 = (X[23] + t445); + m360 = (X[55] + t444); + d179 = ((m357 > m358)); + d180 = ((m359 > m360)); + s176 = ((d179) ? (m358) : (m357)); + s177 = ((d180) ? (m360) : (m359)); + a2257 = dec[a2207]; + a2258 = ((d180) << (1)); + a2259 = ((d179)|(a2258)); + a2260 = ((a2259) << (14)); + dec[a2207] = ((a2257)|(a2260)); + Y[46] = s176; + Y[47] = s177; + t446 = ((a2083)^(Branchtab[24])); + a2261 = ((a2085)^(Branchtab[56])); + t447 = (t446 + a2261); + a2262 = ((a2088)^(Branchtab[88])); + t448 = (t447 + a2262); + a2263 = ((a2091)^(Branchtab[120])); + t449 = (t448 + a2263); + t450 = (1020 - t449); + m361 = (X[24] + t449); + m362 = (X[56] + t450); + m363 = (X[24] + t450); + m364 = (X[56] + t449); + d181 = ((m361 > m362)); + d182 = ((m363 > m364)); + s178 = ((d181) ? (m362) : (m361)); + s179 = ((d182) ? (m364) : (m363)); + a2264 = dec[a2207]; + a2265 = ((d182) << (1)); + a2266 = ((d181)|(a2265)); + a2267 = ((a2266) << (16)); + dec[a2207] = ((a2264)|(a2267)); + Y[48] = s178; + Y[49] = s179; + t451 = ((a2083)^(Branchtab[25])); + a2268 = ((a2085)^(Branchtab[57])); + t452 = (t451 + a2268); + a2269 = ((a2088)^(Branchtab[89])); + t453 = (t452 + a2269); + a2270 = ((a2091)^(Branchtab[121])); + t454 = (t453 + a2270); + t455 = (1020 - t454); + m365 = (X[25] + t454); + m366 = (X[57] + t455); + m367 = (X[25] + t455); + m368 = (X[57] + t454); + d183 = ((m365 > m366)); + d184 = ((m367 > m368)); + s180 = ((d183) ? (m366) : (m365)); + s181 = ((d184) ? (m368) : (m367)); + a2271 = dec[a2207]; + a2272 = ((d184) << (1)); + a2273 = ((d183)|(a2272)); + a2274 = ((a2273) << (18)); + dec[a2207] = ((a2271)|(a2274)); + Y[50] = s180; + Y[51] = s181; + t456 = ((a2083)^(Branchtab[26])); + a2275 = ((a2085)^(Branchtab[58])); + t457 = (t456 + a2275); + a2276 = ((a2088)^(Branchtab[90])); + t458 = (t457 + a2276); + a2277 = ((a2091)^(Branchtab[122])); + t459 = (t458 + a2277); + t460 = (1020 - t459); + m369 = (X[26] + t459); + m370 = (X[58] + t460); + m371 = (X[26] + t460); + m372 = (X[58] + t459); + d185 = ((m369 > m370)); + d186 = ((m371 > m372)); + s182 = ((d185) ? (m370) : (m369)); + s183 = ((d186) ? (m372) : (m371)); + a2278 = dec[a2207]; + a2279 = ((d186) << (1)); + a2280 = ((d185)|(a2279)); + a2281 = ((a2280) << (20)); + dec[a2207] = ((a2278)|(a2281)); + Y[52] = s182; + Y[53] = s183; + t461 = ((a2083)^(Branchtab[27])); + a2282 = ((a2085)^(Branchtab[59])); + t462 = (t461 + a2282); + a2283 = ((a2088)^(Branchtab[91])); + t463 = (t462 + a2283); + a2284 = ((a2091)^(Branchtab[123])); + t464 = (t463 + a2284); + t465 = (1020 - t464); + m373 = (X[27] + t464); + m374 = (X[59] + t465); + m375 = (X[27] + t465); + m376 = (X[59] + t464); + d187 = ((m373 > m374)); + d188 = ((m375 > m376)); + s184 = ((d187) ? (m374) : (m373)); + s185 = ((d188) ? (m376) : (m375)); + a2285 = dec[a2207]; + a2286 = ((d188) << (1)); + a2287 = ((d187)|(a2286)); + a2288 = ((a2287) << (22)); + dec[a2207] = ((a2285)|(a2288)); + Y[54] = s184; + Y[55] = s185; + t466 = ((a2083)^(Branchtab[28])); + a2289 = ((a2085)^(Branchtab[60])); + t467 = (t466 + a2289); + a2290 = ((a2088)^(Branchtab[92])); + t468 = (t467 + a2290); + a2291 = ((a2091)^(Branchtab[124])); + t469 = (t468 + a2291); + t470 = (1020 - t469); + m377 = (X[28] + t469); + m378 = (X[60] + t470); + m379 = (X[28] + t470); + m380 = (X[60] + t469); + d189 = ((m377 > m378)); + d190 = ((m379 > m380)); + s186 = ((d189) ? (m378) : (m377)); + s187 = ((d190) ? (m380) : (m379)); + a2292 = dec[a2207]; + a2293 = ((d190) << (1)); + a2294 = ((d189)|(a2293)); + a2295 = ((a2294) << (24)); + dec[a2207] = ((a2292)|(a2295)); + Y[56] = s186; + Y[57] = s187; + t471 = ((a2083)^(Branchtab[29])); + a2296 = ((a2085)^(Branchtab[61])); + t472 = (t471 + a2296); + a2297 = ((a2088)^(Branchtab[93])); + t473 = (t472 + a2297); + a2298 = ((a2091)^(Branchtab[125])); + t474 = (t473 + a2298); + t475 = (1020 - t474); + m381 = (X[29] + t474); + m382 = (X[61] + t475); + m383 = (X[29] + t475); + m384 = (X[61] + t474); + d191 = ((m381 > m382)); + d192 = ((m383 > m384)); + s188 = ((d191) ? (m382) : (m381)); + s189 = ((d192) ? (m384) : (m383)); + a2299 = dec[a2207]; + a2300 = ((d192) << (1)); + a2301 = ((d191)|(a2300)); + a2302 = ((a2301) << (26)); + dec[a2207] = ((a2299)|(a2302)); + Y[58] = s188; + Y[59] = s189; + t476 = ((a2083)^(Branchtab[30])); + a2303 = ((a2085)^(Branchtab[62])); + t477 = (t476 + a2303); + a2304 = ((a2088)^(Branchtab[94])); + t478 = (t477 + a2304); + a2305 = ((a2091)^(Branchtab[126])); + t479 = (t478 + a2305); + t480 = (1020 - t479); + m385 = (X[30] + t479); + m387 = (X[62] + t480); + m388 = (X[30] + t480); + m389 = (X[62] + t479); + d193 = ((m385 > m387)); + d194 = ((m388 > m389)); + s190 = ((d193) ? (m387) : (m385)); + s191 = ((d194) ? (m389) : (m388)); + a2306 = dec[a2207]; + a2307 = ((d194) << (1)); + a2308 = ((d193)|(a2307)); + a2309 = ((a2308) << (28)); + dec[a2207] = ((a2306)|(a2309)); + Y[60] = s190; + Y[61] = s191; + t481 = ((a2083)^(Branchtab[31])); + a2310 = ((a2085)^(Branchtab[63])); + t482 = (t481 + a2310); + a2311 = ((a2088)^(Branchtab[95])); + t483 = (t482 + a2311); + a2312 = ((a2091)^(Branchtab[127])); + t484 = (t483 + a2312); + t485 = (1020 - t484); + m390 = (X[31] + t484); + m391 = (X[63] + t485); + m392 = (X[31] + t485); + m393 = (X[63] + t484); + d195 = ((m390 > m391)); + d196 = ((m392 > m393)); + s192 = ((d195) ? (m391) : (m390)); + s193 = ((d196) ? (m393) : (m392)); + a2313 = dec[a2207]; + a2314 = ((d196) << (1)); + a2315 = ((d195)|(a2314)); + a2316 = ((a2315) << (30)); + dec[a2207] = ((a2313)|(a2316)); + Y[62] = s192; + Y[63] = s193; + a2317 = (4 + a2082); + a2318 = syms[a2317]; + t486 = ((a2318)^(Branchtab[0])); + a2319 = (5 + a2082); + a2320 = syms[a2319]; + a2321 = ((a2320)^(Branchtab[32])); + t487 = (t486 + a2321); + a2322 = (6 + a2082); + a2323 = syms[a2322]; + a2324 = ((a2323)^(Branchtab[64])); + t488 = (t487 + a2324); + a2325 = (7 + a2082); + a2326 = syms[a2325]; + a2327 = ((a2326)^(Branchtab[96])); + t489 = (t488 + a2327); + t490 = (1020 - t489); + m394 = (Y[0] + t489); + m395 = (Y[32] + t490); + m396 = (Y[0] + t490); + m397 = (Y[32] + t489); + d197 = ((m394 > m395)); + d198 = ((m396 > m397)); + s194 = ((d197) ? (m395) : (m394)); + s195 = ((d198) ? (m397) : (m396)); + a2328 = (1 + a2093); + a2329 = ((a2328) << (1)); + a2330 = dec[a2329]; + a2331 = ((d198) << (1)); + a2332 = ((d197)|(a2331)); + a2333 = ((a2332) << (0)); + dec[a2329] = ((a2330)|(a2333)); + X[0] = s194; + X[1] = s195; + t491 = ((a2318)^(Branchtab[1])); + a2334 = ((a2320)^(Branchtab[33])); + t492 = (t491 + a2334); + a2335 = ((a2323)^(Branchtab[65])); + t493 = (t492 + a2335); + a2336 = ((a2326)^(Branchtab[97])); + t494 = (t493 + a2336); + t495 = (1020 - t494); + m398 = (Y[1] + t494); + m399 = (Y[33] + t495); + m400 = (Y[1] + t495); + m401 = (Y[33] + t494); + d199 = ((m398 > m399)); + d200 = ((m400 > m401)); + s196 = ((d199) ? (m399) : (m398)); + s197 = ((d200) ? (m401) : (m400)); + a2337 = dec[a2329]; + a2338 = ((d200) << (1)); + a2339 = ((d199)|(a2338)); + a2340 = ((a2339) << (2)); + dec[a2329] = ((a2337)|(a2340)); + X[2] = s196; + X[3] = s197; + t496 = ((a2318)^(Branchtab[2])); + a2341 = ((a2320)^(Branchtab[34])); + t497 = (t496 + a2341); + a2342 = ((a2323)^(Branchtab[66])); + t498 = (t497 + a2342); + a2343 = ((a2326)^(Branchtab[98])); + t499 = (t498 + a2343); + t500 = (1020 - t499); + m402 = (Y[2] + t499); + m403 = (Y[34] + t500); + m404 = (Y[2] + t500); + m405 = (Y[34] + t499); + d201 = ((m402 > m403)); + d202 = ((m404 > m405)); + s198 = ((d201) ? (m403) : (m402)); + s199 = ((d202) ? (m405) : (m404)); + a2344 = dec[a2329]; + a2345 = ((d202) << (1)); + a2346 = ((d201)|(a2345)); + a2347 = ((a2346) << (4)); + dec[a2329] = ((a2344)|(a2347)); + X[4] = s198; + X[5] = s199; + t501 = ((a2318)^(Branchtab[3])); + a2348 = ((a2320)^(Branchtab[35])); + t502 = (t501 + a2348); + a2349 = ((a2323)^(Branchtab[67])); + t503 = (t502 + a2349); + a2350 = ((a2326)^(Branchtab[99])); + t504 = (t503 + a2350); + t505 = (1020 - t504); + m406 = (Y[3] + t504); + m407 = (Y[35] + t505); + m408 = (Y[3] + t505); + m409 = (Y[35] + t504); + d203 = ((m406 > m407)); + d204 = ((m408 > m409)); + s200 = ((d203) ? (m407) : (m406)); + s201 = ((d204) ? (m409) : (m408)); + a2351 = dec[a2329]; + a2352 = ((d204) << (1)); + a2353 = ((d203)|(a2352)); + a2354 = ((a2353) << (6)); + dec[a2329] = ((a2351)|(a2354)); + X[6] = s200; + X[7] = s201; + t506 = ((a2318)^(Branchtab[4])); + a2355 = ((a2320)^(Branchtab[36])); + t507 = (t506 + a2355); + a2356 = ((a2323)^(Branchtab[68])); + t508 = (t507 + a2356); + a2357 = ((a2326)^(Branchtab[100])); + t509 = (t508 + a2357); + t510 = (1020 - t509); + m410 = (Y[4] + t509); + m411 = (Y[36] + t510); + m412 = (Y[4] + t510); + m413 = (Y[36] + t509); + d205 = ((m410 > m411)); + d206 = ((m412 > m413)); + s202 = ((d205) ? (m411) : (m410)); + s203 = ((d206) ? (m413) : (m412)); + a2358 = dec[a2329]; + a2359 = ((d206) << (1)); + a2360 = ((d205)|(a2359)); + a2361 = ((a2360) << (8)); + dec[a2329] = ((a2358)|(a2361)); + X[8] = s202; + X[9] = s203; + t511 = ((a2318)^(Branchtab[5])); + a2362 = ((a2320)^(Branchtab[37])); + t512 = (t511 + a2362); + a2363 = ((a2323)^(Branchtab[69])); + t513 = (t512 + a2363); + a2364 = ((a2326)^(Branchtab[101])); + t514 = (t513 + a2364); + t515 = (1020 - t514); + m414 = (Y[5] + t514); + m415 = (Y[37] + t515); + m416 = (Y[5] + t515); + m417 = (Y[37] + t514); + d207 = ((m414 > m415)); + d208 = ((m416 > m417)); + s204 = ((d207) ? (m415) : (m414)); + s205 = ((d208) ? (m417) : (m416)); + a2365 = dec[a2329]; + a2366 = ((d208) << (1)); + a2367 = ((d207)|(a2366)); + a2368 = ((a2367) << (10)); + dec[a2329] = ((a2365)|(a2368)); + X[10] = s204; + X[11] = s205; + t516 = ((a2318)^(Branchtab[6])); + a2369 = ((a2320)^(Branchtab[38])); + t517 = (t516 + a2369); + a2370 = ((a2323)^(Branchtab[70])); + t518 = (t517 + a2370); + a2371 = ((a2326)^(Branchtab[102])); + t519 = (t518 + a2371); + t520 = (1020 - t519); + m418 = (Y[6] + t519); + m419 = (Y[38] + t520); + m420 = (Y[6] + t520); + m421 = (Y[38] + t519); + d209 = ((m418 > m419)); + d210 = ((m420 > m421)); + s206 = ((d209) ? (m419) : (m418)); + s207 = ((d210) ? (m421) : (m420)); + a2372 = dec[a2329]; + a2373 = ((d210) << (1)); + a2374 = ((d209)|(a2373)); + a2375 = ((a2374) << (12)); + dec[a2329] = ((a2372)|(a2375)); + X[12] = s206; + X[13] = s207; + t521 = ((a2318)^(Branchtab[7])); + a2376 = ((a2320)^(Branchtab[39])); + t522 = (t521 + a2376); + a2377 = ((a2323)^(Branchtab[71])); + t523 = (t522 + a2377); + a2378 = ((a2326)^(Branchtab[103])); + t524 = (t523 + a2378); + t525 = (1020 - t524); + m422 = (Y[7] + t524); + m423 = (Y[39] + t525); + m424 = (Y[7] + t525); + m425 = (Y[39] + t524); + d211 = ((m422 > m423)); + d212 = ((m424 > m425)); + s208 = ((d211) ? (m423) : (m422)); + s209 = ((d212) ? (m425) : (m424)); + a2379 = dec[a2329]; + a2380 = ((d212) << (1)); + a2381 = ((d211)|(a2380)); + a2382 = ((a2381) << (14)); + dec[a2329] = ((a2379)|(a2382)); + X[14] = s208; + X[15] = s209; + t526 = ((a2318)^(Branchtab[8])); + a2383 = ((a2320)^(Branchtab[40])); + t527 = (t526 + a2383); + a2384 = ((a2323)^(Branchtab[72])); + t528 = (t527 + a2384); + a2385 = ((a2326)^(Branchtab[104])); + t529 = (t528 + a2385); + t530 = (1020 - t529); + m426 = (Y[8] + t529); + m427 = (Y[40] + t530); + m428 = (Y[8] + t530); + m429 = (Y[40] + t529); + d213 = ((m426 > m427)); + d214 = ((m428 > m429)); + s210 = ((d213) ? (m427) : (m426)); + s211 = ((d214) ? (m429) : (m428)); + a2386 = dec[a2329]; + a2387 = ((d214) << (1)); + a2388 = ((d213)|(a2387)); + a2389 = ((a2388) << (16)); + dec[a2329] = ((a2386)|(a2389)); + X[16] = s210; + X[17] = s211; + t531 = ((a2318)^(Branchtab[9])); + a2390 = ((a2320)^(Branchtab[41])); + t532 = (t531 + a2390); + a2391 = ((a2323)^(Branchtab[73])); + t533 = (t532 + a2391); + a2392 = ((a2326)^(Branchtab[105])); + t534 = (t533 + a2392); + t535 = (1020 - t534); + m430 = (Y[9] + t534); + m431 = (Y[41] + t535); + m432 = (Y[9] + t535); + m433 = (Y[41] + t534); + d215 = ((m430 > m431)); + d216 = ((m432 > m433)); + s212 = ((d215) ? (m431) : (m430)); + s213 = ((d216) ? (m433) : (m432)); + a2393 = dec[a2329]; + a2394 = ((d216) << (1)); + a2395 = ((d215)|(a2394)); + a2396 = ((a2395) << (18)); + dec[a2329] = ((a2393)|(a2396)); + X[18] = s212; + X[19] = s213; + t536 = ((a2318)^(Branchtab[10])); + a2397 = ((a2320)^(Branchtab[42])); + t537 = (t536 + a2397); + a2398 = ((a2323)^(Branchtab[74])); + t538 = (t537 + a2398); + a2399 = ((a2326)^(Branchtab[106])); + t539 = (t538 + a2399); + t540 = (1020 - t539); + m434 = (Y[10] + t539); + m435 = (Y[42] + t540); + m436 = (Y[10] + t540); + m437 = (Y[42] + t539); + d217 = ((m434 > m435)); + d218 = ((m436 > m437)); + s214 = ((d217) ? (m435) : (m434)); + s215 = ((d218) ? (m437) : (m436)); + a2400 = dec[a2329]; + a2401 = ((d218) << (1)); + a2402 = ((d217)|(a2401)); + a2403 = ((a2402) << (20)); + dec[a2329] = ((a2400)|(a2403)); + X[20] = s214; + X[21] = s215; + t541 = ((a2318)^(Branchtab[11])); + a2404 = ((a2320)^(Branchtab[43])); + t542 = (t541 + a2404); + a2405 = ((a2323)^(Branchtab[75])); + t543 = (t542 + a2405); + a2406 = ((a2326)^(Branchtab[107])); + t544 = (t543 + a2406); + t545 = (1020 - t544); + m438 = (Y[11] + t544); + m439 = (Y[43] + t545); + m440 = (Y[11] + t545); + m441 = (Y[43] + t544); + d219 = ((m438 > m439)); + d220 = ((m440 > m441)); + s216 = ((d219) ? (m439) : (m438)); + s217 = ((d220) ? (m441) : (m440)); + a2407 = dec[a2329]; + a2408 = ((d220) << (1)); + a2409 = ((d219)|(a2408)); + a2410 = ((a2409) << (22)); + dec[a2329] = ((a2407)|(a2410)); + X[22] = s216; + X[23] = s217; + t546 = ((a2318)^(Branchtab[12])); + a2411 = ((a2320)^(Branchtab[44])); + t547 = (t546 + a2411); + a2412 = ((a2323)^(Branchtab[76])); + t548 = (t547 + a2412); + a2413 = ((a2326)^(Branchtab[108])); + t549 = (t548 + a2413); + t550 = (1020 - t549); + m442 = (Y[12] + t549); + m443 = (Y[44] + t550); + m444 = (Y[12] + t550); + m445 = (Y[44] + t549); + d221 = ((m442 > m443)); + d222 = ((m444 > m445)); + s218 = ((d221) ? (m443) : (m442)); + s219 = ((d222) ? (m445) : (m444)); + a2414 = dec[a2329]; + a2415 = ((d222) << (1)); + a2416 = ((d221)|(a2415)); + a2417 = ((a2416) << (24)); + dec[a2329] = ((a2414)|(a2417)); + X[24] = s218; + X[25] = s219; + t551 = ((a2318)^(Branchtab[13])); + a2418 = ((a2320)^(Branchtab[45])); + t552 = (t551 + a2418); + a2419 = ((a2323)^(Branchtab[77])); + t553 = (t552 + a2419); + a2420 = ((a2326)^(Branchtab[109])); + t554 = (t553 + a2420); + t555 = (1020 - t554); + m446 = (Y[13] + t554); + m447 = (Y[45] + t555); + m448 = (Y[13] + t555); + m449 = (Y[45] + t554); + d223 = ((m446 > m447)); + d224 = ((m448 > m449)); + s220 = ((d223) ? (m447) : (m446)); + s221 = ((d224) ? (m449) : (m448)); + a2421 = dec[a2329]; + a2422 = ((d224) << (1)); + a2423 = ((d223)|(a2422)); + a2424 = ((a2423) << (26)); + dec[a2329] = ((a2421)|(a2424)); + X[26] = s220; + X[27] = s221; + t556 = ((a2318)^(Branchtab[14])); + a2425 = ((a2320)^(Branchtab[46])); + t557 = (t556 + a2425); + a2426 = ((a2323)^(Branchtab[78])); + t558 = (t557 + a2426); + a2427 = ((a2326)^(Branchtab[110])); + t559 = (t558 + a2427); + t560 = (1020 - t559); + m450 = (Y[14] + t559); + m451 = (Y[46] + t560); + m452 = (Y[14] + t560); + m453 = (Y[46] + t559); + d225 = ((m450 > m451)); + d226 = ((m452 > m453)); + s222 = ((d225) ? (m451) : (m450)); + s223 = ((d226) ? (m453) : (m452)); + a2428 = dec[a2329]; + a2429 = ((d226) << (1)); + a2430 = ((d225)|(a2429)); + a2431 = ((a2430) << (28)); + dec[a2329] = ((a2428)|(a2431)); + X[28] = s222; + X[29] = s223; + t561 = ((a2318)^(Branchtab[15])); + a2432 = ((a2320)^(Branchtab[47])); + t562 = (t561 + a2432); + a2433 = ((a2323)^(Branchtab[79])); + t563 = (t562 + a2433); + a2434 = ((a2326)^(Branchtab[111])); + t564 = (t563 + a2434); + t565 = (1020 - t564); + m454 = (Y[15] + t564); + m455 = (Y[47] + t565); + m456 = (Y[15] + t565); + m457 = (Y[47] + t564); + d227 = ((m454 > m455)); + d228 = ((m456 > m457)); + s224 = ((d227) ? (m455) : (m454)); + s225 = ((d228) ? (m457) : (m456)); + a2435 = dec[a2329]; + a2436 = ((d228) << (1)); + a2437 = ((d227)|(a2436)); + a2438 = ((a2437) << (30)); + dec[a2329] = ((a2435)|(a2438)); + X[30] = s224; + X[31] = s225; + t566 = ((a2318)^(Branchtab[16])); + a2439 = ((a2320)^(Branchtab[48])); + t567 = (t566 + a2439); + a2440 = ((a2323)^(Branchtab[80])); + t568 = (t567 + a2440); + a2441 = ((a2326)^(Branchtab[112])); + t569 = (t568 + a2441); + t570 = (1020 - t569); + m458 = (Y[16] + t569); + m459 = (Y[48] + t570); + m460 = (Y[16] + t570); + m461 = (Y[48] + t569); + d229 = ((m458 > m459)); + d230 = ((m460 > m461)); + s226 = ((d229) ? (m459) : (m458)); + s227 = ((d230) ? (m461) : (m460)); + a2442 = (1 + a2329); + a2443 = dec[a2442]; + a2444 = ((d230) << (1)); + a2445 = ((d229)|(a2444)); + a2446 = ((a2445) << (0)); + dec[a2442] = ((a2443)|(a2446)); + X[32] = s226; + X[33] = s227; + t571 = ((a2318)^(Branchtab[17])); + a2447 = ((a2320)^(Branchtab[49])); + t572 = (t571 + a2447); + a2448 = ((a2323)^(Branchtab[81])); + t573 = (t572 + a2448); + a2449 = ((a2326)^(Branchtab[113])); + t574 = (t573 + a2449); + t575 = (1020 - t574); + m462 = (Y[17] + t574); + m463 = (Y[49] + t575); + m464 = (Y[17] + t575); + m465 = (Y[49] + t574); + d231 = ((m462 > m463)); + d232 = ((m464 > m465)); + s228 = ((d231) ? (m463) : (m462)); + s229 = ((d232) ? (m465) : (m464)); + a2450 = dec[a2442]; + a2451 = ((d232) << (1)); + a2452 = ((d231)|(a2451)); + a2453 = ((a2452) << (2)); + dec[a2442] = ((a2450)|(a2453)); + X[34] = s228; + X[35] = s229; + t576 = ((a2318)^(Branchtab[18])); + a2454 = ((a2320)^(Branchtab[50])); + t577 = (t576 + a2454); + a2455 = ((a2323)^(Branchtab[82])); + t578 = (t577 + a2455); + a2456 = ((a2326)^(Branchtab[114])); + t579 = (t578 + a2456); + t580 = (1020 - t579); + m466 = (Y[18] + t579); + m467 = (Y[50] + t580); + m468 = (Y[18] + t580); + m469 = (Y[50] + t579); + d233 = ((m466 > m467)); + d234 = ((m468 > m469)); + s230 = ((d233) ? (m467) : (m466)); + s231 = ((d234) ? (m469) : (m468)); + a2457 = dec[a2442]; + a2458 = ((d234) << (1)); + a2459 = ((d233)|(a2458)); + a2460 = ((a2459) << (4)); + dec[a2442] = ((a2457)|(a2460)); + X[36] = s230; + X[37] = s231; + t581 = ((a2318)^(Branchtab[19])); + a2461 = ((a2320)^(Branchtab[51])); + t582 = (t581 + a2461); + a2462 = ((a2323)^(Branchtab[83])); + t583 = (t582 + a2462); + a2463 = ((a2326)^(Branchtab[115])); + t584 = (t583 + a2463); + t585 = (1020 - t584); + m470 = (Y[19] + t584); + m471 = (Y[51] + t585); + m472 = (Y[19] + t585); + m473 = (Y[51] + t584); + d235 = ((m470 > m471)); + d236 = ((m472 > m473)); + s232 = ((d235) ? (m471) : (m470)); + s233 = ((d236) ? (m473) : (m472)); + a2464 = dec[a2442]; + a2465 = ((d236) << (1)); + a2466 = ((d235)|(a2465)); + a2467 = ((a2466) << (6)); + dec[a2442] = ((a2464)|(a2467)); + X[38] = s232; + X[39] = s233; + t586 = ((a2318)^(Branchtab[20])); + a2468 = ((a2320)^(Branchtab[52])); + t587 = (t586 + a2468); + a2469 = ((a2323)^(Branchtab[84])); + t588 = (t587 + a2469); + a2470 = ((a2326)^(Branchtab[116])); + t589 = (t588 + a2470); + t590 = (1020 - t589); + m474 = (Y[20] + t589); + m475 = (Y[52] + t590); + m476 = (Y[20] + t590); + m477 = (Y[52] + t589); + d237 = ((m474 > m475)); + d238 = ((m476 > m477)); + s234 = ((d237) ? (m475) : (m474)); + s235 = ((d238) ? (m477) : (m476)); + a2471 = dec[a2442]; + a2472 = ((d238) << (1)); + a2473 = ((d237)|(a2472)); + a2474 = ((a2473) << (8)); + dec[a2442] = ((a2471)|(a2474)); + X[40] = s234; + X[41] = s235; + t591 = ((a2318)^(Branchtab[21])); + a2475 = ((a2320)^(Branchtab[53])); + t592 = (t591 + a2475); + a2476 = ((a2323)^(Branchtab[85])); + t593 = (t592 + a2476); + a2477 = ((a2326)^(Branchtab[117])); + t594 = (t593 + a2477); + t595 = (1020 - t594); + m478 = (Y[21] + t594); + m479 = (Y[53] + t595); + m480 = (Y[21] + t595); + m481 = (Y[53] + t594); + d239 = ((m478 > m479)); + d240 = ((m480 > m481)); + s236 = ((d239) ? (m479) : (m478)); + s237 = ((d240) ? (m481) : (m480)); + a2478 = dec[a2442]; + a2479 = ((d240) << (1)); + a2480 = ((d239)|(a2479)); + a2481 = ((a2480) << (10)); + dec[a2442] = ((a2478)|(a2481)); + X[42] = s236; + X[43] = s237; + t596 = ((a2318)^(Branchtab[22])); + a2482 = ((a2320)^(Branchtab[54])); + t597 = (t596 + a2482); + a2483 = ((a2323)^(Branchtab[86])); + t598 = (t597 + a2483); + a2484 = ((a2326)^(Branchtab[118])); + t599 = (t598 + a2484); + t600 = (1020 - t599); + m482 = (Y[22] + t599); + m483 = (Y[54] + t600); + m484 = (Y[22] + t600); + m485 = (Y[54] + t599); + d241 = ((m482 > m483)); + d242 = ((m484 > m485)); + s238 = ((d241) ? (m483) : (m482)); + s239 = ((d242) ? (m485) : (m484)); + a2485 = dec[a2442]; + a2486 = ((d242) << (1)); + a2487 = ((d241)|(a2486)); + a2488 = ((a2487) << (12)); + dec[a2442] = ((a2485)|(a2488)); + X[44] = s238; + X[45] = s239; + t601 = ((a2318)^(Branchtab[23])); + a2489 = ((a2320)^(Branchtab[55])); + t602 = (t601 + a2489); + a2490 = ((a2323)^(Branchtab[87])); + t603 = (t602 + a2490); + a2491 = ((a2326)^(Branchtab[119])); + t604 = (t603 + a2491); + t605 = (1020 - t604); + m486 = (Y[23] + t604); + m487 = (Y[55] + t605); + m488 = (Y[23] + t605); + m489 = (Y[55] + t604); + d243 = ((m486 > m487)); + d244 = ((m488 > m489)); + s240 = ((d243) ? (m487) : (m486)); + s241 = ((d244) ? (m489) : (m488)); + a2492 = dec[a2442]; + a2493 = ((d244) << (1)); + a2494 = ((d243)|(a2493)); + a2495 = ((a2494) << (14)); + dec[a2442] = ((a2492)|(a2495)); + X[46] = s240; + X[47] = s241; + t606 = ((a2318)^(Branchtab[24])); + a2496 = ((a2320)^(Branchtab[56])); + t607 = (t606 + a2496); + a2497 = ((a2323)^(Branchtab[88])); + t608 = (t607 + a2497); + a2498 = ((a2326)^(Branchtab[120])); + t609 = (t608 + a2498); + t610 = (1020 - t609); + m490 = (Y[24] + t609); + m491 = (Y[56] + t610); + m492 = (Y[24] + t610); + m493 = (Y[56] + t609); + d245 = ((m490 > m491)); + d246 = ((m492 > m493)); + s242 = ((d245) ? (m491) : (m490)); + s243 = ((d246) ? (m493) : (m492)); + a2499 = dec[a2442]; + a2500 = ((d246) << (1)); + a2501 = ((d245)|(a2500)); + a2502 = ((a2501) << (16)); + dec[a2442] = ((a2499)|(a2502)); + X[48] = s242; + X[49] = s243; + t611 = ((a2318)^(Branchtab[25])); + a2503 = ((a2320)^(Branchtab[57])); + t612 = (t611 + a2503); + a2504 = ((a2323)^(Branchtab[89])); + t613 = (t612 + a2504); + a2505 = ((a2326)^(Branchtab[121])); + t614 = (t613 + a2505); + t615 = (1020 - t614); + m494 = (Y[25] + t614); + m495 = (Y[57] + t615); + m496 = (Y[25] + t615); + m497 = (Y[57] + t614); + d247 = ((m494 > m495)); + d248 = ((m496 > m497)); + s244 = ((d247) ? (m495) : (m494)); + s245 = ((d248) ? (m497) : (m496)); + a2506 = dec[a2442]; + a2507 = ((d248) << (1)); + a2508 = ((d247)|(a2507)); + a2509 = ((a2508) << (18)); + dec[a2442] = ((a2506)|(a2509)); + X[50] = s244; + X[51] = s245; + t616 = ((a2318)^(Branchtab[26])); + a2510 = ((a2320)^(Branchtab[58])); + t617 = (t616 + a2510); + a2511 = ((a2323)^(Branchtab[90])); + t618 = (t617 + a2511); + a2512 = ((a2326)^(Branchtab[122])); + t619 = (t618 + a2512); + t620 = (1020 - t619); + m498 = (Y[26] + t619); + m499 = (Y[58] + t620); + m500 = (Y[26] + t620); + m501 = (Y[58] + t619); + d249 = ((m498 > m499)); + d250 = ((m500 > m501)); + s246 = ((d249) ? (m499) : (m498)); + s247 = ((d250) ? (m501) : (m500)); + a2513 = dec[a2442]; + a2514 = ((d250) << (1)); + a2515 = ((d249)|(a2514)); + a2516 = ((a2515) << (20)); + dec[a2442] = ((a2513)|(a2516)); + X[52] = s246; + X[53] = s247; + t621 = ((a2318)^(Branchtab[27])); + a2517 = ((a2320)^(Branchtab[59])); + t622 = (t621 + a2517); + a2518 = ((a2323)^(Branchtab[91])); + t623 = (t622 + a2518); + a2519 = ((a2326)^(Branchtab[123])); + t624 = (t623 + a2519); + t625 = (1020 - t624); + m502 = (Y[27] + t624); + m503 = (Y[59] + t625); + m504 = (Y[27] + t625); + m505 = (Y[59] + t624); + d251 = ((m502 > m503)); + d252 = ((m504 > m505)); + s248 = ((d251) ? (m503) : (m502)); + s249 = ((d252) ? (m505) : (m504)); + a2520 = dec[a2442]; + a2521 = ((d252) << (1)); + a2522 = ((d251)|(a2521)); + a2523 = ((a2522) << (22)); + dec[a2442] = ((a2520)|(a2523)); + X[54] = s248; + X[55] = s249; + t626 = ((a2318)^(Branchtab[28])); + a2524 = ((a2320)^(Branchtab[60])); + t627 = (t626 + a2524); + a2525 = ((a2323)^(Branchtab[92])); + t628 = (t627 + a2525); + a2526 = ((a2326)^(Branchtab[124])); + t629 = (t628 + a2526); + t630 = (1020 - t629); + m506 = (Y[28] + t629); + m507 = (Y[60] + t630); + m508 = (Y[28] + t630); + m509 = (Y[60] + t629); + d253 = ((m506 > m507)); + d254 = ((m508 > m509)); + s250 = ((d253) ? (m507) : (m506)); + s251 = ((d254) ? (m509) : (m508)); + a2527 = dec[a2442]; + a2528 = ((d254) << (1)); + a2529 = ((d253)|(a2528)); + a2530 = ((a2529) << (24)); + dec[a2442] = ((a2527)|(a2530)); + X[56] = s250; + X[57] = s251; + t631 = ((a2318)^(Branchtab[29])); + a2531 = ((a2320)^(Branchtab[61])); + t632 = (t631 + a2531); + a2532 = ((a2323)^(Branchtab[93])); + t633 = (t632 + a2532); + a2533 = ((a2326)^(Branchtab[125])); + t634 = (t633 + a2533); + t635 = (1020 - t634); + m510 = (Y[29] + t634); + m511 = (Y[61] + t635); + m512 = (Y[29] + t635); + m513 = (Y[61] + t634); + d255 = ((m510 > m511)); + d256 = ((m512 > m513)); + s252 = ((d255) ? (m511) : (m510)); + s253 = ((d256) ? (m513) : (m512)); + a2534 = dec[a2442]; + a2535 = ((d256) << (1)); + a2536 = ((d255)|(a2535)); + a2537 = ((a2536) << (26)); + dec[a2442] = ((a2534)|(a2537)); + X[58] = s252; + X[59] = s253; + t636 = ((a2318)^(Branchtab[30])); + a2538 = ((a2320)^(Branchtab[62])); + t637 = (t636 + a2538); + a2539 = ((a2323)^(Branchtab[94])); + t638 = (t637 + a2539); + a2540 = ((a2326)^(Branchtab[126])); + t639 = (t638 + a2540); + t640 = (1020 - t639); + m514 = (Y[30] + t639); + m515 = (Y[62] + t640); + m516 = (Y[30] + t640); + m517 = (Y[62] + t639); + d257 = ((m514 > m515)); + d258 = ((m516 > m517)); + s254 = ((d257) ? (m515) : (m514)); + s255 = ((d258) ? (m517) : (m516)); + a2541 = dec[a2442]; + a2542 = ((d258) << (1)); + a2543 = ((d257)|(a2542)); + a2544 = ((a2543) << (28)); + dec[a2442] = ((a2541)|(a2544)); + X[60] = s254; + X[61] = s255; + t641 = ((a2318)^(Branchtab[31])); + a2545 = ((a2320)^(Branchtab[63])); + t642 = (t641 + a2545); + a2546 = ((a2323)^(Branchtab[95])); + t643 = (t642 + a2546); + a2547 = ((a2326)^(Branchtab[127])); + t644 = (t643 + a2547); + t645 = (1020 - t644); + m518 = (Y[31] + t644); + m519 = (Y[63] + t645); + m520 = (Y[31] + t645); + m521 = (Y[63] + t644); + d259 = ((m518 > m519)); + d260 = ((m520 > m521)); + s256 = ((d259) ? (m519) : (m518)); + s257 = ((d260) ? (m521) : (m520)); + a2548 = dec[a2442]; + a2549 = ((d260) << (1)); + a2550 = ((d259)|(a2549)); + a2551 = ((a2550) << (30)); + dec[a2442] = ((a2548)|(a2551)); + X[62] = s256; + X[63] = s257; + } + /* skip */ +} +#endif diff --git a/src/backend/viterbi_768/spiral-no-sse.h b/src/backend/viterbi_768/spiral-no-sse.h new file mode 100644 index 0000000..6ac12dd --- /dev/null +++ b/src/backend/viterbi_768/spiral-no-sse.h @@ -0,0 +1,35 @@ +/*************************************************************** +This code was generated by Spiral 6.0 beta, www.spiral.net -- +Copyright (c) 2005-2008, Carnegie Mellon University. +All rights reserved. +The code is distributed under the GNU General Public License (GPL) +(see http://www.gnu.org/copyleft/gpl.html) + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +*AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************/ + +#define K 7 +#define RATE 4 +#define POLYS { 109, 79, 83, 109 } +#define NUMSTATES 64 +#define FRAMEBITS 2048 +#define DECISIONTYPE unsigned int +#define DECISIONTYPE_BITSIZE 32 +#define COMPUTETYPE unsigned int +#define EBN0 3 +#define TRIALS 10000 +#define __int32 int +#define FUNC FULL_SPIRAL +#define METRICSHIFT 0 +#define PRECISIONSHIFT 0 +#define RENORMALIZE_THRESHOLD 2000000000 diff --git a/src/backend/viterbi_768/spiral-sse.c b/src/backend/viterbi_768/spiral-sse.c new file mode 100644 index 0000000..ee33230 --- /dev/null +++ b/src/backend/viterbi_768/spiral-sse.c @@ -0,0 +1,698 @@ +/*************************************************************** +This code was generated by Spiral 6.0 beta, www.spiral.net -- +Copyright (c) 2005-2008, Carnegie Mellon University. +All rights reserved. +The code is distributed under the GNU General Public License (GPL) +(see http://www.gnu.org/copyleft/gpl.html) + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +*AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************/ + +//#include +//#include +#include +#include +#include +#include "spiral-sse.h" +void init_FULL_SPIRAL() { +} + +void FULL_SPIRAL_sse(int amount, int32_t *Y, int32_t *X, int32_t *syms, unsigned char *dec, int32_t *Branchtab) { +int i9; +// for(i9 = 0; i9 <= amount; i9++) { + for(i9 = 0; i9 < amount; i9++) { + int32_t a1002, a1006, a1010, a1014, a822, a828, a834 + , a840; + int a820, a850; + unsigned char s118, s125, s132, s139, s146, s153, s160 + , s167, s174, s181, s188, s195, s202, s209, s216 + , s223; + int32_t *a1001, *a1005, *a1009, *a1013, *a821, *a827, *a833 + , *a839, *b104; + unsigned char *a1021, *a1030, *a1039, *a1048, *a1057, *a1066, *a1075 + , *a1084, *a849, *a851, *a872, *a893, *a914, *a935, *a956 + , *a977, *a998; + __m128i *a1000, *a818, *a819, *a824, *a830, *a836, *a842 + , *a852, *a853, *a854, *a855, *a856, *a859, *a862, *a865 + , *a873, *a874, *a875, *a876, *a877, *a880, *a883, *a886 + , *a894, *a895, *a896, *a897, *a898, *a901, *a904, *a907 + , *a915, *a916, *a917, *a918, *a919, *a922, *a925, *a928 + , *a936, *a937, *a938, *a939, *a940, *a943, *a946, *a949 + , *a957, *a958, *a959, *a960, *a961, *a964, *a967, *a970 + , *a978, *a979, *a980, *a981, *a982, *a985, *a988, *a991 + , *a999; + __m128i a1003, a1004, a1007, a1008, a1011, a1012, a1015 + , a1016, a1017, a1018, a1019, a1020, a1022, a1023, a1024 + , a1025, a1026, a1027, a1028, a1029, a1031, a1032, a1033 + , a1034, a1035, a1036, a1037, a1038, a1040, a1041, a1042 + , a1043, a1044, a1045, a1046, a1047, a1049, a1050, a1051 + , a1052, a1053, a1054, a1055, a1056, a1058, a1059, a1060 + , a1061, a1062, a1063, a1064, a1065, a1067, a1068, a1069 + , a1070, a1071, a1072, a1073, a1074, a1076, a1077, a1078 + , a1079, a1080, a1081, a1082, a1083, a823, a825, a826 + , a829, a831, a832, a835, a837, a838, a841, a843 + , a844, a845, a846, a847, a848, a857, a858, a860 + , a861, a863, a864, a866, a867, a868, a869, a870 + , a871, a878, a879, a881, a882, a884, a885, a887 + , a888, a889, a890, a891, a892, a899, a900, a902 + , a903, a905, a906, a908, a909, a910, a911, a912 + , a913, a920, a921, a923, a924, a926, a927, a929 + , a930, a931, a932, a933, a934, a941, a942, a944 + , a945, a947, a948, a950, a951, a952, a953, a954 + , a955, a962, a963, a965, a966, a968, a969, a971 + , a972, a973, a974, a975, a976, a983, a984, a986 + , a987, a989, a990, a992, a993, a994, a995, a996 + , a997, b105, b106, b107, b108, b109, b110, b111 + , b112, b113, b114, b115, b116, b117, b118, b119 + , b120, b121, b122, b123, b124, b125, b126, b127 + , b128, b129, b130, b131, b132, b133, b134, b135 + , b136, d37, d38, d39, d40, d41, d42, d43 + , d44, d45, d46, d47, d48, d49, d50, d51 + , d52, d53, d54, d55, d56, d57, d58, d59 + , d60, d61, d62, d63, d64, d65, d66, d67 + , d68, m100, m101, m102, m103, m104, m105, m106 + , m107, m108, m109, m110, m111, m112, m113, m114 + , m115, m116, m117, m118, m119, m120, m121, m122 + , m123, m124, m125, m126, m127, m128, m129, m130 + , m131, m132, m133, m134, m135, m136, m73, m74 + , m75, m76, m77, m78, m79, m80, m81, m82 + , m83, m84, m85, m86, m87, m88, m89, m90 + , m91, m92, m93, m94, m95, m96, m97, m98 + , m99, s114, s115, s116, s117, s119, s120, s121 + , s122, s123, s124, s126, s127, s128, s129, s130 + , s131, s133, s134, s135, s136, s137, s138, s140 + , s141, s142, s143, s144, s145, s147, s148, s149 + , s150, s151, s152, s154, s155, s156, s157, s158 + , s159, s161, s162, s163, s164, s165, s166, s168 + , s169, s170, s171, s172, s173, s175, s176, s177 + , s178, s179, s180, s182, s183, s184, s185, s186 + , s187, s189, s190, s191, s192, s193, s194, s196 + , s197, s198, s199, s200, s201, s203, s204, s205 + , s206, s207, s208, s210, s211, s212, s213, s214 + , s215, s217, s218, s219, s220, s221, s222, s224 + , s225, t39, t40, t41, t42, t43, t44, t45 + , t46, t47, t48, t49, t50, t51, t52, t53 + , t54, t55, t56, t57, t58, t59, t60, t61 + , t62, t63, t64, t65, t66, t67, t68, t69 + , t70; + a818 = ((__m128i *) X); + s114 = *(a818); + a819 = (a818 + 8); + s115 = *(a819); + a820 = (8 * i9); + a821 = (syms + a820); + a822 = *(a821); + a823 = _mm_set1_epi32(a822); + a824 = ((__m128i *) Branchtab); + a825 = *(a824); + a826 = _mm_xor_si128(a823, a825); + b104 = (a820 + syms); + a827 = (b104 + 1); + a828 = *(a827); + a829 = _mm_set1_epi32(a828); + a830 = (a824 + 8); + a831 = *(a830); + a832 = _mm_xor_si128(a829, a831); + a833 = (b104 + 2); + a834 = *(a833); + a835 = _mm_set1_epi32(a834); + a836 = (a824 + 16); + a837 = *(a836); + a838 = _mm_xor_si128(a835, a837); + a839 = (b104 + 3); + a840 = *(a839); + a841 = _mm_set1_epi32(a840); + a842 = (a824 + 24); + a843 = *(a842); + a844 = _mm_xor_si128(a841, a843); + b105 = _mm_add_epi32(a826, a832); + b106 = _mm_add_epi32(b105, a838); + t39 = _mm_add_epi32(b106, a844); + t40 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t39); + m73 = _mm_add_epi32(s114, t39); + m74 = _mm_add_epi32(s115, t40); + m75 = _mm_add_epi32(s114, t40); + m76 = _mm_add_epi32(s115, t39); + d37 = _mm_cmpgt_epi32(m73, m74); + d38 = _mm_cmpgt_epi32(m75, m76); + a845 = _mm_andnot_si128(d37, m73); + a846 = _mm_and_si128(d37, m74); + s116 = _mm_or_si128(a845, a846); + a847 = _mm_andnot_si128(d38, m75); + a848 = _mm_and_si128(d38, m76); + s117 = _mm_or_si128(a847, a848); + s118 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d37,_mm_setzero_si128()),_mm_packs_epi16(d38,_mm_setzero_si128())),_mm_setzero_si128())); + a849 = ((unsigned char *) dec); + a850 = (16 * i9); + a851 = (a849 + a850); + *(a851) = s118; + s119 = _mm_unpacklo_epi32(s116, s117); + s120 = _mm_unpackhi_epi32(s116, s117); + a852 = ((__m128i *) Y); + *(a852) = s119; + a853 = (a852 + 1); + *(a853) = s120; + a854 = (a818 + 1); + s121 = *(a854); + a855 = (a818 + 9); + s122 = *(a855); + a856 = (a824 + 1); + a857 = *(a856); + a858 = _mm_xor_si128(a823, a857); + a859 = (a824 + 9); + a860 = *(a859); + a861 = _mm_xor_si128(a829, a860); + a862 = (a824 + 17); + a863 = *(a862); + a864 = _mm_xor_si128(a835, a863); + a865 = (a824 + 25); + a866 = *(a865); + a867 = _mm_xor_si128(a841, a866); + b107 = _mm_add_epi32(a858, a861); + b108 = _mm_add_epi32(b107, a864); + t41 = _mm_add_epi32(b108, a867); + t42 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t41); + m77 = _mm_add_epi32(s121, t41); + m78 = _mm_add_epi32(s122, t42); + m79 = _mm_add_epi32(s121, t42); + m80 = _mm_add_epi32(s122, t41); + d39 = _mm_cmpgt_epi32(m77, m78); + d40 = _mm_cmpgt_epi32(m79, m80); + a868 = _mm_andnot_si128(d39, m77); + a869 = _mm_and_si128(d39, m78); + s123 = _mm_or_si128(a868, a869); + a870 = _mm_andnot_si128(d40, m79); + a871 = _mm_and_si128(d40, m80); + s124 = _mm_or_si128(a870, a871); + s125 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d39,_mm_setzero_si128()),_mm_packs_epi16(d40,_mm_setzero_si128())),_mm_setzero_si128())); + a872 = (a851 + 1); + *(a872) = s125; + s126 = _mm_unpacklo_epi32(s123, s124); + s127 = _mm_unpackhi_epi32(s123, s124); + a873 = (a852 + 2); + *(a873) = s126; + a874 = (a852 + 3); + *(a874) = s127; + a875 = (a818 + 2); + s128 = *(a875); + a876 = (a818 + 10); + s129 = *(a876); + a877 = (a824 + 2); + a878 = *(a877); + a879 = _mm_xor_si128(a823, a878); + a880 = (a824 + 10); + a881 = *(a880); + a882 = _mm_xor_si128(a829, a881); + a883 = (a824 + 18); + a884 = *(a883); + a885 = _mm_xor_si128(a835, a884); + a886 = (a824 + 26); + a887 = *(a886); + a888 = _mm_xor_si128(a841, a887); + b109 = _mm_add_epi32(a879, a882); + b110 = _mm_add_epi32(b109, a885); + t43 = _mm_add_epi32(b110, a888); + t44 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t43); + m81 = _mm_add_epi32(s128, t43); + m82 = _mm_add_epi32(s129, t44); + m83 = _mm_add_epi32(s128, t44); + m84 = _mm_add_epi32(s129, t43); + d41 = _mm_cmpgt_epi32(m81, m82); + d42 = _mm_cmpgt_epi32(m83, m84); + a889 = _mm_andnot_si128(d41, m81); + a890 = _mm_and_si128(d41, m82); + s130 = _mm_or_si128(a889, a890); + a891 = _mm_andnot_si128(d42, m83); + a892 = _mm_and_si128(d42, m84); + s131 = _mm_or_si128(a891, a892); + s132 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d41,_mm_setzero_si128()),_mm_packs_epi16(d42,_mm_setzero_si128())),_mm_setzero_si128())); + a893 = (a851 + 2); + *(a893) = s132; + s133 = _mm_unpacklo_epi32(s130, s131); + s134 = _mm_unpackhi_epi32(s130, s131); + a894 = (a852 + 4); + *(a894) = s133; + a895 = (a852 + 5); + *(a895) = s134; + a896 = (a818 + 3); + s135 = *(a896); + a897 = (a818 + 11); + s136 = *(a897); + a898 = (a824 + 3); + a899 = *(a898); + a900 = _mm_xor_si128(a823, a899); + a901 = (a824 + 11); + a902 = *(a901); + a903 = _mm_xor_si128(a829, a902); + a904 = (a824 + 19); + a905 = *(a904); + a906 = _mm_xor_si128(a835, a905); + a907 = (a824 + 27); + a908 = *(a907); + a909 = _mm_xor_si128(a841, a908); + b111 = _mm_add_epi32(a900, a903); + b112 = _mm_add_epi32(b111, a906); + t45 = _mm_add_epi32(b112, a909); + t46 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t45); + m85 = _mm_add_epi32(s135, t45); + m86 = _mm_add_epi32(s136, t46); + m87 = _mm_add_epi32(s135, t46); + m88 = _mm_add_epi32(s136, t45); + d43 = _mm_cmpgt_epi32(m85, m86); + d44 = _mm_cmpgt_epi32(m87, m88); + a910 = _mm_andnot_si128(d43, m85); + a911 = _mm_and_si128(d43, m86); + s137 = _mm_or_si128(a910, a911); + a912 = _mm_andnot_si128(d44, m87); + a913 = _mm_and_si128(d44, m88); + s138 = _mm_or_si128(a912, a913); + s139 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d43,_mm_setzero_si128()),_mm_packs_epi16(d44,_mm_setzero_si128())),_mm_setzero_si128())); + a914 = (a851 + 3); + *(a914) = s139; + s140 = _mm_unpacklo_epi32(s137, s138); + s141 = _mm_unpackhi_epi32(s137, s138); + a915 = (a852 + 6); + *(a915) = s140; + a916 = (a852 + 7); + *(a916) = s141; + a917 = (a818 + 4); + s142 = *(a917); + a918 = (a818 + 12); + s143 = *(a918); + a919 = (a824 + 4); + a920 = *(a919); + a921 = _mm_xor_si128(a823, a920); + a922 = (a824 + 12); + a923 = *(a922); + a924 = _mm_xor_si128(a829, a923); + a925 = (a824 + 20); + a926 = *(a925); + a927 = _mm_xor_si128(a835, a926); + a928 = (a824 + 28); + a929 = *(a928); + a930 = _mm_xor_si128(a841, a929); + b113 = _mm_add_epi32(a921, a924); + b114 = _mm_add_epi32(b113, a927); + t47 = _mm_add_epi32(b114, a930); + t48 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t47); + m89 = _mm_add_epi32(s142, t47); + m90 = _mm_add_epi32(s143, t48); + m91 = _mm_add_epi32(s142, t48); + m92 = _mm_add_epi32(s143, t47); + d45 = _mm_cmpgt_epi32(m89, m90); + d46 = _mm_cmpgt_epi32(m91, m92); + a931 = _mm_andnot_si128(d45, m89); + a932 = _mm_and_si128(d45, m90); + s144 = _mm_or_si128(a931, a932); + a933 = _mm_andnot_si128(d46, m91); + a934 = _mm_and_si128(d46, m92); + s145 = _mm_or_si128(a933, a934); + s146 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d45,_mm_setzero_si128()),_mm_packs_epi16(d46,_mm_setzero_si128())),_mm_setzero_si128())); + a935 = (a851 + 4); + *(a935) = s146; + s147 = _mm_unpacklo_epi32(s144, s145); + s148 = _mm_unpackhi_epi32(s144, s145); + a936 = (a852 + 8); + *(a936) = s147; + a937 = (a852 + 9); + *(a937) = s148; + a938 = (a818 + 5); + s149 = *(a938); + a939 = (a818 + 13); + s150 = *(a939); + a940 = (a824 + 5); + a941 = *(a940); + a942 = _mm_xor_si128(a823, a941); + a943 = (a824 + 13); + a944 = *(a943); + a945 = _mm_xor_si128(a829, a944); + a946 = (a824 + 21); + a947 = *(a946); + a948 = _mm_xor_si128(a835, a947); + a949 = (a824 + 29); + a950 = *(a949); + a951 = _mm_xor_si128(a841, a950); + b115 = _mm_add_epi32(a942, a945); + b116 = _mm_add_epi32(b115, a948); + t49 = _mm_add_epi32(b116, a951); + t50 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t49); + m93 = _mm_add_epi32(s149, t49); + m94 = _mm_add_epi32(s150, t50); + m95 = _mm_add_epi32(s149, t50); + m96 = _mm_add_epi32(s150, t49); + d47 = _mm_cmpgt_epi32(m93, m94); + d48 = _mm_cmpgt_epi32(m95, m96); + a952 = _mm_andnot_si128(d47, m93); + a953 = _mm_and_si128(d47, m94); + s151 = _mm_or_si128(a952, a953); + a954 = _mm_andnot_si128(d48, m95); + a955 = _mm_and_si128(d48, m96); + s152 = _mm_or_si128(a954, a955); + s153 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d47,_mm_setzero_si128()),_mm_packs_epi16(d48,_mm_setzero_si128())),_mm_setzero_si128())); + a956 = (a851 + 5); + *(a956) = s153; + s154 = _mm_unpacklo_epi32(s151, s152); + s155 = _mm_unpackhi_epi32(s151, s152); + a957 = (a852 + 10); + *(a957) = s154; + a958 = (a852 + 11); + *(a958) = s155; + a959 = (a818 + 6); + s156 = *(a959); + a960 = (a818 + 14); + s157 = *(a960); + a961 = (a824 + 6); + a962 = *(a961); + a963 = _mm_xor_si128(a823, a962); + a964 = (a824 + 14); + a965 = *(a964); + a966 = _mm_xor_si128(a829, a965); + a967 = (a824 + 22); + a968 = *(a967); + a969 = _mm_xor_si128(a835, a968); + a970 = (a824 + 30); + a971 = *(a970); + a972 = _mm_xor_si128(a841, a971); + b117 = _mm_add_epi32(a963, a966); + b118 = _mm_add_epi32(b117, a969); + t51 = _mm_add_epi32(b118, a972); + t52 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t51); + m97 = _mm_add_epi32(s156, t51); + m98 = _mm_add_epi32(s157, t52); + m99 = _mm_add_epi32(s156, t52); + m100 = _mm_add_epi32(s157, t51); + d49 = _mm_cmpgt_epi32(m97, m98); + d50 = _mm_cmpgt_epi32(m99, m100); + a973 = _mm_andnot_si128(d49, m97); + a974 = _mm_and_si128(d49, m98); + s158 = _mm_or_si128(a973, a974); + a975 = _mm_andnot_si128(d50, m99); + a976 = _mm_and_si128(d50, m100); + s159 = _mm_or_si128(a975, a976); + s160 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d49,_mm_setzero_si128()),_mm_packs_epi16(d50,_mm_setzero_si128())),_mm_setzero_si128())); + a977 = (a851 + 6); + *(a977) = s160; + s161 = _mm_unpacklo_epi32(s158, s159); + s162 = _mm_unpackhi_epi32(s158, s159); + a978 = (a852 + 12); + *(a978) = s161; + a979 = (a852 + 13); + *(a979) = s162; + a980 = (a818 + 7); + s163 = *(a980); + a981 = (a818 + 15); + s164 = *(a981); + a982 = (a824 + 7); + a983 = *(a982); + a984 = _mm_xor_si128(a823, a983); + a985 = (a824 + 15); + a986 = *(a985); + a987 = _mm_xor_si128(a829, a986); + a988 = (a824 + 23); + a989 = *(a988); + a990 = _mm_xor_si128(a835, a989); + a991 = (a824 + 31); + a992 = *(a991); + a993 = _mm_xor_si128(a841, a992); + b119 = _mm_add_epi32(a984, a987); + b120 = _mm_add_epi32(b119, a990); + t53 = _mm_add_epi32(b120, a993); + t54 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t53); + m101 = _mm_add_epi32(s163, t53); + m102 = _mm_add_epi32(s164, t54); + m103 = _mm_add_epi32(s163, t54); + m104 = _mm_add_epi32(s164, t53); + d51 = _mm_cmpgt_epi32(m101, m102); + d52 = _mm_cmpgt_epi32(m103, m104); + a994 = _mm_andnot_si128(d51, m101); + a995 = _mm_and_si128(d51, m102); + s165 = _mm_or_si128(a994, a995); + a996 = _mm_andnot_si128(d52, m103); + a997 = _mm_and_si128(d52, m104); + s166 = _mm_or_si128(a996, a997); + s167 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d51,_mm_setzero_si128()),_mm_packs_epi16(d52,_mm_setzero_si128())),_mm_setzero_si128())); + a998 = (a851 + 7); + *(a998) = s167; + s168 = _mm_unpacklo_epi32(s165, s166); + s169 = _mm_unpackhi_epi32(s165, s166); + a999 = (a852 + 14); + *(a999) = s168; + a1000 = (a852 + 15); + *(a1000) = s169; + s170 = *(a852); + s171 = *(a936); + a1001 = (b104 + 4); + a1002 = *(a1001); + a1003 = _mm_set1_epi32(a1002); + a1004 = _mm_xor_si128(a1003, a825); + a1005 = (b104 + 5); + a1006 = *(a1005); + a1007 = _mm_set1_epi32(a1006); + a1008 = _mm_xor_si128(a1007, a831); + a1009 = (b104 + 6); + a1010 = *(a1009); + a1011 = _mm_set1_epi32(a1010); + a1012 = _mm_xor_si128(a1011, a837); + a1013 = (b104 + 7); + a1014 = *(a1013); + a1015 = _mm_set1_epi32(a1014); + a1016 = _mm_xor_si128(a1015, a843); + b121 = _mm_add_epi32(a1004, a1008); + b122 = _mm_add_epi32(b121, a1012); + t55 = _mm_add_epi32(b122, a1016); + t56 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t55); + m105 = _mm_add_epi32(s170, t55); + m106 = _mm_add_epi32(s171, t56); + m107 = _mm_add_epi32(s170, t56); + m108 = _mm_add_epi32(s171, t55); + d53 = _mm_cmpgt_epi32(m105, m106); + d54 = _mm_cmpgt_epi32(m107, m108); + a1017 = _mm_andnot_si128(d53, m105); + a1018 = _mm_and_si128(d53, m106); + s172 = _mm_or_si128(a1017, a1018); + a1019 = _mm_andnot_si128(d54, m107); + a1020 = _mm_and_si128(d54, m108); + s173 = _mm_or_si128(a1019, a1020); + s174 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d53,_mm_setzero_si128()),_mm_packs_epi16(d54,_mm_setzero_si128())),_mm_setzero_si128())); + a1021 = (a851 + 8); + *(a1021) = s174; + s175 = _mm_unpacklo_epi32(s172, s173); + s176 = _mm_unpackhi_epi32(s172, s173); + *(a818) = s175; + *(a854) = s176; + s177 = *(a853); + s178 = *(a937); + a1022 = _mm_xor_si128(a1003, a857); + a1023 = _mm_xor_si128(a1007, a860); + a1024 = _mm_xor_si128(a1011, a863); + a1025 = _mm_xor_si128(a1015, a866); + b123 = _mm_add_epi32(a1022, a1023); + b124 = _mm_add_epi32(b123, a1024); + t57 = _mm_add_epi32(b124, a1025); + t58 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t57); + m109 = _mm_add_epi32(s177, t57); + m110 = _mm_add_epi32(s178, t58); + m111 = _mm_add_epi32(s177, t58); + m112 = _mm_add_epi32(s178, t57); + d55 = _mm_cmpgt_epi32(m109, m110); + d56 = _mm_cmpgt_epi32(m111, m112); + a1026 = _mm_andnot_si128(d55, m109); + a1027 = _mm_and_si128(d55, m110); + s179 = _mm_or_si128(a1026, a1027); + a1028 = _mm_andnot_si128(d56, m111); + a1029 = _mm_and_si128(d56, m112); + s180 = _mm_or_si128(a1028, a1029); + s181 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d55,_mm_setzero_si128()),_mm_packs_epi16(d56,_mm_setzero_si128())),_mm_setzero_si128())); + a1030 = (a851 + 9); + *(a1030) = s181; + s182 = _mm_unpacklo_epi32(s179, s180); + s183 = _mm_unpackhi_epi32(s179, s180); + *(a875) = s182; + *(a896) = s183; + s184 = *(a873); + s185 = *(a957); + a1031 = _mm_xor_si128(a1003, a878); + a1032 = _mm_xor_si128(a1007, a881); + a1033 = _mm_xor_si128(a1011, a884); + a1034 = _mm_xor_si128(a1015, a887); + b125 = _mm_add_epi32(a1031, a1032); + b126 = _mm_add_epi32(b125, a1033); + t59 = _mm_add_epi32(b126, a1034); + t60 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t59); + m113 = _mm_add_epi32(s184, t59); + m114 = _mm_add_epi32(s185, t60); + m115 = _mm_add_epi32(s184, t60); + m116 = _mm_add_epi32(s185, t59); + d57 = _mm_cmpgt_epi32(m113, m114); + d58 = _mm_cmpgt_epi32(m115, m116); + a1035 = _mm_andnot_si128(d57, m113); + a1036 = _mm_and_si128(d57, m114); + s186 = _mm_or_si128(a1035, a1036); + a1037 = _mm_andnot_si128(d58, m115); + a1038 = _mm_and_si128(d58, m116); + s187 = _mm_or_si128(a1037, a1038); + s188 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d57,_mm_setzero_si128()),_mm_packs_epi16(d58,_mm_setzero_si128())),_mm_setzero_si128())); + a1039 = (a851 + 10); + *(a1039) = s188; + s189 = _mm_unpacklo_epi32(s186, s187); + s190 = _mm_unpackhi_epi32(s186, s187); + *(a917) = s189; + *(a938) = s190; + s191 = *(a874); + s192 = *(a958); + a1040 = _mm_xor_si128(a1003, a899); + a1041 = _mm_xor_si128(a1007, a902); + a1042 = _mm_xor_si128(a1011, a905); + a1043 = _mm_xor_si128(a1015, a908); + b127 = _mm_add_epi32(a1040, a1041); + b128 = _mm_add_epi32(b127, a1042); + t61 = _mm_add_epi32(b128, a1043); + t62 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t61); + m117 = _mm_add_epi32(s191, t61); + m118 = _mm_add_epi32(s192, t62); + m119 = _mm_add_epi32(s191, t62); + m120 = _mm_add_epi32(s192, t61); + d59 = _mm_cmpgt_epi32(m117, m118); + d60 = _mm_cmpgt_epi32(m119, m120); + a1044 = _mm_andnot_si128(d59, m117); + a1045 = _mm_and_si128(d59, m118); + s193 = _mm_or_si128(a1044, a1045); + a1046 = _mm_andnot_si128(d60, m119); + a1047 = _mm_and_si128(d60, m120); + s194 = _mm_or_si128(a1046, a1047); + s195 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d59,_mm_setzero_si128()),_mm_packs_epi16(d60,_mm_setzero_si128())),_mm_setzero_si128())); + a1048 = (a851 + 11); + *(a1048) = s195; + s196 = _mm_unpacklo_epi32(s193, s194); + s197 = _mm_unpackhi_epi32(s193, s194); + *(a959) = s196; + *(a980) = s197; + s198 = *(a894); + s199 = *(a978); + a1049 = _mm_xor_si128(a1003, a920); + a1050 = _mm_xor_si128(a1007, a923); + a1051 = _mm_xor_si128(a1011, a926); + a1052 = _mm_xor_si128(a1015, a929); + b129 = _mm_add_epi32(a1049, a1050); + b130 = _mm_add_epi32(b129, a1051); + t63 = _mm_add_epi32(b130, a1052); + t64 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t63); + m121 = _mm_add_epi32(s198, t63); + m122 = _mm_add_epi32(s199, t64); + m123 = _mm_add_epi32(s198, t64); + m124 = _mm_add_epi32(s199, t63); + d61 = _mm_cmpgt_epi32(m121, m122); + d62 = _mm_cmpgt_epi32(m123, m124); + a1053 = _mm_andnot_si128(d61, m121); + a1054 = _mm_and_si128(d61, m122); + s200 = _mm_or_si128(a1053, a1054); + a1055 = _mm_andnot_si128(d62, m123); + a1056 = _mm_and_si128(d62, m124); + s201 = _mm_or_si128(a1055, a1056); + s202 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d61,_mm_setzero_si128()),_mm_packs_epi16(d62,_mm_setzero_si128())),_mm_setzero_si128())); + a1057 = (a851 + 12); + *(a1057) = s202; + s203 = _mm_unpacklo_epi32(s200, s201); + s204 = _mm_unpackhi_epi32(s200, s201); + *(a819) = s203; + *(a855) = s204; + s205 = *(a895); + s206 = *(a979); + a1058 = _mm_xor_si128(a1003, a941); + a1059 = _mm_xor_si128(a1007, a944); + a1060 = _mm_xor_si128(a1011, a947); + a1061 = _mm_xor_si128(a1015, a950); + b131 = _mm_add_epi32(a1058, a1059); + b132 = _mm_add_epi32(b131, a1060); + t65 = _mm_add_epi32(b132, a1061); + t66 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t65); + m125 = _mm_add_epi32(s205, t65); + m126 = _mm_add_epi32(s206, t66); + m127 = _mm_add_epi32(s205, t66); + m128 = _mm_add_epi32(s206, t65); + d63 = _mm_cmpgt_epi32(m125, m126); + d64 = _mm_cmpgt_epi32(m127, m128); + a1062 = _mm_andnot_si128(d63, m125); + a1063 = _mm_and_si128(d63, m126); + s207 = _mm_or_si128(a1062, a1063); + a1064 = _mm_andnot_si128(d64, m127); + a1065 = _mm_and_si128(d64, m128); + s208 = _mm_or_si128(a1064, a1065); + s209 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d63,_mm_setzero_si128()),_mm_packs_epi16(d64,_mm_setzero_si128())),_mm_setzero_si128())); + a1066 = (a851 + 13); + *(a1066) = s209; + s210 = _mm_unpacklo_epi32(s207, s208); + s211 = _mm_unpackhi_epi32(s207, s208); + *(a876) = s210; + *(a897) = s211; + s212 = *(a915); + s213 = *(a999); + a1067 = _mm_xor_si128(a1003, a962); + a1068 = _mm_xor_si128(a1007, a965); + a1069 = _mm_xor_si128(a1011, a968); + a1070 = _mm_xor_si128(a1015, a971); + b133 = _mm_add_epi32(a1067, a1068); + b134 = _mm_add_epi32(b133, a1069); + t67 = _mm_add_epi32(b134, a1070); + t68 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t67); + m129 = _mm_add_epi32(s212, t67); + m130 = _mm_add_epi32(s213, t68); + m131 = _mm_add_epi32(s212, t68); + m132 = _mm_add_epi32(s213, t67); + d65 = _mm_cmpgt_epi32(m129, m130); + d66 = _mm_cmpgt_epi32(m131, m132); + a1071 = _mm_andnot_si128(d65, m129); + a1072 = _mm_and_si128(d65, m130); + s214 = _mm_or_si128(a1071, a1072); + a1073 = _mm_andnot_si128(d66, m131); + a1074 = _mm_and_si128(d66, m132); + s215 = _mm_or_si128(a1073, a1074); + s216 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d65,_mm_setzero_si128()),_mm_packs_epi16(d66,_mm_setzero_si128())),_mm_setzero_si128())); + a1075 = (a851 + 14); + *(a1075) = s216; + s217 = _mm_unpacklo_epi32(s214, s215); + s218 = _mm_unpackhi_epi32(s214, s215); + *(a918) = s217; + *(a939) = s218; + s219 = *(a916); + s220 = *(a1000); + a1076 = _mm_xor_si128(a1003, a983); + a1077 = _mm_xor_si128(a1007, a986); + a1078 = _mm_xor_si128(a1011, a989); + a1079 = _mm_xor_si128(a1015, a992); + b135 = _mm_add_epi32(a1076, a1077); + b136 = _mm_add_epi32(b135, a1078); + t69 = _mm_add_epi32(b136, a1079); + t70 = _mm_sub_epi32(_mm_set_epi32(1020, 1020, 1020, 1020), t69); + m133 = _mm_add_epi32(s219, t69); + m134 = _mm_add_epi32(s220, t70); + m135 = _mm_add_epi32(s219, t70); + m136 = _mm_add_epi32(s220, t69); + d67 = _mm_cmpgt_epi32(m133, m134); + d68 = _mm_cmpgt_epi32(m135, m136); + a1080 = _mm_andnot_si128(d67, m133); + a1081 = _mm_and_si128(d67, m134); + s221 = _mm_or_si128(a1080, a1081); + a1082 = _mm_andnot_si128(d68, m135); + a1083 = _mm_and_si128(d68, m136); + s222 = _mm_or_si128(a1082, a1083); + s223 = _mm_movemask_epi8(_mm_packs_epi16(_mm_unpacklo_epi16(_mm_packs_epi16(d67,_mm_setzero_si128()),_mm_packs_epi16(d68,_mm_setzero_si128())),_mm_setzero_si128())); + a1084 = (a851 + 15); + *(a1084) = s223; + s224 = _mm_unpacklo_epi32(s221, s222); + s225 = _mm_unpackhi_epi32(s221, s222); + *(a960) = s224; + *(a981) = s225; + } + /* skip */ +} diff --git a/src/backend/viterbi_768/spiral-sse.h b/src/backend/viterbi_768/spiral-sse.h new file mode 100644 index 0000000..9d8369c --- /dev/null +++ b/src/backend/viterbi_768/spiral-sse.h @@ -0,0 +1,36 @@ +/*************************************************************** +This code was generated by Spiral 6.0 beta, www.spiral.net -- +Copyright (c) 2005-2008, Carnegie Mellon University. +All rights reserved. +The code is distributed under the GNU General Public License (GPL) +(see http://www.gnu.org/copyleft/gpl.html) + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +*AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +******************************************************************/ +#include + +#define K 7 +#define RATE 4 +#define POLYS { 109, 79, 83, 109 } +#define NUMSTATES 64 +#define FRAMEBITS 2048 +#define DECISIONTYPE unsigned int +#define DECISIONTYPE_BITSIZE 32 +#define COMPUTETYPE uint32_t +#define EBN0 3 +#define TRIALS 10000 +#define __int32 int +#define FUNC FULL_SPIRAL +#define METRICSHIFT 0 +#define PRECISIONSHIFT 0 +#define RENORMALIZE_THRESHOLD 2000000000 diff --git a/src/backend/viterbi_768/viterbi-768.cpp b/src/backend/viterbi_768/viterbi-768.cpp new file mode 100644 index 0000000..832ee59 --- /dev/null +++ b/src/backend/viterbi_768/viterbi-768.cpp @@ -0,0 +1,380 @@ +# +/* + * Copyright (C) 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * The convolutional decoder for the FIC blocks has fixed sized + * blocks, so we can use pre-generated code - for that specific + * sized blocks - generated by the spiral project + */ +#include +#include +#include "mm_malloc.h" +#include "viterbi-768.h" +#include +#ifdef __MINGW32__ +#include +#include +#include +#endif + +// +// It took a while to discover that the polynomes we used +// in our own "straightforward" implementation was bitreversed!! +// The official one is on top. +#define K 7 +#define POLYS { 0155, 0117, 0123, 0155} +//#define POLYS {109, 79, 83, 109} +// In the reversed form the polys look: +//#define POLYS { 0133, 0171, 0145, 0133 } +//#define POLYS { 91, 121, 101, 91 } + +#define METRICSHIFT 0 +#define PRECISIONSHIFT 0 +#define RENORMALIZE_THRESHOLD 137 + +// +/* ADDSHIFT and SUBSHIFT make sure that the thing returned is a byte. */ +#if (K-1<8) +#define ADDSHIFT (8-(K-1)) +#define SUBSHIFT 0 +#elif (K-1>8) +#define ADDSHIFT 0 +#define SUBSHIFT ((K-1)-8) +#else +#define ADDSHIFT 0 +#define SUBSHIFT 0 +#endif + + +static uint8_t Partab [] = +{ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0}; + +// +// One could create the table above, i.e. a 256 entry +// odd-parity lookup table by the following function +// It is now precomputed +void viterbi_768::partab_init (void){ +int16_t i,cnt,ti; + + for (i = 0; i < 256; i++){ + cnt = 0; + ti = i; + while (ti != 0) { + if (ti & 1) cnt++; + ti >>= 1; + } + Partab [i] = cnt & 1; + } +} + +int viterbi_768::parity (int x){ + /* Fold down to one byte */ + x ^= (x >> 16); + x ^= (x >> 8); + return Partab [x]; +// return parityb(x); +} + +static inline +void renormalize (COMPUTETYPE* X, COMPUTETYPE threshold){ +int32_t i; + + if (X [0] > threshold){ + COMPUTETYPE min = X [0]; + for (i = 0; i < NUMSTATES; i++) + if (min > X[i]) + min = X[i]; + for (i = 0; i < NUMSTATES; i++) + X[i] -= min; + } +} +// +// +// The main use of the viterbi decoder is in handling the FIC blocks +// There are (in mode 1) 3 ofdm blocks, giving 4 FIC blocks +// There all have a predefined length. In that case we use the +// "fast" (i.e. spiral) code, otherwise we use the generic code + viterbi_768::viterbi_768 (int16_t wordlength, bool spiral) { +int polys [RATE] = POLYS; +int16_t i, state; +#ifdef __MINGW32__ +uint32_t size; +#endif + + frameBits = wordlength; + this -> spiral = spiral; +// partab_init (); + +// B I G N O T E The spiral code uses (wordLength + (K - 1) * sizeof ... +// However, the application then crashes, so something is not OK +// By doubling the size, the problem disappears. It is not solved though +// and not further investigation. +#ifdef __MINGW32__ + size = 2 * ((wordlength + (K - 1)) / 8 + 1 + 16) & ~0xF; + data = (uint8_t *)_aligned_malloc (size, 16); + size = 2 * (RATE * (wordlength + (K - 1)) * sizeof(COMPUTETYPE) + 16) & ~0xF; + symbols = (COMPUTETYPE *)_aligned_malloc (size, 16); + size = 2 * (wordlength + (K - 1)) * sizeof (decision_t); + size = (size + 16) & ~0xF; + vp. decisions = (decision_t *)_aligned_malloc (size, 16); +#else + if (posix_memalign ((void**)&data, 16, + (wordlength + (K - 1))/ 8 + 1)){ + printf("Allocation of data array failed\n"); + } + if (posix_memalign ((void**)&symbols, 16, + RATE * (wordlength + (K - 1)) * sizeof(COMPUTETYPE))){ + printf("Allocation of symbols array failed\n"); + } + if (posix_memalign ((void**)&(vp. decisions), + 16, + 2 * (wordlength + (K - 1)) * sizeof (decision_t))){ + printf ("Allocation of vp decisions failed\n"); + } +#endif + + for (state = 0; state < NUMSTATES / 2; state++) { + for (i = 0; i < RATE; i++) + Branchtab [i * NUMSTATES / 2 + state] = + (polys[i] < 0) ^ + parity((2 * state) & abs (polys[i])) ? 255 : 0; + } +// + init_viterbi (&vp, 0); +} + + + viterbi_768::~viterbi_768 (void) { +#ifdef __MINGW32__ + _aligned_free (vp. decisions); + _aligned_free (data); + _aligned_free (symbols); +#else + free (vp. decisions); + free (data); + free (symbols); +#endif +} + +static int maskTable [] = {128, 64, 32, 16, 8, 4, 2, 1}; +static inline +uint8_t getbit (uint8_t v, int32_t o) { + return (v & maskTable [o]) ? 1 : 0; +} + +//static +//uint8_t getbit (uint8_t v, int32_t o) { +//uint8_t mask = 1 << (7 - o); +// return (v & mask) ? 1 : 0; +//} + +// depends: POLYS, RATE, COMPUTETYPE +// encode was only used for testing purposes +//void encode (/*const*/ unsigned char *bytes, COMPUTETYPE *symbols, int nbits) { +//int i, k; +//int polys [RATE] = POLYS; +//int sr = 0; +// +//// FIXME: this is slowish +//// -- remember about the padding! +// for (i = 0; i < nbits + (K - 1); i++) { +// int b = bytes[i/8]; +// int j = i % 8; +// int bit = (b >> (7-j)) & 1; +// +// sr = (sr << 1) | bit; +// for (k = 0; k < RATE; k++) +// *(symbols++) = parity(sr & polys[k]); +// } +//} + +// Note that our DAB environment maps the softbits to -127 .. 127 +// we have to map that onto 0 .. 255 + +void viterbi_768::deconvolve (int16_t *input, uint8_t *output) { +uint32_t i; + + init_viterbi (&vp, 0); + for (i = 0; i < (uint16_t)(frameBits + (K - 1)) * RATE; i ++) { + int16_t temp = input [i] + 127; + if (temp < 0) temp = 0; + if (temp > 255) temp = 255; + symbols [i] = temp; + } + if (!spiral) + update_viterbi_blk_GENERIC (&vp, symbols, frameBits + (K - 1)); + else + update_viterbi_blk_SPIRAL (&vp, symbols, frameBits + (K - 1)); + + chainback_viterbi (&vp, data, frameBits, 0); + + for (i = 0; i < (uint16_t)frameBits; i ++) + output [i] = getbit (data [i >> 3], i & 07); +} + +/* C-language butterfly */ +void viterbi_768::BFLY (int i, int s, COMPUTETYPE * syms, + struct v * vp, decision_t * d) { +int32_t j, decision0, decision1; +COMPUTETYPE metric,m0,m1,m2,m3; + + metric =0; + for (j = 0; j < RATE;j++) + metric += (Branchtab [i + j * NUMSTATES/2] ^ syms[s*RATE+j]) >> + METRICSHIFT ; + metric = metric >> PRECISIONSHIFT; + const COMPUTETYPE max = + ((RATE * ((256 - 1) >> METRICSHIFT)) >> PRECISIONSHIFT); + + m0 = vp->old_metrics->t [i] + metric; + m1 = vp->old_metrics->t [i + NUMSTATES / 2] + (max - metric); + m2 = vp->old_metrics->t [i] + (max - metric); + m3 = vp->old_metrics->t [i + NUMSTATES / 2] + metric; + + decision0 = ((int32_t)(m0 - m1)) > 0; + decision1 = ((int32_t)(m2 - m3)) > 0; + + vp -> new_metrics-> t[2 * i] = decision0 ? m1 : m0; + vp -> new_metrics-> t[2 * i + 1] = decision1 ? m3 : m2; + + d -> w[i/(sizeof(uint32_t)*8/2)+s*(sizeof(decision_t)/sizeof(uint32_t))] |= + (decision0|decision1<<1) << ((2*i)&(sizeof(uint32_t)*8-1)); +} + +/* Update decoder with a block of demodulated symbols + * Note that nbits is the number of decoded data bits, not the number + * of symbols! + */ +void viterbi_768::update_viterbi_blk_GENERIC (struct v *vp, + COMPUTETYPE *syms, + int16_t nbits){ +decision_t *d = (decision_t *)vp -> decisions; +int32_t s, i; + + for (s = 0; s < nbits; s++) + memset (&d [s], 0, sizeof (decision_t)); + + for (s = 0; s < nbits; s++){ + void *tmp; + for (i = 0; i < NUMSTATES / 2; i++) + BFLY (i, s, syms, vp, vp -> decisions); + + renormalize (vp -> new_metrics -> t, RENORMALIZE_THRESHOLD); +// Swap pointers to old and new metrics + tmp = vp -> old_metrics; + vp -> old_metrics = vp -> new_metrics; + vp -> new_metrics = (metric_t *)tmp; + } +} + +extern "C" { +#if defined(SSE_AVAILABLE) +void FULL_SPIRAL_sse (int, +#elif defined(NEON_AVAILABLE) +void FULL_SPIRAL_neon (int, +#else +void FULL_SPIRAL_no_sse (int, +#endif + COMPUTETYPE *Y, + COMPUTETYPE *X, + COMPUTETYPE *syms, + DECISIONTYPE *dec, + COMPUTETYPE *Branchtab); +} + +void viterbi_768::update_viterbi_blk_SPIRAL (struct v *vp, + COMPUTETYPE *syms, + int16_t nbits){ +decision_t *d = (decision_t *)vp -> decisions; +int32_t s; + + for (s = 0; s < nbits; s++) + memset (d + s, 0, sizeof(decision_t)); + +#if defined(SSE_AVAILABLE) + FULL_SPIRAL_sse (nbits, +#elif defined(NEON_AVAILABLE) + FULL_SPIRAL_neon (nbits, +#else + FULL_SPIRAL_no_sse (nbits, +#endif + vp -> new_metrics -> t, + vp -> old_metrics -> t, + syms, + d -> t, Branchtab); +} + +// +/* Viterbi chainback */ +void viterbi_768::chainback_viterbi (struct v *vp, + uint8_t *data, /* Decoded output data */ + int16_t nbits, /* Number of data bits */ + uint16_t endstate){ /*Terminal encoder state */ +decision_t *d = vp -> decisions; + +/* Make room beyond the end of the encoder register so we can + * accumulate a full byte of decoded data + */ + endstate = (endstate % NUMSTATES) << ADDSHIFT; +/* The store into data[] only needs to be done every 8 bits. + * But this avoids a conditional branch, and the writes will + * combine in the cache anyway + */ + d += (K - 1); /* Look past tail */ + while (nbits-- != 0){ + int k; +// int l = (endstate >> ADDSHIFT) / 32; +// int m = (endstate >> ADDSHIFT) % 32; + k = (d [nbits].w [(endstate >> ADDSHIFT) / 32] >> + ((endstate>>ADDSHIFT) % 32)) & 1; + endstate = (endstate >> 1) | (k << (K - 2 + ADDSHIFT)); + data [nbits >> 3] = endstate >> SUBSHIFT; + } +} + +/* Initialize Viterbi decoder for start of new frame */ +void viterbi_768::init_viterbi (struct v *p, int16_t starting_state){ +struct v *vp = p; +int32_t i; + + for (i = 0; i < NUMSTATES; i++) + vp -> metrics1.t[i] = 63; + + vp -> old_metrics = &vp -> metrics1; + vp -> new_metrics = &vp -> metrics2; +/* Bias known start state */ + vp -> old_metrics-> t[starting_state & (NUMSTATES-1)] = 0; +} + diff --git a/src/ofdm/freq-interleaver.cpp b/src/ofdm/freq-interleaver.cpp new file mode 100644 index 0000000..6b3f781 --- /dev/null +++ b/src/ofdm/freq-interleaver.cpp @@ -0,0 +1,94 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#include +#include +#include "freq-interleaver.h" +#include "dab-params.h" + +/** + * \brief createMapper + * create the mapping table for the (de-)interleaver + * formulas according to section 14.6 (Frequency interleaving) + * of the DAB standard + */ + +void interLeaver:: createMapper (int16_t T_u, int16_t V1, + int16_t lwb, int16_t upb, + int16_t *v) { +int16_t tmp [T_u]; +int16_t index = 0; +int16_t i; + + tmp [0] = 0; + for (i = 1; i < T_u; i ++) + tmp [i] = (13 * tmp [i - 1] + V1) % T_u; + for (i = 0; i < T_u; i ++) { + if (tmp [i] == T_u / 2) + continue; + if ((tmp [i] < lwb) || + (tmp [i] > upb)) + continue; +// we now have a table with values from lwb .. upb +// + v [index ++] = tmp [i] - T_u / 2; +// we now have a table with values from lwb - T_u / 2 .. lwb + T_u / 2 + } +} + + interLeaver::interLeaver (uint8_t mode): p (mode) { + + int32_t T_u = p. get_T_u (); + int32_t carriers = p. get_carriers (); + permTable. resize (T_u); + + switch (mode) { + case 1: + default: // shouldn't happen + createMapper (T_u, 511, 256, 256 + carriers, permTable. data ()); + break; + + case 2: + createMapper (T_u, 127, 64, 64 + carriers, permTable. data ()); + break; + + case 3: + createMapper (T_u, 63, 32, 32 + carriers, permTable. data ()); + break; + + case 4: + createMapper (T_u, 255, 128, 128 + carriers, permTable. data ()); + break; + } +} +// +// + interLeaver::~interLeaver (void) { +} +// +// according to the standard, the map is a function from +// 0 .. 1535 -> -768 .. 768 (with exclusion of {0}) +int16_t interLeaver::mapIn (int16_t n) { + return permTable [n]; +} + + diff --git a/src/ofdm/ofdm-decoder.cpp b/src/ofdm/ofdm-decoder.cpp new file mode 100644 index 0000000..178f583 --- /dev/null +++ b/src/ofdm/ofdm-decoder.cpp @@ -0,0 +1,372 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Once the bits are "in", interpretation and manipulation + * should reconstruct the data blocks. + * Ofdm_decoder is called once every Ts samples, and + * its invocation results in 2 * Tu bits + */ +#include +#include "ofdm-decoder.h" +#include "radio.h" +#include "phasetable.h" +#include "fic-handler.h" +#include "msc-handler.h" +#include "freq-interleaver.h" +#include "dab-params.h" + +/** + * \brief ofdmDecoder + * The class ofdmDecoder is + * taking the data from the ofdmProcessor class in, and + * will extract the Tu samples, do an FFT and extract the + * carriers and map them on (soft) bits + * In the threaded version, a thread will run, fetch the + * data blocks asynchronously and do all computations. + * Threading is needed for e.g. the RPI 2 version + * In the non-threaded version, the functions in the class + * are just executed in the caller's thread + */ + ofdmDecoder::ofdmDecoder (RadioInterface *mr, + uint8_t dabMode, + int16_t bitDepth, + ficHandler *my_ficHandler, + mscHandler *my_mscHandler): + params (dabMode), + my_fftHandler (dabMode), +#ifdef __THREADED_DECODING + bufferSpace (params. get_L ()), +#endif + myMapper (dabMode) { +int16_t i; + this -> myRadioInterface = mr; +// + this -> my_ficHandler = my_ficHandler; + this -> my_mscHandler = my_mscHandler; + this -> T_s = params. get_T_s (); + this -> T_u = params. get_T_u (); + this -> nrBlocks = params. get_L (); + this -> carriers = params. get_carriers (); + ibits. resize (2 * this -> carriers); + + this -> T_g = T_s - T_u; + fft_buffer = my_fftHandler. getVector (); + phaseReference .resize (T_u); + + connect (this, SIGNAL (show_snr (int)), + mr, SLOT (show_snr (int))); + snrCount = 0; + snr = 0; + +#ifdef __THREADED_DECODING +/** + * When implemented in a thread, the thread controls the + * reading in of the data and processing the data through + * functions for handling block 0, FIC blocks and MSC blocks. + * + * We just create a large buffer where index i refers to block i. + * + */ + command = new std::complex * [nrBlocks]; + for (i = 0; i < nrBlocks; i ++) + command [i] = new std::complex [T_u]; + amount = 0; +#endif +} + + ofdmDecoder::~ofdmDecoder (void) { +int16_t i; +#ifdef __THREADED_DECODING + running. store (false); + while (isRunning ()) { + commandHandler. wakeAll (); + usleep (1000); + } + for (i = 0; i < nrBlocks; i ++) + delete[] command [i]; + delete[] command; +#endif + +} +// +// the client of this class should not know whether +// we run with a separate thread or not, +#ifndef __THREADED_DECODING +void ofdmDecoder::start (void) { +} +#endif + +void ofdmDecoder::stop (void) { +#ifdef __THREADED_DECODING + running. store (false); + while (isRunning ()) { + commandHandler. wakeAll (); + usleep (1000); + } +#endif +} + +void ofdmDecoder::reset (void) { +#ifdef __THREADED_DECODING + stop (); + usleep (10000); + start (); +#endif +} + +// + +#ifdef __THREADED_DECODING +/** + * The code in the thread executes a simple loop, + * waiting for the next block and executing the interpretation + * operation for that block. + * In our original code the block count was 1 higher than + * our count here. + */ +void ofdmDecoder::run (void) { +int16_t currentBlock = 0; + + running. store (true); + while (running. load ()) { + helper. lock (); + commandHandler. wait (&helper, 100); + helper. unlock (); + while ((amount > 0) && running. load ()) { + if (currentBlock == 0) + processBlock_0 (); + else + if (currentBlock < 4) + decodeFICblock (currentBlock); + else + decodeMscblock (currentBlock); + bufferSpace. release (1); + helper. lock (); + currentBlock = (currentBlock + 1) % (nrBlocks); + amount -= 1; + helper. unlock (); + } + } + fprintf (stderr, "ofdm decoder is closing down now\n"); +} +/** + * We need some functions to enter the ofdmProcessor data + * in the buffer. + */ +void ofdmDecoder::processBlock_0 (std::vector>vi) { + bufferSpace. acquire (1); + memcpy (command [0], vi. data (), sizeof (std::complex) * T_u); + helper. lock (); + amount ++; + commandHandler. wakeOne (); + helper. unlock (); +} + +void ofdmDecoder::decodeFICblock (std::vector> vi, + int32_t blkno) { + bufferSpace. acquire (1); + memcpy (command [blkno], &((vi. data ()) [T_g]), + sizeof (std::complex) * T_u); + helper. lock (); + amount ++; + commandHandler. wakeOne (); + helper. unlock (); +} + +void ofdmDecoder::decodeMscblock (std::vector > vi, + int32_t blkno) { + bufferSpace. acquire (1); + memcpy (command [blkno], &((vi. data ()) [T_g]), + sizeof (std::complex) * T_u); + helper. lock (); + amount ++; + commandHandler. wakeOne (); + helper. unlock (); +} +#endif +/** + * Note that the distinction, made in the ofdmProcessor class + * does not add much here, iff we decide to choose the multi core + * option definitely, then code may be simplified there. + */ + +/** + * handle block 0 as collected from the buffer + */ +#ifdef __THREADED_DECODING +void ofdmDecoder::processBlock_0 (void) { + + memcpy (fft_buffer, command [0], T_u * sizeof (std::complex)); +#else +void ofdmDecoder::processBlock_0 (std::vector > buffer) { + memcpy (fft_buffer, buffer. data (), + T_u * sizeof (std::complex)); +#endif + + my_fftHandler. do_FFT (); +/** + * The SNR is determined by looking at a segment of bins + * within the signal region and bits outside. + * It is just an indication + */ + + if (++snrCount > 10) { + snr = 0.8 * snr + 0.2 * get_snr (fft_buffer); + show_snr (snr); + snrCount = 0; + } +/** + * we are now in the frequency domain, and we keep the carriers + * as coming from the FFT as phase reference. + */ + memcpy (phaseReference. data (), fft_buffer, + T_u * sizeof (std::complex)); +} +// +/** + * for the other blocks of data, the first step is to go from + * time to frequency domain, to get the carriers. + * we distinguish between FIC blocks and other blocks, + * only to spare a test. The mapping code is the same + */ +static +int cnt = 0; +#ifdef __THREADED_DECODING +void ofdmDecoder::decodeFICblock (int32_t blkno) { +int16_t i; + memcpy (fft_buffer, command [blkno], T_u * sizeof (std::complex)); +#else +void ofdmDecoder::decodeFICblock (std::vector > buffer, + int32_t blkno) { +int16_t i; + memcpy (fft_buffer, &((buffer. data ()) [T_g]), + T_u * sizeof (std::complex)); +#endif + + +fftlabel: +/** + * first step: do the FFT + */ + my_fftHandler. do_FFT (); +/** + * a little optimization: we do not interchange the + * positive/negative frequencies to their right positions. + * The de-interleaving understands this + */ +toBitsLabel: +/** + * Note that from here on, we are only interested in the + * "carriers" useful carriers of the FFT output + */ + + for (i = 0; i < carriers; i ++) { + int16_t index = myMapper. mapIn (i); + if (index < 0) + index += T_u; +/** + * decoding is computing the phase difference between + * carriers with the same index in subsequent blocks. + * The carrier of a block is the reference for the carrier + * on the same position in the next block + */ + std::complex r1 = fft_buffer [index] * + conj (phaseReference [index]); + float ab1 = jan_abs (r1); +// split the real and the imaginary part and scale it +// we make the bits into softbits in the range -127 .. 127 + ibits [i] = - real (r1) / ab1 * 127.0; + ibits [carriers + i] = - imag (r1) / ab1 * 127.0; + } + memcpy (phaseReference. data (), fft_buffer, + T_u * sizeof (std::complex)); + +handlerLabel: + my_ficHandler -> process_ficBlock (ibits, blkno); +} +/** + * Msc block decoding is equal to FIC block decoding, + * further processing is different though + */ +#ifdef __THREADED_DECODING +void ofdmDecoder::decodeMscblock (int32_t blkno) { +int16_t i; + + memcpy (fft_buffer, command [blkno], T_u * sizeof (std::complex)); +#else +void ofdmDecoder::decodeMscblock (std::vector >buffer, + int32_t blkno) { +int16_t i; + memcpy (fft_buffer, &((buffer. data ())[T_g]), T_u * sizeof (std::complex)); +#endif + +fftLabel: + my_fftHandler. do_FFT (); +// +// Note that "mapIn" maps to -carriers / 2 .. carriers / 2 +// we did not set the fft output to low .. high +toBitsLabel: + for (i = 0; i < carriers; i ++) { + int16_t index = myMapper. mapIn (i); + if (index < 0) + index += T_u; + + std::complex r1 = fft_buffer [index] * + conj (phaseReference [index]); + float ab1 = jan_abs (r1); +// Recall: the viterbi decoder wants 127 max pos, - 127 max neg +// we make the bits into softbits in the range -127 .. 127 + ibits [i] = - real (r1) / ab1 * 127.0; + ibits [carriers + i] = - imag (r1) / ab1 * 127.0; + } + + memcpy (phaseReference. data (), fft_buffer, + T_u * sizeof (std::complex)); + +handlerLabel:; + my_mscHandler -> process_mscBlock (ibits, blkno); +} + +// +// +/** + * for the snr we have a full T_u wide vector, with in the middle + * K carriers. + * Just get the strength from the selected carriers compared + * to the strength of the carriers outside that region + */ +int16_t ofdmDecoder::get_snr (std::complex *v) { +int16_t i; +float noise = 0; +float signal = 0; + + for (i = -100; i < 100; i ++) + noise += abs (v [(T_u / 2 + i)]); + + noise /= 200; + for (i = - carriers / 4; i < carriers / 4; i ++) + signal += abs (v [(T_u + i) % T_u]); + signal /= (carriers / 2); + + return 20 * log10 ((signal + 0.005) / (noise + 0.005)); +} + + diff --git a/src/ofdm/phasereference.cpp b/src/ofdm/phasereference.cpp new file mode 100644 index 0000000..d48f0e9 --- /dev/null +++ b/src/ofdm/phasereference.cpp @@ -0,0 +1,206 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "phasereference.h" +#include "string.h" +#include "radio.h" +/** + * \class phaseReference + * Implements the correlation that is used to identify + * the "first" element (following the cyclic prefix) of + * the first non-null block of a frame + * The class inherits from the phaseTable. + */ + + phaseReference::phaseReference (RadioInterface *mr, + uint8_t dabMode, +#ifdef IMPULSE_RESPONSE + RingBuffer *b, +#endif + int16_t threshold, + int16_t diff_length): + phaseTable (dabMode), + params (dabMode), + my_fftHandler (dabMode) { +int32_t i; +float Phi_k; + +#ifdef IMPULSE_RESPONSE + this -> response = b; +#endif + this -> threshold = threshold; + this -> diff_length = diff_length; + this -> T_u = params. get_T_u (); + this -> carriers = params. get_carriers (); + + refTable. resize (T_u); + phaseDifferences. resize (diff_length); + fft_buffer = my_fftHandler. getVector (); + + framesperSecond = 2048000 / params. get_T_F (); + displayCounter = 0; + + memset (refTable. data (), 0, sizeof (std::complex) * T_u); + + for (i = 1; i <= params. get_carriers () / 2; i ++) { + Phi_k = get_Phi (i); + refTable [i] = std::complex (cos (Phi_k), sin (Phi_k)); + Phi_k = get_Phi (-i); + refTable [T_u - i] = std::complex (cos (Phi_k), sin (Phi_k)); + } +// +// prepare a table for the coarse frequency synchronization +// can be a static one, actually, we are only interested in +// the ones with a null + for (i = 1; i <= diff_length; i ++) + phaseDifferences [i - 1] = abs (arg (refTable [(T_u + i) % T_u] * + conj (refTable [(T_u + i + 1) % T_u]))); +#ifdef IMPULSE_RESPONSE + connect (this, SIGNAL (showImpulse (int)), + mr, SLOT (showImpulse (int))); +#endif +} + + phaseReference::~phaseReference (void) { +} + +/** + * \brief findIndex + * the vector v contains "T_u" samples that are believed to + * belong to the first non-null block of a DAB frame. + * We correlate the data in this vector with the predefined + * data, and if the maximum exceeds a threshold value, + * we believe that that indicates the first sample we were + * looking for. + */ + +int32_t phaseReference::findIndex (std::vector > v) { +int32_t i; +int32_t maxIndex = -1; +int32_t oldIndex = -1; +float sum = 0; +float Max = -1000; +float lbuf [T_u]; + + memcpy (fft_buffer, v. data (), T_u * sizeof (std::complex)); + my_fftHandler. do_FFT (); +// +// into the frequency domain, now correlate + for (i = 0; i < T_u; i ++) + fft_buffer [i] *= conj (refTable [i]); +// and, again, back into the time domain + my_fftHandler. do_IFFT (); +/** + * We compute the average and the max signal values + */ + for (i = 0; i < T_u; i ++) { + lbuf [i] = jan_abs (fft_buffer [i]); + sum += lbuf [i]; + if (lbuf [i] > Max) { + maxIndex = i; + Max = lbuf [i]; + } + } + +#ifdef IMPULSE_RESPONSE + if (++displayCounter > framesperSecond / 4) { + response -> putDataIntoBuffer (lbuf, T_u); + showImpulse (T_u); + displayCounter = 0; + } +#endif +/** + * that gives us a basis for defining the actual threshold value + */ + if (Max < threshold * sum / T_u) + return - abs (Max * T_u / sum) - 1; + else { + return maxIndex; + } +} + +// We investigate a sequence of phasedifferences that +// are known starting at real carrier 0. +// Phase of the carriers of the "real" block 0 may be +// quite different than the phase of the carriers of the "reference" +// block, plain correlation (i.e. sum (x, y, i) does not work well. +// What is a good measure though is looking at the phase differences +// between successive carriers in both the "real" block and the +// reference block. These should be more or less the same. +// So we just compute the phasedifference between phasedifferences +// as measured and as they should be. +// To keep things simple, we just look at the locations where +// the phasedifference with the successor should be 0 +// In previous versions we looked +// at the "weight" of the positive and negative carriers in the +// fft, but that did not work too well. +#define SEARCH_RANGE (2 * 35) +int16_t phaseReference::estimate_CarrierOffset (std::vector> v) { +int16_t i, j, index = 100; +float diff; +float computedDiffs [SEARCH_RANGE + diff_length + 1]; +int index_1 = 0; + + memcpy (fft_buffer, v. data (), T_u * sizeof (std::complex)); + my_fftHandler. do_FFT (); + + for (i = T_u - SEARCH_RANGE / 2; + i < T_u + SEARCH_RANGE / 2 + diff_length; i ++) + computedDiffs [i - (T_u - SEARCH_RANGE / 2)] = + abs (arg (fft_buffer [i % T_u] * conj (fft_buffer [(i + 1) % T_u]))); + + float Mmin = 1000; + for (i = T_u - SEARCH_RANGE /2; + i < T_u + SEARCH_RANGE / 2; i ++) { + float sum = 0; + + for (j = 1; j < diff_length; j ++) + if (phaseDifferences [j - 1] < 0.1) + sum += computedDiffs [i - (T_u - SEARCH_RANGE / 2) + j]; + if (sum < Mmin) { + Mmin = sum; + index = i; + } + } + + return index - T_u; +} +// +// NOT USED, just for some tests +// An alternative way to compute the small frequency offset +// is to look at the phase offset of subsequent carriers +// in block 0, compared to the values as computed from the +// reference block. +// The values are reasonably close to the values computed +// on the fly +#define LLENGTH 100 +float phaseReference::estimate_FrequencyOffset (std::vector > v) { +int16_t i, j; +float pd = 0; + + for (i = - LLENGTH / 2 ; i < LLENGTH / 2; i ++) { + std::complex a1 = refTable [(T_u + i) % T_u] * conj (refTable [(T_u + i + 1) % T_u]); + std::complex a2 = fft_buffer [(T_u + i) % T_u] * conj (fft_buffer [(T_u + i + 1) % T_u]); + pd += arg (a2) - arg (a1); + } + return pd / LLENGTH; +} + diff --git a/src/ofdm/phasetable.cpp b/src/ofdm/phasetable.cpp new file mode 100644 index 0000000..9f81905 --- /dev/null +++ b/src/ofdm/phasetable.cpp @@ -0,0 +1,185 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "phasetable.h" + +static +struct phasetableElement modeI_table [] = { + {-768, -737, 0, 1}, + {-736, -705, 1, 2}, + {-704, -673, 2, 0}, + {-672, -641, 3, 1}, + {-640, -609, 0, 3}, + {-608, -577, 1, 2}, + {-576, -545, 2, 2}, + {-544, -513, 3, 3}, + {-512, -481, 0, 2}, + {-480, -449, 1, 1}, + {-448, -417, 2, 2}, + {-416, -385, 3, 3}, + {-384, -353, 0, 1}, + {-352, -321, 1, 2}, + {-320, -289, 2, 3}, + {-288, -257, 3, 3}, + {-256, -225, 0, 2}, + {-224, -193, 1, 2}, + {-192, -161, 2, 2}, + {-160, -129, 3, 1}, + {-128, -97, 0, 1}, + {-96, -65, 1, 3}, + {-64, -33, 2, 1}, + {-32, -1, 3, 2}, + { 1, 32, 0, 3}, + { 33, 64, 3, 1}, + { 65, 96, 2, 1}, +// { 97, 128, 2, 1}, found bug 2014-09-03 Jorgen Scott + { 97, 128, 1, 1}, + { 129, 160, 0, 2}, + { 161, 192, 3, 2}, + { 193, 224, 2, 1}, + { 225, 256, 1, 0}, + { 257, 288, 0, 2}, + { 289, 320, 3, 2}, + { 321, 352, 2, 3}, + { 353, 384, 1, 3}, + { 385, 416, 0, 0}, + { 417, 448, 3, 2}, + { 449, 480, 2, 1}, + { 481, 512, 1, 3}, + { 513, 544, 0, 3}, + { 545, 576, 3, 3}, + { 577, 608, 2, 3}, + { 609, 640, 1, 0}, + { 641, 672, 0, 3}, + { 673, 704, 3, 0}, + { 705, 736, 2, 1}, + { 737, 768, 1, 1}, + { -1000, -1000, 0, 0} +}; + +struct phasetableElement modeII_table [] = { + {-192, -161, 0, 2}, + {-160, -129, 1, 3}, + {-128, -97, 2, 2}, + {-96, -65, 3, 2}, + {-64, -33, 0, 1}, + {-32, -1, 1, 2}, + {1, 32, 2, 0}, + {33, 64, 1, 2}, + {65, 96, 0, 2}, + {97, 128, 3, 1}, + {129, 160, 2, 0}, + {161, 192, 1, 3}, + {-1000, -1000, 0, 0} +}; + +struct phasetableElement modeIV_table [] = { + {-384, -353, 0, 0}, + {-352, -321, 1, 1}, + {-320, -289, 2, 1}, + {-288, -257, 3, 2}, + {-256, -225, 0, 2}, + {-224, -193, 1, 2}, + {-192, -161, 2, 0}, + {-160, -129, 3, 3}, + {-128, -97, 0, 3}, + {-96, -65, 1, 1}, + {-64, -33, 2, 3}, + {-32, -1, 3, 2}, + { 1, 32, 0, 0}, + { 33, 64, 3, 1}, + { 65, 96, 2, 0}, + { 97, 128, 1, 2}, + { 129, 160, 0, 0}, + { 161, 192, 3, 1}, + { 193, 224, 2, 2}, + { 225, 256, 1, 2}, + { 257, 288, 0, 2}, + { 289, 320, 3, 1}, + { 321, 352, 2, 3}, + { 353, 384, 1, 0}, + {-1000, -1000, 0, 0} +}; + + phaseTable::phaseTable (int16_t modus) { + Mode = modus; + currentTable = modeI_table; + switch (Mode) { + default: + case 1: + currentTable = modeI_table; + break; + + case 2: + currentTable = modeII_table; + break; + + case 4: + currentTable = modeIV_table; + break; + } +} + + phaseTable::~phaseTable (void) { +} + +static +const int8_t h0 [] = {0, 2, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 2, 2, 1, 1, + 0, 2, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 2, 2, 1, 1}; +static +const int8_t h1 [] = {0, 3, 2, 3, 0, 1, 3, 0, 2, 1, 2, 3, 2, 3, 3, 0, + 0, 3, 2, 3, 0, 1, 3, 0, 2, 1, 2, 3, 2, 3, 3, 0}; +static +const int8_t h2 [] = {0, 0, 0, 2, 0, 2, 1, 3, 2, 2, 0, 2, 2, 0, 1, 3, + 0, 0, 0, 2, 0, 2, 1, 3, 2, 2, 0, 2, 2, 0, 1, 3}; +static +const int8_t h3 [] = {0, 1, 2, 1, 0, 3, 3, 2, 2, 3, 2, 1, 2, 1, 3, 2, + 0, 1, 2, 1, 0, 3, 3, 2, 2, 3, 2, 1, 2, 1, 3, 2}; + +int32_t phaseTable::h_table (int32_t i, int32_t j) { + switch (i) { + case 0: + return h0 [j]; + case 1: + return h1 [j]; + case 2: + return h2 [j]; + default: + case 3: + return h3 [j]; + } +} + +float phaseTable::get_Phi (int32_t k) { +int32_t k_prime, i, j, n = 0; + + for (j = 0; currentTable [j]. kmin != -1000; j ++) { + if ((currentTable [j]. kmin <= k) && (k <= currentTable [j]. kmax)) { + k_prime = currentTable [j]. kmin; + i = currentTable [j]. i; + n = currentTable [j]. n; + return M_PI / 2 * (h_table (i, k - k_prime) + n); + } + } + fprintf (stderr, "Help with %d\n", k); + return 0; +} + diff --git a/src/ofdm/sample-reader.cpp b/src/ofdm/sample-reader.cpp new file mode 100644 index 0000000..63b5c69 --- /dev/null +++ b/src/ofdm/sample-reader.cpp @@ -0,0 +1,204 @@ +# +/* + * Copyright (C) 2013 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +# +#include "sample-reader.h" +#include "radio.h" + +static inline +int16_t valueFor (int16_t b) { +int16_t res = 1; + while (--b > 0) + res <<= 1; + return res; +} + + sampleReader::sampleReader (RadioInterface *mr, + virtualInput *theRig + ,RingBuffer> *spectrumBuffer + ) { +int i; + this -> theRig = theRig; + bufferSize = 32768; + this -> spectrumBuffer = spectrumBuffer; + connect (this, SIGNAL (show_Spectrum (int)), + mr, SLOT (showSpectrum (int))); + localBuffer. resize (bufferSize); + localCounter = 0; + connect (this, SIGNAL (show_Corrector (int)), + mr, SLOT (set_CorrectorDisplay (int))); + currentPhase = 0; + sLevel = 0; + spectrum = true; + sampleCount = 0; + oscillatorTable = new std::complex [INPUT_RATE]; + for (i = 0; i < INPUT_RATE; i ++) + oscillatorTable [i] = std::complex + (cos (2.0 * M_PI * i / INPUT_RATE), + sin (2.0 * M_PI * i / INPUT_RATE)); + + bufferContent = 0; + corrector = 0; + dumpfilePointer. store (NULL); + dumpIndex = 0; + dumpScale = valueFor (theRig -> bitDepth ()); +} + + sampleReader::~sampleReader (void) { + delete[] oscillatorTable; +} + +void sampleReader::setSpectrum (bool b) { + spectrum = b; +} + +void sampleReader::setRunning (bool b) { + running. store (b); +} + +float sampleReader::get_sLevel (void) { + return sLevel; +} + +std::complex sampleReader::getSample (int32_t phaseOffset) { +std::complex temp; + + corrector = phaseOffset; + if (!running. load ()) + throw 21; + +/// bufferContent is an indicator for the value of ... -> Samples () + if (bufferContent == 0) { + bufferContent = theRig -> Samples (); + while ((bufferContent <= 2048) && running. load ()) { + usleep (10); + bufferContent = theRig -> Samples (); + } + } + + if (!running. load ()) + throw 20; +// +// so here, bufferContent > 0 + theRig -> getSamples (&temp, 1); + bufferContent --; + if (dumpfilePointer. load () != NULL) { + dumpBuffer [2 * dumpIndex ] = real (temp) * dumpScale; + dumpBuffer [2 * dumpIndex + 1] = imag (temp) * dumpScale; + if ( ++dumpIndex >= DUMPSIZE / 2) { + sf_writef_short (dumpfilePointer. load (), + dumpBuffer, dumpIndex); + dumpIndex = 0; + } + } + + if (localCounter < bufferSize) + localBuffer [localCounter ++] = temp; +// +// OK, we have a sample!! +// first: adjust frequency. We need Hz accuracy + currentPhase -= phaseOffset; + currentPhase = (currentPhase + INPUT_RATE) % INPUT_RATE; + + temp *= oscillatorTable [currentPhase]; + sLevel = 0.00001 * jan_abs (temp) + (1 - 0.00001) * sLevel; +#define N 5 + sampleCount ++; + if (++ sampleCount > INPUT_RATE / N) { + show_Corrector (corrector); + sampleCount = 0; + if (spectrum) { + spectrumBuffer -> putDataIntoBuffer (localBuffer. data (), + localCounter); + emit show_Spectrum (bufferSize); + } + localCounter = 0; + } + return temp; +} + +void sampleReader::getSamples (std::complex *v, + int16_t n, int32_t phaseOffset) { +int32_t i; + + corrector = phaseOffset; + if (!running. load ()) + throw 21; + if (n > bufferContent) { + bufferContent = theRig -> Samples (); + while ((bufferContent < n) && running. load ()) { + usleep (10); + bufferContent = theRig -> Samples (); + } + } + + if (!running. load ()) + throw 20; +// +// so here, bufferContent >= n + n = theRig -> getSamples (v, n); + bufferContent -= n; + if (dumpfilePointer. load () != NULL) { + for (i = 0; i < n; i ++) { + dumpBuffer [2 * dumpIndex ] = real (v [i]) * dumpScale; + dumpBuffer [2 * dumpIndex + 1] = imag (v [i]) * dumpScale; + if (++dumpIndex >= DUMPSIZE / 2) { + sf_writef_short (dumpfilePointer. load (), + dumpBuffer, dumpIndex); + dumpIndex = 0; + } + } + } + +// OK, we have samples!! +// first: adjust frequency. We need Hz accuracy + for (i = 0; i < n; i ++) { + currentPhase -= phaseOffset; +// +// Note that "phase" itself might be negative + currentPhase = (currentPhase + INPUT_RATE) % INPUT_RATE; + if (localCounter < bufferSize) + localBuffer [localCounter ++] = v [i]; + v [i] *= oscillatorTable [currentPhase]; + sLevel = 0.00001 * jan_abs (v [i]) + (1 - 0.00001) * sLevel; + } + + sampleCount += n; + if (sampleCount > INPUT_RATE / N) { + show_Corrector (corrector); + if (spectrum) { + spectrumBuffer -> putDataIntoBuffer (localBuffer. data (), + bufferSize); + emit show_Spectrum (bufferSize); + } + localCounter = 0; + sampleCount = 0; + } +} + +void sampleReader::startDumping (SNDFILE *f) { + dumpfilePointer. store (f); +} + +void sampleReader::stopDumping (void) { + dumpfilePointer. store (NULL); +} + diff --git a/src/output/Qt-audio.cpp b/src/output/Qt-audio.cpp new file mode 100644 index 0000000..d726110 --- /dev/null +++ b/src/output/Qt-audio.cpp @@ -0,0 +1,106 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * Many of the ideas as implemented in Qt-DAB are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are acknowledged. + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include "Qt-audiodevice.h" +#include "Qt-audio.h" + + Qt_Audio::Qt_Audio (void) { + Buffer = new RingBuffer (8 * 32768); + outputRate = 48000; // default + theAudioDevice = new Qt_AudioDevice (Buffer, this); + theAudioOutput = NULL; + setParams (outputRate); +} + + Qt_Audio::~Qt_Audio(void) { + if (theAudioOutput != NULL) + delete theAudioOutput; + delete theAudioDevice; + delete Buffer; +} +// +// Note that audioBase functions have - if needed - the rate +// converted. This functions overrides the one in audioBase +void Qt_Audio::audioOutput (float *fragment, int32_t size) { + if (theAudioDevice != NULL) { + Buffer -> putDataIntoBuffer (fragment, 2 * size); + } +} + +void Qt_Audio::setParams (int outputRate) { + if (theAudioOutput != NULL) { + delete theAudioOutput; + theAudioOutput = NULL; + } + + AudioFormat. setSampleRate (outputRate); + AudioFormat. setChannelCount (2); + AudioFormat. setSampleSize (sizeof (float) * 8); + AudioFormat. setCodec ("audio/pcm"); + AudioFormat. setByteOrder (QAudioFormat::LittleEndian); + AudioFormat. setSampleType (QAudioFormat::Float); + + QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice ()); + if (!info. isFormatSupported(AudioFormat)) { + fprintf (stderr, "Audio: Sorry, format cannot be handled"); + return; + } + + theAudioOutput = new QAudioOutput(AudioFormat, this); + connect (theAudioOutput, SIGNAL (stateChanged (QAudio::State)), + this, SLOT (handleStateChanged (QAudio::State))); + + restart (); + currentState = theAudioOutput -> state (); +} + +void Qt_Audio::stop (void) { + if (theAudioDevice == NULL) + return; + theAudioDevice -> stop (); + theAudioOutput -> stop(); +} + +void Qt_Audio::restart (void) { + if (theAudioDevice == NULL) + return; + theAudioDevice -> start (); + theAudioOutput -> start (theAudioDevice); +} + +void Qt_Audio::handleStateChanged (QAudio::State newState) { + currentState = newState; + switch (currentState) { + case QAudio::IdleState: + theAudioOutput -> stop(); + break; + + default: + break; + } +} diff --git a/src/output/Qt-audiodevice.cpp b/src/output/Qt-audiodevice.cpp new file mode 100644 index 0000000..7fb9d92 --- /dev/null +++ b/src/output/Qt-audiodevice.cpp @@ -0,0 +1,66 @@ +# +/* + * Copyright (C) 2014 .. 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "Qt-audiodevice.h" +// +// Create a "device" +Qt_AudioDevice::Qt_AudioDevice (RingBuffer* Buffer, + QObject* parent) : QIODevice(parent) { + this -> Buffer = Buffer; +} + +Qt_AudioDevice::~Qt_AudioDevice (void) { +} + +void Qt_AudioDevice::start (void) { + open(QIODevice::ReadOnly); +} + +void Qt_AudioDevice::stop (void) { + Buffer -> FlushRingBuffer (); + close (); +} +// +// we always return "len" bytes +qint64 Qt_AudioDevice::readData (char* buffer, qint64 maxSize) { +qint64 amount = 0; + +// "maxSize" is the requested size in bytes +// "amount" is in floats + amount = Buffer -> getDataFromBuffer (buffer, maxSize / sizeof (float)); + + if (sizeof (float) * amount < maxSize) { + int16_t i; + for (i = amount * sizeof (float); i < maxSize; i ++) + buffer [i] = 0; + } + + return maxSize; +} +// +// usused here +qint64 Qt_AudioDevice::writeData (const char* data, qint64 len) { + Q_UNUSED (data); + Q_UNUSED (len); + return 0; +} + diff --git a/src/output/audio-base.cpp b/src/output/audio-base.cpp new file mode 100644 index 0000000..4496618 --- /dev/null +++ b/src/output/audio-base.cpp @@ -0,0 +1,192 @@ +# +/* + * Copyright (C) 2011, 2012, 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "audio-base.h" +#include + +/* + * The class is the abstract sink for the data generated + * It will handle the "dumping" though and assume that + * someone else will handle the PCM samples, all made + * on a rate of 48000 + */ + audioBase::audioBase (void): + converter_16 (16000, 48000, 2 * 1600), + converter_24 (24000, 48000, 2 * 2400), + converter_32 (32000, 48000, 2 * 3200) { + dumpFile = NULL; +} + + audioBase::~audioBase (void) { +} + +void audioBase::restart (void) { +} + +void audioBase::stop (void) { +} +// +// This one is a hack for handling different baudrates coming from +// the aac decoder. call is from the GUI, triggered by the +// aac decoder or the mp3 decoder +void audioBase::audioOut (int16_t *V, int32_t amount, int32_t rate) { +//int16_t V [rate / 5]; + + switch (rate) { + case 16000: + audioOut_16000 (V, amount / 2); + return; + case 24000: + audioOut_24000 (V, amount / 2); + return; + case 32000: + audioOut_32000 (V, amount / 2); + return; + default: + case 48000: + audioOut_48000 (V, amount / 2); + return; + } +} +// +// scale up from 16 -> 48 +// amount gives number of pairs +void audioBase::audioOut_16000 (int16_t *V, int32_t amount) { +std::complex outputBuffer [converter_16. getOutputsize ()]; +float buffer [2 * converter_16. getOutputsize ()]; +int16_t i, j; +int32_t result; + + for (i = 0; i < amount; i ++) + if (converter_16. + convert (std::complex (V [2 * i] / 32767.0, + V [2 * i + 1] / 32767.0), + outputBuffer, &result)) { + for (j = 0; j < result; j ++) { + buffer [2 * j ] = real (outputBuffer [j]); + buffer [2 * j + 1] = imag (outputBuffer [j]); + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, result); + myLocker. unlock (); + + audioOutput (buffer, result); + } +} + +// scale up from 24000 -> 48000 +// amount gives number of pairs +void audioBase::audioOut_24000 (int16_t *V, int32_t amount) { +std::complex outputBuffer [converter_24. getOutputsize ()]; +float buffer [2 * converter_24. getOutputsize ()]; +int16_t i, j; +int32_t result; + + for (i = 0; i < amount; i ++) + if (converter_24. + convert (std::complex (V [2 * i] / 32767.0, + V [2 * i + 1] / 32767.0), + outputBuffer, &result)) { + for (j = 0; j < result; j ++) { + buffer [2 * j ] = real (outputBuffer [j]); + buffer [2 * j + 1] = imag (outputBuffer [j]); + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, result); + myLocker. unlock (); + + audioOutput (buffer, result); + } +} + +// scale up from 32000 -> 48000 +// amount is number of pairs +void audioBase::audioOut_32000 (int16_t *V, int32_t amount) { +std::complex outputBuffer [converter_32. getOutputsize ()]; +float buffer [2 * converter_32. getOutputsize ()]; +int32_t i, j; +int32_t result; + + for (i = 0; i < amount; i ++) { + if (converter_32. + convert (std::complex (V [2 * i] / 32767.0, + V [2 * i + 1] / 32767.0), + outputBuffer, &result)) { + for (j = 0; j < result; j ++) { + buffer [2 * j ] = real (outputBuffer [j]); + buffer [2 * j + 1] = imag (outputBuffer [j]); + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, result); + myLocker. unlock (); +// fprintf (stderr, "result %d\n", result); + audioOutput (buffer, result); + } + } +} + +void audioBase::audioOut_48000 (int16_t *V, int32_t amount) { +float *buffer = (float *)alloca (2 * amount * sizeof (float)); +int32_t i; + + for (i = 0; i < amount; i ++) { + buffer [2 * i] = V [2 * i] / 32767.0; + buffer [2 * i + 1] = V [2 * i + 1] / 32767.0; + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, amount); + myLocker. unlock (); + audioOutput (buffer, amount); +} +// +// we ensure that no one is fiddling with the dumpfile +// while we are writing +void audioBase::startDumping (SNDFILE *f) { + myLocker. lock (); + dumpFile = f; + myLocker. unlock (); +} + +void audioBase::stopDumping (void) { + myLocker. lock (); + dumpFile = NULL; + myLocker. unlock (); +} + +// +// The audioOut function is the one that really should be +// reimplemented in the offsprings of this class +void audioBase::audioOutput (float *v, int32_t amount) { + fprintf (stderr, "xx"); + (void)v; + (void)amount; +} + diff --git a/src/output/audio-base.cpp-new b/src/output/audio-base.cpp-new new file mode 100644 index 0000000..3ec4e7e --- /dev/null +++ b/src/output/audio-base.cpp-new @@ -0,0 +1,200 @@ +# +/* + * Copyright (C) 2011, 2012, 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "audio-base.h" +#include + +/* + * The class is the abstract sink for the data generated + * It will handle the "dumping" though + */ + audioBase::audioBase (void): + converter_16 (16000, 48000, 2 * 1600), + converter_24 (24000, 48000, 2 * 2400), + converter_32 (32000, 48000, 16000) { + dumpFile = NULL; +} + + audioBase::~audioBase (void) { +} + +void audioBase::restart (void) { +} + +void audioBase::stop (void) { +} +// +// This one is a hack for handling different baudrates coming from +// the aac decoder. call is from the GUI, triggered by the +// aac decoder or the mp3 decoder +void audioBase::audioOut (int16_t *V, int32_t amount, int32_t rate) { +//int16_t V [rate / 5]; + + switch (rate) { + case 16000: + audioOut_16000 (V, amount / 2); + return; + case 24000: + audioOut_24000 (V, amount / 2); + return; + case 32000: + audioOut_32000 (V, amount / 2); + return; + default: + case 48000: + audioOut_48000 (V, amount / 2); + return; + } +} +// +// scale up from 16 -> 48 +// amount gives number of pairs +void audioBase::audioOut_16000 (int16_t *V, int32_t amount) { +std::complex outputBuffer [converter_16. getOutputsize ()]; +float buffer [2 * converter_16. getOutputsize ()]; +int16_t i, j; +int32_t result; + + for (i = 0; i < amount; i ++) + if (converter_16. + convert (std::complex (V [2 * i] / 32767.0, + V [2 * i + 1] / 32767.0), + outputBuffer, &result)) { + for (j = 0; j < result; j ++) { + buffer [2 * j ] = real (outputBuffer [j]); + buffer [2 * j + 1] = imag (outputBuffer [j]); + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, result); + myLocker. unlock (); + + audioOutput (buffer, result); + } +} + +// scale up from 24000 -> 48000 +// amount gives number of pairs +void audioBase::audioOut_24000 (int16_t *V, int32_t amount) { +std::complex outputBuffer [converter_24. getOutputsize ()]; +float buffer [2 * converter_24. getOutputsize ()]; +int16_t i, j; +int32_t result; + + for (i = 0; i < amount; i ++) + if (converter_24. + convert (std::complex (V [2 * i] / 32767.0, + V [2 * i + 1] / 32767.0), + outputBuffer, &result)) { + for (j = 0; j < result; j ++) { + buffer [2 * j ] = real (outputBuffer [j]); + buffer [2 * j + 1] = imag (outputBuffer [j]); + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, result); + myLocker. unlock (); + + audioOutput (buffer, result); + } +} + +static int incount = 0; +static int outcount = 0; +// scale up from 32000 -> 48000 +// amount is number of pairs +void audioBase::audioOut_32000 (int16_t *V, int32_t amount) { +std::complex outputBuffer [converter_32. getOutputsize ()]; +float buffer [2 * converter_32. getOutputsize ()]; +int32_t i, j; +int32_t result; + + incount += amount; + for (i = 0; i < amount; i ++) { + if (converter_32. + convert (std::complex (V [2 * i] / 32767.0, + V [2 * i + 1] / 32767.0), + outputBuffer, &result)) { + outcount += result; + for (j = 0; j < result; j ++) { + buffer [2 * j ] = real (outputBuffer [j]); + buffer [2 * j + 1] = imag (outputBuffer [j]); + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, result); + myLocker. unlock (); +// fprintf (stderr, "result %d\n", result); + audioOutput (buffer, result); + } + } + + if (outcount > 48000) { + fprintf (stderr, "incount %d outcount %d \n", + incount, outcount); + incount = outcount = 0; + } +} + +void audioBase::audioOut_48000 (int16_t *V, int32_t amount) { +float *buffer = (float *)alloca (2 * amount * sizeof (float)); +int32_t i; + + for (i = 0; i < amount; i ++) { + buffer [2 * i] = V [2 * i] / 32767.0; + buffer [2 * i + 1] = V [2 * i + 1] / 32767.0; + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, amount); + myLocker. unlock (); + audioOutput (buffer, amount); +} +// +// we ensure that no one is fiddling with the dumpfile +// while we are writing +void audioBase::startDumping (SNDFILE *f) { + myLocker. lock (); + dumpFile = f; + myLocker. unlock (); +} + +void audioBase::stopDumping (void) { + myLocker. lock (); + dumpFile = NULL; + myLocker. unlock (); +} + +// +// The audioOut function is the one that really should be +// reimplemented in the offsprings of this class +void audioBase::audioOutput (float *v, int32_t amount) { + fprintf (stderr, "xx"); + (void)v; + (void)amount; +} + diff --git a/src/output/audio-base.cpp-old b/src/output/audio-base.cpp-old new file mode 100644 index 0000000..aa12e54 --- /dev/null +++ b/src/output/audio-base.cpp-old @@ -0,0 +1,191 @@ +# +/* + * Copyright (C) 2011, 2012, 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the SDR-J. + * Many of the ideas as implemented in SDR-J are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "audio-base.h" +#include + +/* + * The class is the abstract sink for the data generated + * It will handle the "dumping" though + */ + audioBase::audioBase (void): + f_16000 (5, 8000, 48000), + f_24000 (5, 12000, 48000), + f_32000 (5, 16000, 96000) { + buffer = b; + dumpFile = NULL; +} + + audioBase::~audioBase (void) { +} + +void audioBase::restart (void) { +} + +void audioBase::stop (void) { +} +// +// This one is a hack for handling different baudrates coming from +// the aac decoder +void audioBase::audioOut (int16_t *V, int32_t amount, int32_t rate) { + + switch (rate) { + case 16000: + audioOut_16000 (V, amount / 2); + return; + case 24000: + audioOut_24000 (V, amount / 2); + return; + case 32000: + audioOut_32000 (V, amount / 2); + return; + default: + case 48000: + audioOut_48000 (V, amount / 2); + return; + } + } +} +// +// scale up from 16 -> 48 +void audioBase::audioOut_16000 (int16_t *V, int32_t amount) { +float *buffer = (float *)alloca (3 * 2 * amount * sizeof (float)); +int32_t i; + + for (i = 0; i < amount; i ++) { + DSPCOMPLEX help = DSPCOMPLEX (float (V [2 * i]) / 32767.0, + float (V [2 * i + 1]) / 32767.0); + help = f_16000. Pass (help); + buffer [6 * i] = real (help); + buffer [6 * i + 1] = imag (help); + help = f_16000. Pass (DSPCOMPLEX (0, 0)); + buffer [6 * i + 2] = real (help); + buffer [6 * i + 3] = imag (help); + help = f_16000. Pass (DSPCOMPLEX (0, 0)); + buffer [6 * i + 4] = real (help); + buffer [6 * i + 5] = imag (help); + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, 3 * amount); + myLocker. unlock (); + + audioOutput (buffer, 3 * amount); +} + +// +// amount gives number of pairs +void audioBase::audioOut_24000 (int16_t *V, int32_t amount) { +float *buffer = (float *)alloca (4 * amount * sizeof (float)); +int32_t i; + + for (i = 0; i < amount; i ++) { + DSPCOMPLEX help = DSPCOMPLEX (float (V [2 * i]) / 32767.0, + float (V [2 * i + 1]) / 32767.0); + help = f_24000. Pass (help); + buffer [4 * i] = real (help); + buffer [4 * i + 1] = imag (help); + help = f_24000. Pass (DSPCOMPLEX (0, 0)); + buffer [4 * i + 2] = real (help); + buffer [4 * i + 3] = imag (help); + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, 2 * amount); + myLocker. unlock (); + + audioOutput (buffer, 2 * amount); +} +// +// Conversion from 32 -> 48 is by first converting to 96000 +// and then back to 48000 +void audioBase::audioOut_32000 (int16_t *V, int32_t amount) { +DSPCOMPLEX *buffer_1 = (DSPCOMPLEX *)alloca (3 * amount * sizeof (DSPCOMPLEX)); +float *buffer = (float *)alloca (2 * 3 * amount / 2 * sizeof (float)); +int32_t i; + + for (i = 0; i < amount; i ++) { + DSPCOMPLEX help = DSPCOMPLEX (float (V [2 * i]) / 32767.0, + float (V [2 * i + 1]) / 32767.0); + buffer_1 [3 * i + 0] = f_32000. Pass (help); + buffer_1 [3 * i + 1] = f_32000. Pass (DSPCOMPLEX (0, 0)); + buffer_1 [3 * i + 2] = f_32000. Pass (DSPCOMPLEX (0, 0)); + } +// +// Note that although we use "2 * i" for index left and right +// they mean different things + for (i = 0; i < 3 * amount / 2; i ++) { + buffer [2 * i] = real (buffer_1 [2 * i]); + buffer [2 * i + 1] = imag (buffer_1 [2 * i]); + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, 3 * amount / 2); + myLocker. unlock (); + + audioOutput (buffer, 3 * amount / 2); +} + +void audioBase::audioOut_48000 (int16_t *V, int32_t amount) { +float *buffer = (float *)alloca (2 * amount * sizeof (float)); +int32_t i, n; + + for (i = 0; i < amount; i ++) { + buffer [2 * i] = V [2 * i] / 32767.0; + buffer [2 * i + 1] = V [2 * i + 1] / 32767.0; + } + + myLocker. lock (); + if (dumpFile != NULL) + sf_writef_float (dumpFile, (float *)buffer, amount); + myLocker. unlock (); + audioOutput (buffer, amount); +} +// +void audioBase::startDumping (SNDFILE *f) { + myLocker. lock (); + dumpFile = f; + myLocker. unlock (); +} + +void audioBase::stopDumping (void) { + myLocker. lock (); + dumpFile = NULL; + myLocker. unlock (); +} + +// +// The audioOut function is the one that really should be +// reimplemented in the offsprings of this class +void audioBase::audioOutput (float *v, int32_t amount) { + (void)v; + (void)amount; +} + diff --git a/src/output/audiosink.cpp b/src/output/audiosink.cpp new file mode 100644 index 0000000..7c0ff05 --- /dev/null +++ b/src/output/audiosink.cpp @@ -0,0 +1,283 @@ +# +/* + * Copyright (C) 2011, 2012, 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "audiosink.h" +#include +#include +#include +#include + + audioSink::audioSink (int16_t latency) { +int32_t i; + this -> latency = latency; + if (latency <= 0) + latency = 1; + this -> CardRate = 48000; + _O_Buffer = new RingBuffer(4 * 32768); + portAudio = false; + writerRunning = false; + if (Pa_Initialize () != paNoError) { + fprintf (stderr, "Initializing Pa for output failed\n"); + return; + } + + portAudio = true; + + qDebug ("Hostapis: %d\n", Pa_GetHostApiCount ()); + + for (i = 0; i < Pa_GetHostApiCount (); i ++) + qDebug ("Api %d is %s\n", i, Pa_GetHostApiInfo (i) -> name); + + numofDevices = Pa_GetDeviceCount (); + outTable = new int16_t [numofDevices + 1]; + for (i = 0; i < numofDevices; i ++) + outTable [i] = -1; + ostream = NULL; +} + + audioSink::~audioSink (void) { + if ((ostream != NULL) && !Pa_IsStreamStopped (ostream)) { + paCallbackReturn = paAbort; + (void) Pa_AbortStream (ostream); + while (!Pa_IsStreamStopped (ostream)) + Pa_Sleep (1); + writerRunning = false; + } + + if (ostream != NULL) + Pa_CloseStream (ostream); + + if (portAudio) + Pa_Terminate (); + + delete _O_Buffer; + delete[] outTable; +} + +bool audioSink::selectDevice (int16_t idx) { +PaError err; +int16_t outputDevice; + + if (idx == 0) + return false; + + outputDevice = outTable [idx]; + if (!isValidDevice (outputDevice)) { + fprintf (stderr, "invalid device (%d) selected\n", outputDevice); + return false; + } + + if ((ostream != NULL) && !Pa_IsStreamStopped (ostream)) { + paCallbackReturn = paAbort; + (void) Pa_AbortStream (ostream); + while (!Pa_IsStreamStopped (ostream)) + Pa_Sleep (1); + writerRunning = false; + } + + if (ostream != NULL) + Pa_CloseStream (ostream); + + outputParameters. device = outputDevice; + outputParameters. channelCount = 2; + outputParameters. sampleFormat = paFloat32; + outputParameters. suggestedLatency = + Pa_GetDeviceInfo (outputDevice) -> + defaultHighOutputLatency; +// bufSize = (int)((float)outputParameters. suggestedLatency * latency); +// +// A small buffer causes more callback invocations, sometimes +// causing underflows and intermittent output. +// buffersize is + + bufSize = latency * 512; + + outputParameters. hostApiSpecificStreamInfo = NULL; +// + fprintf (stderr, "Suggested size for outputbuffer = %d\n", bufSize); + err = Pa_OpenStream (&ostream, + NULL, + &outputParameters, + CardRate, + bufSize, + 0, + this -> paCallback_o, + this + ); + + if (err != paNoError) { + qDebug ("Open ostream error\n"); + return false; + } + fprintf (stderr, "stream opened\n"); + paCallbackReturn = paContinue; + err = Pa_StartStream (ostream); + if (err != paNoError) { + qDebug ("Open startstream error\n"); + return false; + } + fprintf (stderr, "stream started\n"); + writerRunning = true; + return true; +} + +void audioSink::restart (void) { +PaError err; + + if (!Pa_IsStreamStopped (ostream)) + return; + + _O_Buffer -> FlushRingBuffer (); + paCallbackReturn = paContinue; + err = Pa_StartStream (ostream); + if (err == paNoError) + writerRunning = true; +} + +void audioSink::stop (void) { + if (Pa_IsStreamStopped (ostream)) + return; + + paCallbackReturn = paAbort; + (void)Pa_StopStream (ostream); + while (!Pa_IsStreamStopped (ostream)) + Pa_Sleep (1); + writerRunning = false; +} +// +// helper +bool audioSink::OutputrateIsSupported (int16_t device, int32_t Rate) { +PaStreamParameters *outputParameters = + (PaStreamParameters *)alloca (sizeof (PaStreamParameters)); + + outputParameters -> device = device; + outputParameters -> channelCount = 2; /* I and Q */ + outputParameters -> sampleFormat = paFloat32; + outputParameters -> suggestedLatency = 0; + outputParameters -> hostApiSpecificStreamInfo = NULL; + + return Pa_IsFormatSupported (NULL, outputParameters, Rate) == + paFormatIsSupported; +} +/* + * ... and the callback + */ +static int theMissed = 0; + +int audioSink::paCallback_o ( + const void* inputBuffer, + void* outputBuffer, + unsigned long framesPerBuffer, + const PaStreamCallbackTimeInfo *timeInfo, + PaStreamCallbackFlags statusFlags, + void *userData) { +RingBuffer *outB; +float *outp = (float *)outputBuffer; +audioSink *ud = reinterpret_cast (userData); +uint32_t actualSize; +uint32_t i; + (void)statusFlags; + (void)inputBuffer; + (void)timeInfo; + if (ud -> paCallbackReturn == paContinue) { + outB = (reinterpret_cast < audioSink *> (userData)) -> _O_Buffer; + actualSize = outB -> getDataFromBuffer (outp, 2 * framesPerBuffer); + theMissed += 2 * framesPerBuffer - actualSize; + for (i = actualSize; i < 2 * framesPerBuffer; i ++) + outp [i] = 0; + } + + return ud -> paCallbackReturn; +} + +int32_t audioSink::missed (void) { +int32_t h = theMissed; + theMissed = 0; + return h / 2; +} + +void audioSink::audioOutput (float *b, int32_t amount) { + _O_Buffer -> putDataIntoBuffer (b, 2 * amount); +} + +QString audioSink::outputChannelwithRate (int16_t ch, int32_t rate) { +const PaDeviceInfo *deviceInfo; +QString name = QString (""); + + if ((ch < 0) || (ch >= numofDevices)) + return name; + + deviceInfo = Pa_GetDeviceInfo (ch); + if (deviceInfo == NULL) + return name; + if (deviceInfo -> maxOutputChannels <= 0) + return name; + + if (OutputrateIsSupported (ch, rate)) + name = QString (deviceInfo -> name); + return name; +} + +int16_t audioSink::invalidDevice (void) { + return numofDevices + 128; +} + +bool audioSink::isValidDevice (int16_t dev) { + return 0 <= dev && dev < numofDevices; +} + +bool audioSink::selectDefaultDevice (void) { + return selectDevice (Pa_GetDefaultOutputDevice ()); +} + +int32_t audioSink::cardRate (void) { + return 48000; +} + +bool audioSink::setupChannels (QComboBox *streamOutSelector) { +uint16_t ocnt = 1; +uint16_t i; + + for (i = 0; i < numofDevices; i ++) { + const QString so = + outputChannelwithRate (i, 48000); + qDebug ("Investigating Device %d\n", i); + + if (so != QString ("")) { + streamOutSelector -> insertItem (ocnt, so, QVariant (i)); + outTable [ocnt] = i; + qDebug (" (output):item %d wordt stream %d (%s)\n", ocnt , i, + so. toLatin1 ().data ()); + ocnt ++; + } + } + + qDebug () << "added items to combobox"; + return ocnt > 1; +} + +// +int16_t audioSink::numberofDevices (void) { + return numofDevices; +} + diff --git a/src/output/fir-filters.cpp b/src/output/fir-filters.cpp new file mode 100644 index 0000000..9941eba --- /dev/null +++ b/src/output/fir-filters.cpp @@ -0,0 +1,107 @@ +# +/* + * Copyright (C) 2010, 2011, 2012 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the SDR-J. + * + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "fir-filters.h" +#ifndef __MINGW32__ +#include "alloca.h" +#endif + +//FIR LowPass + + LowPassFIR::LowPassFIR (int16_t firsize, + int32_t Fc, int32_t fs){ +float f = (float)Fc / fs; +float sum = 0.0; +int16_t i; +float *temp = (float *)alloca (firsize * sizeof (float)); + + filterSize = firsize; + filterKernel = new std::complex [filterSize]; + Buffer = new std::complex [filterSize]; + ip = 0; + + for (i = 0; i < filterSize; i ++) { + filterKernel [i] = 0; + Buffer [i] = 0; + } + + for (i = 0; i < filterSize; i ++) { + if (i == filterSize / 2) + temp [i] = 2 * M_PI * f; + else + temp [i] = + sin (2 * M_PI * f * (i - filterSize/2))/ (i - filterSize/2); +// +// Blackman window + temp [i] *= (0.42 - + 0.5 * cos (2 * M_PI * (float)i / filterSize) + + 0.08 * cos (4 * M_PI * (float)i / filterSize)); + + sum += temp [i]; + } + + for (i = 0; i < filterSize; i ++) + filterKernel [i] = std::complex (temp [i] / sum, 0); +} + + LowPassFIR::~LowPassFIR () { + delete[] filterKernel; + delete[] Buffer; +} +// +// we process the samples backwards rather than reversing +// the kernel +std::complex LowPassFIR::Pass (std::complex z) { +int16_t i; +std::complex tmp = 0; + + Buffer [ip] = z; + for (i = 0; i < filterSize; i ++) { + int16_t index = ip - i; + if (index < 0) + index += filterSize; + tmp += Buffer [index] * filterKernel [i]; + } + + ip = (ip + 1) % filterSize; + return tmp; +} + +float LowPassFIR::Pass (float v) { +int16_t i; +float tmp = 0; + + Buffer [ip] = std::complex (v, 0); + for (i = 0; i < filterSize; i ++) { + int16_t index = ip - i; + if (index < 0) + index += filterSize; + tmp += real (Buffer [index]) * real (filterKernel [i]); + } + + ip = (ip + 1) % filterSize; + return tmp; +} + + diff --git a/src/output/newconverter.cpp b/src/output/newconverter.cpp new file mode 100644 index 0000000..64701e3 --- /dev/null +++ b/src/output/newconverter.cpp @@ -0,0 +1,85 @@ +# +/* + * Copyright (C) 2011, 2012, 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "newconverter.h" +#include + + newConverter::newConverter (int32_t inRate, int32_t outRate, + int32_t inSize) { +int err; + this -> inRate = inRate; + this -> outRate = outRate; + inputLimit = inSize; + ratio = double(outRate) / inRate; +// fprintf (stderr, "ratio = %f\n", ratio); + outputLimit = inSize * ratio; +// converter = src_new (SRC_SINC_BEST_QUALITY, 2, &err); + converter = src_new (SRC_LINEAR, 2, &err); +// converter = src_new (SRC_SINC_MEDIUM_QUALITY, 2, &err); + src_data = new SRC_DATA; + inBuffer. resize (2 * inputLimit + 20); + outBuffer. resize (2 * outputLimit + 20); + src_data-> data_in = inBuffer. data (); + src_data-> data_out = outBuffer. data (); + src_data-> src_ratio = ratio; + src_data-> end_of_input = 0; + inp = 0; +} + + newConverter::~newConverter (void) { + src_delete (converter); + delete src_data; +} + +bool newConverter::convert (std::complex v, + std::complex *out, int32_t *amount) { +int32_t i; +int32_t framesOut; +int res; + + inBuffer [2 * inp] = real (v); + inBuffer [2 * inp + 1] = imag (v); + inp ++; + if (inp < inputLimit) + return false; + + src_data -> input_frames = inp; + src_data -> output_frames = outputLimit + 10; + res = src_process (converter, src_data); + if (res != 0) { + fprintf (stderr, "error %s\n", src_strerror (res)); + return false; + } + inp = 0; + framesOut = src_data -> output_frames_gen; + for (i = 0; i < framesOut; i ++) + out [i] = std::complex (outBuffer [2 * i], + outBuffer [2 * i + 1]); + *amount = framesOut; + return true; +} + +int32_t newConverter::getOutputsize (void) { + return outputLimit; +} + diff --git a/src/output/tcp-streamer.cpp b/src/output/tcp-streamer.cpp new file mode 100644 index 0000000..54b4673 --- /dev/null +++ b/src/output/tcp-streamer.cpp @@ -0,0 +1,109 @@ +# +/* + * Copyright (C) 2014 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair programming + * + * This file is part of the SDR-J. + * Many of the ideas as implemented in SDR-J are derived from + * other work, made available through the GNU general Public License. + * All copyrights of the original authors are recognized. + * + * SDR-J 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; either version 2 of the License, or + * (at your option) any later version. + * + * SDR-J 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with SDR-J; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "tcp-streamer.h" + + tcpStreamer::tcpStreamer (int32_t port) { + buffer = new RingBuffer (2 * 32768); + this -> port = port; + connected = false; +// Now for the communication + connect (&streamer, SIGNAL (newConnection (void)), + this, SLOT (acceptConnection (void))); + streamer. listen (QHostAddress::Any, port); + connect (this, SIGNAL (handleSamples (void)), + this, SLOT (processSamples (void))); +} + + tcpStreamer::~tcpStreamer (void) { +} + +void tcpStreamer::acceptConnection (void) { + if (connected) { + fprintf (stderr, "attempt to bind, but already occuppied\n"); + return; + } + + streamerAddress = streamer. nextPendingConnection (); + QHostAddress s = streamerAddress -> peerAddress (); + fprintf (stderr, "Accepted a client %s\n", s.toString (). toLatin1 (). data ()); + connected = true; +} + +// +// sendSamples is called and acts when we are connected + +#define largeValue 32768.0 +#define bufferSize (2 * 4096) +// +// +void tcpStreamer::audioOutput (float *b, int32_t amount) { + if (!connected) + return; + buffer -> putDataIntoBuffer (b, 2 * amount); + if (buffer -> GetRingBufferReadAvailable () > bufferSize) + emit handleSamples (); +} + + +void tcpStreamer::processSamples (void) { +QByteArray datagram; +float localBuffer [bufferSize]; +int16_t i; +int32_t amount; + if (!connected) { + buffer -> FlushRingBuffer (); + return; + } +// an encoded sample takes 2 input values and delivers 4 bytes +// It is assumed that the "sound values" do not exceed 16 bits + datagram. resize (2 * bufferSize); + while (buffer -> GetRingBufferReadAvailable () > bufferSize) { + amount = buffer -> getDataFromBuffer (localBuffer, bufferSize); + for (i = 0; i < amount / 2; i ++) { + int16_t re = localBuffer [2 * i] * largeValue; + int16_t im = localBuffer [2 * i + 1] * largeValue; + datagram [4 * i + 0] = ((re & 0xFF00) >> 8) & 0xFF; + datagram [4 * i + 1] = (re & 0x00FF) & 0xFF; + + datagram [4 * i + 2] = ((im & 0xFF00) >> 8) & 0xFF; + datagram [4 * i + 3] = (im & 0x00FF) & 0xFF; + } + + if (streamerAddress -> state () == + QAbstractSocket::UnconnectedState) { + fprintf (stderr, "unconnected state\n"); + streamer. close (); + streamer. listen (QHostAddress::Any, port); + connected = false; + return; + } + + streamerAddress -> write (datagram. data (), datagram. size ()); + } +} + + diff --git a/src/scopes-qwt6/iqdisplay.cpp b/src/scopes-qwt6/iqdisplay.cpp new file mode 100644 index 0000000..02c526c --- /dev/null +++ b/src/scopes-qwt6/iqdisplay.cpp @@ -0,0 +1,97 @@ +# +/* + * Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "iqdisplay.h" +#include "spectrogramdata.h" +/* + * iq circle plotter + */ +SpectrogramData *IQData = NULL; + + IQDisplay::IQDisplay (QwtPlot *plot, int16_t x): + QwtPlotSpectrogram () { +QwtLinearColorMap *colorMap = new QwtLinearColorMap (Qt::black, Qt::white); + + setRenderThreadCount (1); + Radius = 100; + plotgrid = plot; + x_amount = x; + CycleCount = 0; + Points. resize (x_amount); + memset (Points. data (), 0, x_amount * sizeof (std::complex)); + this -> setColorMap (colorMap); + plotData. resize (2 * Radius * 2 * Radius); + plot2. resize (2 * Radius * 2 * Radius); + memset (plotData. data (), 0, + 2 * 2 * Radius * Radius * sizeof (double)); + IQData = new SpectrogramData (plot2. data (), + 0, + 2 * Radius, + 2 * Radius, + 2 * Radius, + 50.0); + this -> setData (IQData); + plot -> enableAxis (QwtPlot::xBottom, 0); + plot -> enableAxis (QwtPlot::yLeft, 0); + this -> setDisplayMode (QwtPlotSpectrogram::ImageMode, true); + plotgrid -> replot(); +} + + IQDisplay::~IQDisplay () { + this -> detach (); +// delete IQData; +} + +void IQDisplay::DisplayIQ (std::complex *z, float scale) { +int16_t i; + + for (i = 0; i < x_amount; i ++) { + int a = real (Points [i]); + int b = imag (Points [i]); + plotData [(a + Radius - 1) * 2 * Radius + b + Radius - 1] = 0; + } + for (i = 0; i < x_amount; i ++) { + int x = (int)(scale * real (z [i])); + int y = (int)(scale * imag (z [i])); + + if (x >= Radius) + x = Radius - 1; + if (y >= Radius) + y = Radius - 1; + + if (x <= - Radius) + x = -(Radius - 1); + if (y <= - Radius) + y = -(Radius - 1); + + Points [i] = std::complex (x, y); + plotData [(x + Radius - 1) * 2 * Radius + y + Radius - 1] = 100; + } + + memcpy (plot2. data (), plotData. data (), + 2 * 2 * Radius * Radius * sizeof (double)); + this -> detach (); + this -> setData (IQData); + this -> setDisplayMode (QwtPlotSpectrogram::ImageMode, true); + this -> attach (plotgrid); + plotgrid -> replot(); +} diff --git a/src/sdrgui.ui b/src/sdrgui.ui new file mode 100644 index 0000000..0a3913e --- /dev/null +++ b/src/sdrgui.ui @@ -0,0 +1,1802 @@ + + + jan + elektorSDR + + + + 0 + 0 + 827 + 503 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 50 + false + + + + sdr-j DAB/DAB+ receiver + + + QUIT + + + + + 500 + 190 + 51 + 31 + + + + + 8 + + + + +1K + + + + + + 370 + 300 + 51 + 31 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 0 + + + + + + + 255 + 255 + 0 + + + + + + + + false + + + QFrame::NoFrame + + + QFrame::Raised + + + 1 + + + 3 + + + 3 + + + QLCDNumber::Flat + + + + + + 450 + 190 + 51 + 31 + + + + + 8 + + + + -1K + + + + + + 410 + 0 + 20 + 291 + + + + + + + + + 255 + 85 + 0 + + + + + + + + + 255 + 85 + 0 + + + + + + + + + 255 + 85 + 0 + + + + + + + + 10 + + + 100 + + + 50 + + + Qt::Vertical + + + QSlider::TicksBothSides + + + 20 + + + + + + 750 + 220 + 71 + 71 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 0 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 0 + 0 + + + + + + + + + 255 + 0 + 0 + + + + + + + 255 + 0 + 0 + + + + + + + + + 75 + true + + + + true + + + START + + + + + + 450 + 0 + 361 + 191 + + + + false + + + QFrame::Panel + + + QFrame::Raised + + + 3 + + + + + + 650 + 190 + 161 + 31 + + + + QFrame::Panel + + + QFrame::Raised + + + 2 + + + TextLabel + + + + + + 750 + 290 + 71 + 61 + + + + + + + + + 255 + 0 + 0 + + + + + + + + + 255 + 0 + 0 + + + + + + + + + 255 + 0 + 0 + + + + + + + + + 75 + true + + + + true + + + QUIT + + + + + + 550 + 190 + 101 + 31 + + + + spectrum + + + + + + 290 + 330 + 41 + 31 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 0 + + + + + + + 255 + 255 + 0 + + + + + + + + false + + + QFrame::NoFrame + + + 1 + + + 3 + + + 3 + + + QLCDNumber::Flat + + + + + + 500 + 330 + 61 + 31 + + + + -99 + + + + + + 420 + 330 + 81 + 31 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 0 + + + + + + + 255 + 255 + 0 + + + + + + + + false + + + QFrame::NoFrame + + + 1 + + + 7 + + + QLCDNumber::Flat + + + + + + 280 + 360 + 61 + 31 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 0 + + + + + + + 255 + 255 + 0 + + + + + + + + false + + + QFrame::NoFrame + + + 1 + + + 3 + + + QLCDNumber::Flat + + + + + + 0 + 0 + 391 + 291 + + + + + + + 10 + 330 + 101 + 31 + + + + + no device + + + + + file input (.raw) + + + + + file input (.wav) + + + + + + + 450 + 240 + 61 + 31 + + + + -60000 + + + 60000 + + + 1 + + + + + + 340 + 330 + 71 + 31 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 0 + + + + + + + 255 + 255 + 0 + + + + + + + + false + + + QFrame::NoFrame + + + 1 + + + 6 + + + QLCDNumber::Flat + + + + + + 450 + 220 + 61 + 21 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 0 + + + + + + + + + 255 + 255 + 0 + + + + + + + 255 + 255 + 0 + + + + + + + + false + + + 1 + + + false + + + 6 + + + QLCDNumber::Flat + + + + + + 570 + 250 + 171 + 191 + + + + + + + 510 + 220 + 151 + 21 + + + + + 11 + + + + + + + + + + 680 + 220 + 61 + 31 + + + + QFrame::NoFrame + + + QLCDNumber::Hex + + + QLCDNumber::Flat + + + + + + 470 + 410 + 81 + 31 + + + + + 14 + 75 + true + + + + + + + + + + 510 + 240 + 51 + 31 + + + + 63 + + + + + + 20 + 410 + 161 + 31 + + + + + 12 + + + + + + + + + + 200 + 410 + 131 + 31 + + + + + 12 + + + + + + + + + + 20 + 300 + 351 + 20 + + + + 100 + + + 30 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + + + + 750 + 350 + 71 + 51 + + + + dump + + + + + + 20 + 450 + 64 + 23 + + + + QLCDNumber::Flat + + + + + + 80 + 450 + 64 + 23 + + + + QLCDNumber::Flat + + + + + + 140 + 450 + 64 + 23 + + + + QLCDNumber::Flat + + + + + + 200 + 450 + 64 + 23 + + + + QLCDNumber::Flat + + + + + + 260 + 450 + 64 + 23 + + + + QLCDNumber::Flat + + + + + + 340 + 450 + 64 + 23 + + + + QLCDNumber::Flat + + + + + + 20 + 470 + 67 + 21 + + + + uepFlag + + + + + + 80 + 470 + 67 + 21 + + + + start addr + + + + + + 150 + 470 + 67 + 21 + + + + length + + + + + + 200 + 470 + 67 + 21 + + + + prot level + + + + + + 270 + 470 + 67 + 21 + + + + bit rate + + + + + + 350 + 470 + 67 + 21 + + + + ASCTy + + + + + + 220 + 360 + 61 + 31 + + + + QFrame::NoFrame + + + 4 + + + QLCDNumber::Flat + + + + + + 330 + 410 + 121 + 31 + + + + + 12 + + + + + + + + + + 120 + 360 + 64 + 31 + + + + QFrame::NoFrame + + + 4 + + + QLCDNumber::Flat + + + + + + 10 + 360 + 64 + 31 + + + + QFrame::NoFrame + + + 4 + + + QLCDNumber::Flat + + + + + + 40 + 390 + 31 + 21 + + + + SNR + + + + + + 140 + 390 + 51 + 21 + + + + fic ratio + + + + + + 200 + 390 + 91 + 21 + + + + aac/mp2 ratio + + + + + + 590 + 450 + 51 + 31 + + + + -1 + + + 102 + + + 8 + + + + + + 640 + 450 + 181 + 31 + + + + + select output + + + + + + + 490 + 450 + 101 + 21 + + + + gain reduction + + + + + + 450 + 300 + 111 + 31 + + + + + + + + + 85 + 170 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + + + 85 + 170 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + + + 85 + 170 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + true + + + reset + + + + + + 386 + 370 + 171 + 31 + + + + + 12 + 75 + true + + + + + + + + + + 750 + 400 + 71 + 51 + + + + + 9 + + + + audioDump + + + + + + 450 + 270 + 61 + 31 + + + + MP2 + + + + + + 510 + 270 + 51 + 31 + + + + AAC + + + + + + 150 + 330 + 91 + 31 + + + + + BAND III + + + + + L BAND + + + + + + + 240 + 330 + 51 + 31 + + + + + + + 110 + 330 + 41 + 31 + + + + + 1 + + + + + 2 + + + + + 4 + + + + + + + 420 + 450 + 65 + 21 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 0 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 0 + 0 + + + + + + + + + 255 + 0 + 0 + + + + + + + 255 + 0 + 0 + + + + + + + + true + + + QFrame::Box + + + + + + + + qPixmapFromMimeSource + + + QwtPlot + QFrame +
qwt_plot.h
+ 1 +
+
+ + qwt_plot.h + qwt_scale_widget.h + qwt_scale_widget.h + qwt_plot.h + qwt_scale_widget.h + qwt_scale_widget.h + qwt_text_label.h + + + +
diff --git a/src/various/Xtan2.cpp b/src/various/Xtan2.cpp new file mode 100644 index 0000000..d1b7c60 --- /dev/null +++ b/src/various/Xtan2.cpp @@ -0,0 +1,100 @@ +# +// +// This LUT implementation of atan2 is a C++ translation of +// a Java discussion on the net +// http://www.java-gaming.org/index.php?topic=14647.0 + +#include "Xtan2.h" + +#define SIZE 8192 +#define EZIS (-SIZE) + + compAtan::compAtan (void) { + + Stretch = M_PI; +// private static final int SIZE = 1024; +// private static final float Stretch = (float)Math.PI; +// Output will swing from -Stretch to Stretch (default: Math.PI) +// Useful to change to 1 if you would normally do "atan2(y, x) / Math.PI" + + ATAN2_TABLE_PPY = new float [SIZE + 1]; + ATAN2_TABLE_PPX = new float [SIZE + 1]; + ATAN2_TABLE_PNY = new float [SIZE + 1]; + ATAN2_TABLE_PNX = new float [SIZE + 1]; + ATAN2_TABLE_NPY = new float [SIZE + 1]; + ATAN2_TABLE_NPX = new float [SIZE + 1]; + ATAN2_TABLE_NNY = new float [SIZE + 1]; + ATAN2_TABLE_NNX = new float [SIZE + 1]; + for (int i = 0; i <= SIZE; i++) { + float f = (float)i / SIZE; + ATAN2_TABLE_PPY [i] = atan(f) * Stretch / M_PI; + ATAN2_TABLE_PPX [i] = Stretch * 0.5f - ATAN2_TABLE_PPY[i]; + ATAN2_TABLE_PNY [i] = -ATAN2_TABLE_PPY [i]; + ATAN2_TABLE_PNX [i] = ATAN2_TABLE_PPY [i] - Stretch * 0.5f; + ATAN2_TABLE_NPY [i] = Stretch - ATAN2_TABLE_PPY [i]; + ATAN2_TABLE_NPX [i] = ATAN2_TABLE_PPY [i] + Stretch * 0.5f; + ATAN2_TABLE_NNY [i] = ATAN2_TABLE_PPY [i] - Stretch; + ATAN2_TABLE_NNX [i] = -Stretch * 0.5f - ATAN2_TABLE_PPY [i]; + } +} + + compAtan::~compAtan (void) { + delete ATAN2_TABLE_PPY; + delete ATAN2_TABLE_PPX; + delete ATAN2_TABLE_PNY; + delete ATAN2_TABLE_PNX; + delete ATAN2_TABLE_NPY; + delete ATAN2_TABLE_NPX; + delete ATAN2_TABLE_NNY; + delete ATAN2_TABLE_NNX; +} + +/** + * ATAN2 : performance degrades due to the many "0" tests + */ + +float compAtan::atan2 (float y, float x) { + if (x == 0) { + if (y == 0) return 0; +// return std::numeric_limits::infinity (); + else + if (y > 0) + return M_PI / 2; + else // y < 0 + return - M_PI / 2; + } + + if (x > 0) { + if (y >= 0) { + if (x >= y) + return ATAN2_TABLE_PPY[(int)(SIZE * y / x + 0.5)]; + else + return ATAN2_TABLE_PPX[(int)(SIZE * x / y + 0.5)]; + + } + else { + if (x >= -y) + return ATAN2_TABLE_PNY[(int)(EZIS * y / x + 0.5)]; + else + return ATAN2_TABLE_PNX[(int)(EZIS * x / y + 0.5)]; + } + } + else { + if (y >= 0) { + if (-x >= y) + return ATAN2_TABLE_NPY[(int)(EZIS * y / x + 0.5)]; + else + return ATAN2_TABLE_NPX[(int)(EZIS * x / y + 0.5)]; + } + else { + if (x <= y) // (-x >= -y) + return ATAN2_TABLE_NNY[(int)(SIZE * y / x + 0.5)]; + else + return ATAN2_TABLE_NNX[(int)(SIZE * x / y + 0.5)]; + } + } +} + +float compAtan::argX (std::complex v) { + return this -> atan2 (imag (v), real (v)); +} diff --git a/src/various/band-handler.cpp b/src/various/band-handler.cpp new file mode 100644 index 0000000..037a103 --- /dev/null +++ b/src/various/band-handler.cpp @@ -0,0 +1,140 @@ +# +/* + * Copyright (C) 2013, 2014, 2015, 2016, 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Programming + * + * This file is part of the Qt-DAB program + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "band-handler.h" +#include "dab-constants.h" + +struct dabFrequencies { + const char *key; + int fKHz; +}; + +static +struct dabFrequencies bandIII_frequencies [] = { +{"5A", 174928}, +{"5B", 176640}, +{"5C", 178352}, +{"5D", 180064}, +{"6A", 181936}, +{"6B", 183648}, +{"6C", 185360}, +{"6D", 187072}, +{"7A", 188928}, +{"7B", 190640}, +{"7C", 192352}, +{"7D", 194064}, +{"8A", 195936}, +{"8B", 197648}, +{"8C", 199360}, +{"8D", 201072}, +{"9A", 202928}, +{"9B", 204640}, +{"9C", 206352}, +{"9D", 208064}, +{"10A", 209936}, +{"10B", 211648}, +{"10C", 213360}, +{"10D", 215072}, +{"11A", 216928}, +{"11B", 218640}, +{"11C", 220352}, +{"11D", 222064}, +{"12A", 223936}, +{"12B", 225648}, +{"12C", 227360}, +{"12D", 229072}, +{"13A", 230784}, +{"13B", 232496}, +{"13C", 234208}, +{"13D", 235776}, +{"13E", 237488}, +{"13F", 239200}, +{NULL, 0} +}; + +static +struct dabFrequencies Lband_frequencies [] = { +{"LA", 1452960}, +{"LB", 1454672}, +{"LC", 1456384}, +{"LD", 1458096}, +{"LE", 1459808}, +{"LF", 1461520}, +{"LG", 1463232}, +{"LH", 1464944}, +{"LI", 1466656}, +{"LJ", 1468368}, +{"LK", 1470080}, +{"LL", 1471792}, +{"LM", 1473504}, +{"LN", 1475216}, +{"LO", 1476928}, +{"LP", 1478640}, +{NULL, 0} +}; + + bandHandler::bandHandler (void) {} + bandHandler::~bandHandler (void) {} + +void bandHandler::setupChannels (QComboBox *s, uint8_t band) { +struct dabFrequencies *t; +int16_t i; +int16_t c = s -> count (); + +// clear the fields in the comboBox + for (i = 0; i < c; i ++) + s -> removeItem (c - (i + 1)); + + if (band == BAND_III) + t = bandIII_frequencies; + else + t = Lband_frequencies; + + for (i = 0; t [i]. key != NULL; i ++) + s -> insertItem (i, t [i]. key, QVariant (i)); +} + + +// find the frequency for a given channel in a given band +int32_t bandHandler::Frequency (uint8_t dabBand, QString Channel) { +int32_t tunedFrequency = 0; +struct dabFrequencies *finger; +int i; + + if (dabBand == BAND_III) + finger = bandIII_frequencies; + else + finger = Lband_frequencies; + + for (i = 0; finger [i]. key != NULL; i ++) { + if (finger [i]. key == Channel) { + tunedFrequency = KHz (finger [i]. fKHz); + break; + } + } + + if (tunedFrequency == 0) + tunedFrequency = KHz (finger [0]. fKHz); + + return tunedFrequency; +} + diff --git a/src/various/dab-params.cpp b/src/various/dab-params.cpp new file mode 100644 index 0000000..425bd55 --- /dev/null +++ b/src/various/dab-params.cpp @@ -0,0 +1,125 @@ +# +/* + * Copyright (C) 2013, 2014, 2015, 2016, 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB (formerly SDR-J, JSDR). + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "dab-params.h" + + dabParams::dabParams (uint8_t Mode) { + switch (Mode) { + case 2: + dabMode = 2; + L = 76; // blocks per frame + K = 384; // carriers + T_null = 664; // null length + T_F = 49152; // samples per frame + T_s = 638; // block length + T_u = 512; // useful part + T_g = 126; + carrierDiff = 4000; + CIFs = 1; + break; + + case 4: + dabMode = 4; + L = 76; + K = 768; + T_F = 98304; + T_null = 1328; + T_s = 1276; + T_u = 1024; + T_g = 252; + carrierDiff = 2000; + CIFs = 2; + break; + + case 3: + dabMode = 3; + L = 153; + K = 192; + T_F = 49152; + T_null = 345; + T_s = 319; + T_u = 256; + T_g = 63; + carrierDiff = 2000; + CIFs = 1; + break; + + case 1: + default: + dabMode = 1; + L = 76; + K = 1536; + T_F = 196608; + T_null = 2656; + T_s = 2552; + T_u = 2048; + T_g = 504; + carrierDiff = 1000; + CIFs = 4; + break; + } +} + + dabParams::~dabParams (void) { +} + +int16_t dabParams::get_dabMode (void) { + return dabMode; +} + +int16_t dabParams::get_L (void) { + return L; +} + +int16_t dabParams::get_carriers (void) { + return K; +} + + +int16_t dabParams::get_T_null (void) { + return T_null; +} + +int16_t dabParams::get_T_s (void) { + return T_s; +} + +int16_t dabParams::get_T_u (void) { + return T_u; +} + +int16_t dabParams::get_T_g (void) { + return T_g; +} + +int32_t dabParams::get_T_F (void) { + return T_F; +} + +int32_t dabParams::get_carrierDiff (void) { + return carrierDiff; +} + +int16_t dabParams::get_CIFs (void) { + return CIFs; +} + diff --git a/src/various/fft-handler.cpp b/src/various/fft-handler.cpp new file mode 100644 index 0000000..bf991f0 --- /dev/null +++ b/src/various/fft-handler.cpp @@ -0,0 +1,93 @@ +# +/* + * Copyright (C) 2008, 2009, 2010 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "fft-handler.h" +#include +// +// The basic idea was to have a single instance of the +// fftHandler, for all DFT's. Makes sense, since they are all +// of size T_u. +// However, in the concurrent version this does not work, +// it seems some locking there is inevitable +// + fftHandler::fftHandler (uint8_t mode): p (mode) { + this -> fftSize = p. get_T_u (); + vector = (std::complex *) + FFTW_MALLOC (sizeof (std::complex) * fftSize); + plan = FFTW_PLAN_DFT_1D (fftSize, + reinterpret_cast (vector), + reinterpret_cast (vector), + FFTW_FORWARD, FFTW_ESTIMATE); +} + + fftHandler::~fftHandler (void) { + FFTW_DESTROY_PLAN (plan); + FFTW_FREE (vector); +} + +std::complex *fftHandler::getVector (void) { + return vector; +} + +void fftHandler::do_FFT (void) { + FFTW_EXECUTE (plan); +} +// +// Note that we do not scale here, not needed +// for the purpose we are using it for +void fftHandler::do_IFFT (void) { +int16_t i; + + for (i = 0; i < fftSize; i ++) + vector [i] = conj (vector [i]); + FFTW_EXECUTE (plan); + for (i = 0; i < fftSize; i ++) + vector [i] = conj (vector [i]); +} + +// Obsolete + common_ifft::common_ifft (int32_t fft_size) { +int32_t i; + + this -> fft_size = fft_size; + vector = (std::complex *)FFTW_MALLOC (sizeof (std::complex) * fft_size); + for (i = 0; i < fft_size; i ++) + vector [i] = 0; + plan = FFTW_PLAN_DFT_1D (fft_size, + reinterpret_cast (vector), + reinterpret_cast (vector), + FFTW_BACKWARD, FFTW_ESTIMATE); +} + + common_ifft::~common_ifft (void) { + FFTW_DESTROY_PLAN (plan); + FFTW_FREE (vector); +} + +std::complex *common_ifft::getVector () { + return vector; +} + +void common_ifft::do_IFFT (void) { + FFTW_EXECUTE (plan); +} + diff --git a/src/various/text-mapper.cpp b/src/various/text-mapper.cpp new file mode 100644 index 0000000..358a35d --- /dev/null +++ b/src/various/text-mapper.cpp @@ -0,0 +1,227 @@ +# +/* + * Copyright (C) 2013, 2014, 2015, 2016, 2017 + * Jan van Katwijk (J.vanKatwijk@gmail.com) + * Lazy Chair Computing + * + * This file is part of the Qt-DAB (formerly SDR-J, JSDR). + * + * Qt-DAB 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; either version 2 of the License, or + * (at your option) any later version. + * + * Qt-DAB 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with Qt-DAB; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "text-mapper.h" + + + textMapper :: textMapper (void) { +} + + textMapper :: ~textMapper (void) { +} + +static +const char *table12 [] = { +"none", +"News", +"Current Affairs", +"Information", +"Sport", +"Education", +"Drama", +"Arts", +"Science", +"Talk", +"Pop Music", +"Rock Music", +"Easy Listening", +"Light Classical", +"Classical Music", +"Other Music", +"Weather", +"Finance", +"Children\'s", +"Factual", +"Religion", +"Phone In", +"Travel", +"Leisure", +"Jazz and Blues", +"Country Music", +"National Music", +"Oldies Music", +"Folk Music", +"entry 29 not used", +"entry 30 not used", +"entry 31 not used" +}; + +const char *textMapper::get_programm_type_string (int16_t type) { + if (type > 0x40) { + fprintf (stderr, "GUI: program type wrong (%d)\n", type); + return (table12 [0]); + } + if (type < 0) + return " "; + + return table12 [type]; +} + +static +const char *table9 [] = { +"unknown language", +"Albanian", +"Breton", +"Catalan", +"Croatian", +"Welsh", +"Czech", +"Danish", +"German", +"English", +"Spanish", +"Esperanto", +"Estonian", +"Basque", +"Faroese", +"French", +"Frisian", +"Irish", +"Gaelic", +"Galician", +"Icelandic", +"Italian", +"Lappish", +"Latin", +"Latvian", +"Luxembourgian", +"Lithuanian", +"Hungarian", +"Maltese", +"Dutch", +"Norwegian", +"Occitan", +"Polish", +"Portuguese", +"Romanian", +"Romansh", +"Serbian", +"Slovak", +"Slovene", +"Finnish", +"Swedish", +"Turkish", +"Flemish", +"Walloon", +"rfu", +"rfu", +"rfu", +"rfu", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment", +"Reserved for national assignment" +}; + +static +const char *table10 [] = { +"Background sound/clean feed", +"rfu", +"rfu", +"rfu", +"rfu", +"Zulu", +"Vietnamese", +"Uzbek", +"Urdu", +"Ukranian", +"Thai", +"Telugu", +"Tatar", +"Tamil", +"Tadzhik", +"Swahili", +"Sranan Tongo", +"Somali", +"Sinhalese", +"Shona", +"Serbo-Croat", +"Rusyn", +"Russian", +"Quechua", +"Pushtu", +"Punjabi", +"Persian", +"Papiamento", +"Oriya", +"Nepali", +"Ndebele", +"Marathi", +"Moldavian", +"Malaysian", +"Malagasay", +"Macedonian", +"Laotian", +"Korean", +"Khmer", +"Kazakh", +"Kannada", +"Japanese", +"Indonesian", +"Hindi", +"Hebrew", +"Hausa", +"Gurani", +"Gujurati", +"Greek", +"Greek", +"Georgian", +"Fulani", +"Dari", +"Chuvash", +"Chinese", +"Burmese", +"Bulgarian", +"Bengali", +"Belorussian", +"Bambora", +"Azerbaijani", +"Assamese", +"Armenian", +"Arabic", +"Amharic" +}; + +const char *textMapper::get_programm_language_string (int16_t language) { + if (language < 0) + return " "; + else if (language < 0x40) + return table9[language]; + else if (language < 0x7d) + return table10[language-0x40]; + fprintf(stderr, "GUI: wrong language (%d)\n", language); + return table9[0]; +} + diff --git a/travis.yml-qt4 b/travis.yml-qt4 new file mode 100644 index 0000000..68959e2 --- /dev/null +++ b/travis.yml-qt4 @@ -0,0 +1,74 @@ +language: c++ +compiler: gcc +sudo: require +dist: trusty + +before_install: + - sudo add-apt-repository ppa:beineri/opt-qt532-trusty -y + - sudo apt-get update -qq + +install: + - sudo apt-get install qt4-qmake build-essential g++ + - sudo apt-get install libsndfile1-dev qt4-default libfftw3-dev portaudio19-dev + - sudo apt-get install libfaad-dev zlib1g-dev libusb-1.0-0-dev mesa-common-dev + - sudo apt-get install libgl1-mesa-dev libqt4-opengl-dev libsamplerate-dev libqwt-dev + + - cp CMakeLists.txt-qt4 CMakeLists.txt +script: + - # sed -i -e 's|CONFIG.*sdrplay||g' qt-dab.pro + - # sed -i -e 's|CONFIG.*airspy||g' qt-dab.pro + - # sed -i -e 's|CONFIG.*spectrum||g' qt-dab.pro + - cmake . -DDABSTICK=ON -DAIRSPY=ON -DSDRPLAY=ON -DCMAKE_INSTALL_PREFIX=/usr + - make -j4 + - # sudo make DESTIDR=appdir install ; sudo chown -R $USER appdir ; find appdir/ + - ls -lh . + - mkdir -p appdir/usr/bin + - cp dabradio-1.0 appdir/usr/bin/dabradio + - mkdir -p appdir/usr/lib + - mkdir -p appdir/usr/share/applications ; cp dabradio.desktop appdir/usr/share/applications + - cp dabradio.png appdir/dabradio.png + - touch appdir/dabradio.png # Dear upstream developers, please provide an application icon + + - wget http://sm5bsz.com/linuxdsp/hware/rtlsdr/rtl-sdr-linrad4.tbz + - tar xvfj rtl-sdr-linrad4.tbz + - cd rtl-sdr-linrad4 + - mkdir build + - cd build + - cmake .. -DDETACH_KERNEL_DRIVER=ON -DCMAKE_INSTALL_PREFIX=../../appdir/usr + - make + - make install + - cd .. + - cd .. + + - sudo apt-get install build-essential cmake libusb-1.0-0-dev pkg-config + - wget https://github.com/airspy/host/archive/master.zip + - unzip master.zip + - cd airspyone_host-master + - mkdir build + - cd build +# udev rules are installed separately + - cmake ../ -DCMAKE_INSTALL_PREFIX=../../appdir/usr + - make + - make install + - cd .. + - cd .. + - ls -l appdir/usr/lib +after_success: + - wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" + - chmod a+x linuxdeployqt*.AppImage + - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH + - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/* -bundle-non-qt-libs + - # Workaround for https://github.com/probonopd/linuxdeployqt/issues/31#issuecomment-289267637 + - ./linuxdeployqt*.AppImage --appimage-extract + - find appdir/usr/plugins/ -type f -exec squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/../../lib' {} \; + - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/* -bundle-non-qt-libs + - # Workaround for https://github.com/JvanKatwijk/qt-dab/issues/34 + - # find /usr/lib/ -type f -name librtlsdr.so* -exec cp {} appdir/usr/lib/librtlsdr.so \; + - chmod a+x appimage/* ; rm appdir/AppRun ; cp appimage/* appdir/ + - export PATH=squashfs-root/usr/bin/:$PATH # Make it pick up our private patched mksquashfs; https://github.com/plougher/squashfs-tools/pull/13/files + - squashfs-root/usr/bin/appimagetool $(readlink -f ./appdir/) + - find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq + - curl --upload-file ./dabradio*.AppImage https://transfer.sh/Qt_DAB-git.$(git rev-parse --short HEAD)-x86_64.AppImage + - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh + - bash ./upload.sh ./dabradio*.AppImage + diff --git a/travis.yml-qt5 b/travis.yml-qt5 new file mode 100644 index 0000000..a62f7e6 --- /dev/null +++ b/travis.yml-qt5 @@ -0,0 +1,58 @@ +language: c++ +compiler: gcc +sudo: require +dist: trusty + +before_install: + - sudo add-apt-repository ppa:beineri/opt-qt532-trusty -y + - sudo apt-get update -qq + +install: + - sudo apt-get -y install qt53svg qt53base qt53tools qt53declarative libsndfile1-dev librtlsdr-dev librtlsdr0 libfftw3-dev portaudio19-dev libfaad-dev zlib1g-dev rtl-sdr libusb-1.0-0-dev mesa-common-dev libgl1-mesa-dev libqt4-opengl-dev libsamplerate-dev + - source /opt/qt53/bin/qt53-env.sh + - # QWT for Qt 5, see https://github.com/arkottke/strata/blob/master/.travis.yml + - # svn checkout svn://svn.code.sf.net/p/qwt/code/branches/qwt-6.1 qwt + - # cd qwt + - # qmake + - # make -j4 + - # sudo make install + - # find /usr/local/qwt-6.1.4-svn/ + - # cd .. + +script: + - # sed -i -e 's|CONFIG.*sdrplay||g' qt-dab.pro + - # sed -i -e 's|CONFIG.*airspy||g' qt-dab.pro + - # sed -i -e 's|CONFIG.*spectrum||g' qt-dab.pro + - cmake . -DDABSTICK=ON -DRTLTCP=ON -DAIRSPY=ON -DSDRPLAY=ON -DCMAKE_INSTALL_PREFIX=/usr + - make -j4 + - # sudo make DESTIDR=appdir install ; sudo chown -R $USER appdir ; find appdir/ + - ls -lh . + - rm -rf *_autogen + - mkdir -p appdir/usr/bin + - cp qt-dab-* appdir/usr/bin/qt-dab + + - mkdir -p appdir/usr/share/applications ; cp qt-dab.desktop appdir/usr/share/applications + - cp qt-dab.png appdir/qt-dab.png + - touch appdir/qt-dab.png # Dear upstream developers, please provide an application icon + - mkdir -p ./appdir/usr/share/icons/hicolor/256x256/apps/ + - cp qt-dab.png appdir/usr/share/icons/hicolor/256x256/apps/ + +after_success: + - wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" + - chmod a+x linuxdeployqt*.AppImage + - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH + - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/* -bundle-non-qt-libs + - # Workaround for https://github.com/probonopd/linuxdeployqt/issues/31#issuecomment-289267637 + - ./linuxdeployqt*.AppImage --appimage-extract + - find appdir/usr/plugins/ -type f -exec squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/../../lib' {} \; + - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/* -bundle-non-qt-libs + - # Workaround for https://github.com/JvanKatwijk/qt-dab/issues/34 + - find /usr/lib/ -type f -name librtlsdr.so* -exec cp {} appdir/usr/lib/librtlsdr.so \; + - chmod a+x appimage/* ; rm appdir/AppRun ; cp appimage/* appdir/ + - export PATH=squashfs-root/usr/bin/:$PATH # Make it pick up our private patched mksquashfs; https://github.com/plougher/squashfs-tools/pull/13/files + - squashfs-root/usr/bin/appimagetool $(readlink -f ./appdir/) + - find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq + - curl --upload-file ./Qt_DAB*.AppImage https://transfer.sh/Qt_DAB-git.$(git rev-parse --short HEAD)-x86_64.AppImage + - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh + - bash ./upload.sh ./Qt_DAB*.AppImage +