mirror of https://github.com/drowe67/codec2.git
rm a bunch of wav and raw files not needed for tests
parent
2e89c91d45
commit
141f3862d7
|
@ -381,10 +381,10 @@ endif()
|
|||
add_test(NAME test_codec2_700c_octave_port
|
||||
COMMAND sh -c "
|
||||
cd ${CMAKE_CURRENT_BINARY_DIR}/src;
|
||||
./c2sim ${CMAKE_CURRENT_SOURCE_DIR}/raw/cq_ref.raw --phase0 --postfilter --dump cq_ref --lpc 10 --dump_pitch_e cq_ref_pitche.txt;
|
||||
cd ${CMAKE_CURRENT_BINARY_DIR}/unittest; ./tnewamp1 ${CMAKE_CURRENT_SOURCE_DIR}/raw/cq_ref.raw;
|
||||
./c2sim ${CMAKE_CURRENT_SOURCE_DIR}/raw/hts1a.raw --phase0 --postfilter --dump hts1a --lpc 10 --dump_pitch_e hts1a_pitche.txt;
|
||||
cd ${CMAKE_CURRENT_BINARY_DIR}/unittest; ./tnewamp1 ${CMAKE_CURRENT_SOURCE_DIR}/raw/hts1a.raw;
|
||||
cd ${CMAKE_CURRENT_SOURCE_DIR}/octave;
|
||||
DISPLAY=\"\" octave-cli -qf --eval 'tnewamp1(\"${CMAKE_CURRENT_BINARY_DIR}/src/cq_ref\", \"${CMAKE_CURRENT_BINARY_DIR}/unittest\")'")
|
||||
DISPLAY=\"\" octave-cli -qf --eval 'tnewamp1(\"${CMAKE_CURRENT_BINARY_DIR}/src/hts1a\", \"${CMAKE_CURRENT_BINARY_DIR}/unittest\")'")
|
||||
set_tests_properties(test_codec2_700c_octave_port PROPERTIES PASS_REGULAR_EXPRESSION "fails: 0")
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
|
|
|
@ -1,78 +0,0 @@
|
|||
% hf_sim.m
|
||||
% David Rowe March 2014
|
||||
%
|
||||
% Two path CCIR poor HF channel simulation, with apaologies to PathSim
|
||||
|
||||
% Init HF channel model from stored sample files of spreading signal ----------------------------------
|
||||
|
||||
global spread;
|
||||
global spread_2ms;
|
||||
global hf_gain;
|
||||
|
||||
% convert "spreading" samples from 1kHz carrier at Fs to complex
|
||||
% baseband, generated by passing a 1kHz sine wave through PathSim with
|
||||
% the ccir-poor model, enabling one path at a time. Because I'm too
|
||||
% lazy to generate my own spreading signals
|
||||
|
||||
Fc = 1000; Fs=8000;
|
||||
fspread = fopen("../raw/sine1k_2Hz_spread.raw","rb");
|
||||
spread1k = fread(fspread, "int16")/10000;
|
||||
fclose(fspread);
|
||||
fspread = fopen("../raw/sine1k_2ms_delay_2Hz_spread.raw","rb");
|
||||
spread1k_2ms = fread(fspread, "int16")/10000;
|
||||
fclose(fspread);
|
||||
|
||||
% down convert to complex baseband
|
||||
|
||||
spreadbb = spread1k.*exp(-j*(2*pi*Fc/Fs)*(1:length(spread1k))');
|
||||
spreadbb_2ms = spread1k_2ms.*exp(-j*(2*pi*Fc/Fs)*(1:length(spread1k_2ms))');
|
||||
|
||||
% remove -2000 Hz image
|
||||
|
||||
b = fir1(50, 5/Fs);
|
||||
spread = filter(b,1,spreadbb);
|
||||
spread_2ms = filter(b,1,spreadbb_2ms);
|
||||
|
||||
% discard first 1000 samples as these were near 0, probably as
|
||||
% PathSim states were ramping up
|
||||
|
||||
spread = spread(1000:length(spread));
|
||||
spread_2ms = spread_2ms(1000:length(spread_2ms));
|
||||
|
||||
hf_gain = 1.0/sqrt(var(spread)+var(spread_2ms));
|
||||
|
||||
% This function simulates the HF channel at 8kHz for real signals. A
|
||||
% good use case is passing a vector of speech samples through it to
|
||||
% simulate SSB over HF. There's a really good reason for the 300 -
|
||||
% 3000 Hz filter that escapes me right now :-)
|
||||
|
||||
function [sim_out snr3kHz_measured ] = hf_sim_real(sim_in, snr3kHz)
|
||||
|
||||
% 300 - 3000 Hz filter
|
||||
|
||||
b = fir1(100,[300/4000, 3000/4000], 'pass');
|
||||
|
||||
% det power of unit variance noise passed through this filter
|
||||
|
||||
filter_var = var(filter(b,1,randn(1000,1)));
|
||||
|
||||
% Start simulation
|
||||
|
||||
s = hilbert(filter(b,1,sim_in));
|
||||
n1 = length(s); n2 = length(spread);
|
||||
n = min(n1,n2);
|
||||
path1 = s(1:n) .* spread(1:n);
|
||||
path2 = s(1:n) .* spread_2ms(1:n);
|
||||
delay = floor(0.002*Fs);
|
||||
|
||||
combined = path1(delay+1:n) + path2(1:n-delay);
|
||||
|
||||
snr = 10 .^ (snr3kHz/10);
|
||||
variance = (combined'*combined)/(snr*n);
|
||||
noise = sqrt(variance*0.5/filter_var)*(randn(n-delay,1) + j*randn(n-delay,1));
|
||||
filtered_noise = filter(b,1,noise);
|
||||
|
||||
sim_out = real(combined+filtered_noise);
|
||||
snr3kHz_measured = 10*log10(var(real(combined))/var(real(filtered_noise)));
|
||||
endfunction
|
||||
|
Binary file not shown.
BIN
raw/big_dog.raw
BIN
raw/big_dog.raw
Binary file not shown.
BIN
raw/cq_ref.raw
BIN
raw/cq_ref.raw
Binary file not shown.
BIN
raw/cross.raw
BIN
raw/cross.raw
Binary file not shown.
BIN
raw/f2400.raw
BIN
raw/f2400.raw
Binary file not shown.
BIN
raw/forig.raw
BIN
raw/forig.raw
Binary file not shown.
BIN
raw/g3plx.raw
BIN
raw/g3plx.raw
Binary file not shown.
BIN
raw/hts.raw
BIN
raw/hts.raw
Binary file not shown.
BIN
raw/hts2.raw
BIN
raw/hts2.raw
Binary file not shown.
BIN
raw/hts2a.raw
BIN
raw/hts2a.raw
Binary file not shown.
BIN
raw/m2400.raw
BIN
raw/m2400.raw
Binary file not shown.
BIN
raw/mmt1.raw
BIN
raw/mmt1.raw
Binary file not shown.
BIN
raw/morig.raw
BIN
raw/morig.raw
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
raw/vk5qi.raw
BIN
raw/vk5qi.raw
Binary file not shown.
BIN
wav/all.wav
BIN
wav/all.wav
Binary file not shown.
BIN
wav/big_dog.wav
BIN
wav/big_dog.wav
Binary file not shown.
BIN
wav/cross.wav
BIN
wav/cross.wav
Binary file not shown.
BIN
wav/f2400.wav
BIN
wav/f2400.wav
Binary file not shown.
BIN
wav/forig.wav
BIN
wav/forig.wav
Binary file not shown.
BIN
wav/hts1a.wav
BIN
wav/hts1a.wav
Binary file not shown.
BIN
wav/hts2a.wav
BIN
wav/hts2a.wav
Binary file not shown.
BIN
wav/m2400.wav
BIN
wav/m2400.wav
Binary file not shown.
BIN
wav/mmt1.wav
BIN
wav/mmt1.wav
Binary file not shown.
BIN
wav/morig.wav
BIN
wav/morig.wav
Binary file not shown.
BIN
wav/ve9qrp.wav
BIN
wav/ve9qrp.wav
Binary file not shown.
BIN
wav/vk5qi.wav
BIN
wav/vk5qi.wav
Binary file not shown.
Loading…
Reference in New Issue