blob: 3a666fb595e6668028ba5939654e5472397bcf4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
# Copyright 2011 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.
########################################################################
# Create executable to generate other sources
# http://www.vtk.org/Wiki/CMake_Cross_Compiling#Using_executables_in_the_build_created_during_the_build
########################################################################
IF(NOT CMAKE_CROSSCOMPILING)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
ADD_EXECUTABLE(generate_codebook ${CMAKE_CURRENT_SOURCE_DIR}/generate_codebook.c)
TARGET_LINK_LIBRARIES(generate_codebook -lm)
EXPORT(TARGETS generate_codebook APPEND FILE ${EXPORT_FILE})
ENDIF()
########################################################################
# Create codebook
########################################################################
SET(CODEBOOKS
${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp1.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp2.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp3.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp4.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp5.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp6.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp7.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp8.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp9.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/lsp10.txt
)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/codebook.c
DEPENDS generate_codebook ${CODEBOOKS}
COMMAND generate_codebook lsp_cb ${CODEBOOKS} > ${CMAKE_CURRENT_BINARY_DIR}/codebook.c
)
########################################################################
# Create codebookd
########################################################################
SET(CODEBOOKSD
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp1.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp2.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp3.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp4.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp5.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp6.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp7.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp8.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp9.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp10.txt
)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/codebookd.c
DEPENDS generate_codebook ${CODEBOOKSD}
COMMAND generate_codebook lsp_cbd ${CODEBOOKSD} > ${CMAKE_CURRENT_BINARY_DIR}/codebookd.c
)
########################################################################
# Create codebookdvq
########################################################################
SET(CODEBOOKSDVQ
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp1.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp2.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp3.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp4.txt
${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp5.txt
)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/codebookdvq.c
DEPENDS generate_codebook ${CODEBOOKSDVQ}
COMMAND generate_codebook lsp_cbdvq ${CODEBOOKSDVQ} > ${CMAKE_CURRENT_BINARY_DIR}/codebookdvq.c
)
########################################################################
# Append all sources in this dir
########################################################################
LIST(APPEND gr_vocoder_sources
${CMAKE_CURRENT_BINARY_DIR}/codebook.c
${CMAKE_CURRENT_BINARY_DIR}/codebookd.c
${CMAKE_CURRENT_BINARY_DIR}/codebookdvq.c
${CMAKE_CURRENT_SOURCE_DIR}/dump.c
${CMAKE_CURRENT_SOURCE_DIR}/lpc.c
${CMAKE_CURRENT_SOURCE_DIR}/nlp.c
${CMAKE_CURRENT_SOURCE_DIR}/postfilter.c
${CMAKE_CURRENT_SOURCE_DIR}/sine.c
${CMAKE_CURRENT_SOURCE_DIR}/codec2.c
${CMAKE_CURRENT_SOURCE_DIR}/fft.c
${CMAKE_CURRENT_SOURCE_DIR}/kiss_fft.c
${CMAKE_CURRENT_SOURCE_DIR}/interp.c
${CMAKE_CURRENT_SOURCE_DIR}/lsp.c
${CMAKE_CURRENT_SOURCE_DIR}/phase.c
${CMAKE_CURRENT_SOURCE_DIR}/quantise.c
${CMAKE_CURRENT_SOURCE_DIR}/pack.c
)
|