diff options
| -rw-r--r-- | .github/workflows/cmake.yml | 1 | ||||
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rw-r--r-- | README.md | 7 | ||||
| -rw-r--r-- | doc/Makefile | 12 | ||||
| -rw-r--r-- | doc/codec2.pdf | bin | 322270 -> 322353 bytes |
5 files changed, 18 insertions, 6 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 61c9c5c..b5425d0 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -22,6 +22,7 @@ jobs: run: | sudo apt-get update sudo apt-get install octave octave-common octave-signal liboctave-dev gnuplot sox p7zip-full python3-numpy valgrind clang-format + sudo apt-get install texmaker texlive-bibtex-extra texlive-science - name: Create Build Directory shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index d96667f..3f3a1dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,6 +312,10 @@ if(UNITTEST) COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}; clang-format --dry-run --Werror src/*.c src/*.h unittest/*.c demo/*.c") + add_test(NAME test_codec2_doc + COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/doc; + CODEC2_SRC=${CMAKE_CURRENT_SOURCE_DIR} CODEC2_BINARY=${CMAKE_CURRENT_BINARY_DIR} make") + add_test(NAME test_freedv_get_hash COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/unittest/thash") @@ -110,6 +110,10 @@ We have standardized on C99 and develop and test using gcc on a Linux platform. make ``` +## Documentation + +An algorithm description can be found in `doc/codec2.pdf`. + ## Programs + See `demo` directory for simple examples of using Codec and the FreeDV API. @@ -138,7 +142,7 @@ CTest is used as a test framework, with support from [GNU Octave](https://www.gn 1. Install GNU Octave and libraries on Ubuntu with: ``` - sudo apt install octave octave-common octave-signal liboctave-dev gnuplot python3-numpy sox valgrind clang-format + sudo apt install octave octave-common octave-signal liboctave-dev gnuplot python3-numpy sox valgrind clang-format texmaker texlive-bibtex-extra texlive-science ``` 1. To build and run the tests: ``` @@ -180,6 +184,7 @@ CTest is used as a test framework, with support from [GNU Octave](https://www.gn ``` cmake - cmake support files demo - Simple Codec 2 and FreeDv API demo applications +doc - documentation octave - Octave scripts used to support ctests src - C source code for Codec 2, FDMDV modem, COHPSK modem, FreeDV API raw - speech files in raw format (16 bits signed linear 8 kHz) diff --git a/doc/Makefile b/doc/Makefile index 1eaab1b..606d05f 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,7 +1,7 @@ # Makefile for codec2.pdf # # usage: -# Build codec2 with -DDUMP (see README) +# Build codec2 with -DUNITEST=1 (see README) # cd ~/codec2/doc # make @@ -9,14 +9,16 @@ # defaults below. Need to run cmake with -DDUMP CODEC2_SRC ?= $(HOME)/codec2 -CODEC2_BINARY ?= $(HOME)/codec2/build_linux/src +CODEC2_BINARY ?= $(HOME)/codec2/build_linux -PATH := $(PATH):$(CODEC2_BINARY) +PATH := $(PATH):$(CODEC2_BINARY)/src DOCNAME := codec2 PLOT_FILES := hts2a_37_sn.tex hts2a_37_sw.tex hts2a_37_lpc_lsp.tex hts2a_37_lpc_pf.tex -$(DOCNAME).pdf: $(PLOT_FILES) $(DOCNAME).tex $(DOCNAME)_refs.bib +# For automated tests we always want to build the PDF, despite codec2.pdf existing in the repo +.PHONY: pdf +pdf: $(PLOT_FILES) $(DOCNAME).tex $(DOCNAME)_refs.bib pdflatex $(DOCNAME).tex bibtex $(DOCNAME).aux pdflatex $(DOCNAME).tex @@ -29,4 +31,4 @@ $(PLOT_FILES): .PHONY: clean clean: - rm *.blg *.bbl *.aux *.log $(DOCNAME).pdf
\ No newline at end of file + rm -f *.blg *.bbl *.aux *.log *.out $(DOCNAME).pdf hts2a*
\ No newline at end of file diff --git a/doc/codec2.pdf b/doc/codec2.pdf Binary files differindex ae71c92..ac2e63c 100644 --- a/doc/codec2.pdf +++ b/doc/codec2.pdf |
