Lines Matching +full:- +full:r
4 % src_test - test with SRC test bench objective audio quality parameters
8 % bits_in - input word length
9 % bits_out - output word length
10 % fs_in - vector of rates in
11 % fs_out - vector of rates out
13 % A default in-out matrix with 32 bits data is tested if the
17 % SPDX-License-Identifier: BSD-3-Clause
48 t.thdnf_db_max = -80;
49 t.thdnf_db_16b = -60;
52 t.aap_db_max = -60;
53 t.aip_db_max = -60;
77 r.fs_in_list = fs_in_list;
78 r.fs_out_list = fs_out_list;
79 r.g = NaN(n_fsi, n_fso);
80 r.dr = NaN(n_fsi, n_fso);
81 r.fr_db = NaN(n_fsi, n_fso);
82 r.fr_hz = NaN(n_fsi, n_fso, 2);
83 r.fr3db_hz = NaN(n_fsi, n_fso);
84 r.thdnf = NaN(n_fsi, n_fso);
85 r.aap = NaN(n_fsi, n_fso);
86 r.aip = NaN(n_fsi, n_fso);
87 r.pf = NaN(n_fsi, n_fso, n_test);
88 r.n_fail = 0;
89 r.n_pass = 0;
90 r.n_skipped = 0;
91 r.n_na = 0;
95 v = -ones(n_test,1); % Set pass/fail test verdict to not executed
100 if v(1) ~= -1 && t.full_test == 1
102 [v(2), r.g(a,b)] = g_test(t);
103 [v(3), r.fr_db(a,b), r.fr_hz(a,b,:), r.fr3db_hz(a,b)] = fr_test(t);
104 [v(4), r.thdnf(a,b)] = thdnf_test(t);
105 [v(5), r.dr(a,b)] = dr_test(t);
106 [v(6), r.aap(a,b)] = aap_test(t);
107 [v(7), r.aip(a,b)] = aip_test(t);
110 r.pf(a, b, :) = v;
111 if v(1) ~= -1
113 r.n_fail = r.n_fail + length(idx);
115 r.n_pass = r.n_pass + length(idx);
116 idx = find(v == -1);
117 r.n_skipped = r.n_skipped + length(idx);
118 idx = find(v == -2);
119 r.n_na = r.n_na + length(idx);
129 print_val('SRC', 'Gain dB', fn, k * fs_in_list, k * fs_out_list, r.g, r.pf);
133 print_fr('SRC', fn, k * fs_in_list, k * fs_out_list, r.fr_db, r.fr_hz, r.pf);
137 print_val('SRC', 'Frequency response -3 dB 0 - X kHz', ...
138 fn, k * fs_in_list, k * fs_out_list, r.fr3db_hz/1e3, r.pf);
142 print_val('SRC', 'Worst-case THD+N vs. frequency', ...
143 fn, k * fs_in_list, k * fs_out_list, r.thdnf, r.pf);
147 print_val('SRC', 'Dynamic range dB (CCIR-RMS)', ...
148 fn, k * fs_in_list, k * fs_out_list, r.dr, r.pf);
153 fn, k * fs_in_list, k * fs_out_list, r.aap, r.pf);
158 fn, k * fs_in_list, k * fs_out_list, r.aip, r.pf);
162 print_pf('SRC', fn, k * fs_in_list, k * fs_out_list, r.pf, 'chirp/gain/FR/THD+N/DR/AAP/AIP');
165 fprintf('Number of passed tests = %d\n', r.n_pass);
166 fprintf('Number of failed tests = %d\n', r.n_fail);
167 fprintf('Number of non-applicable tests = %d\n', r.n_na);
168 fprintf('Number of skipped tests = %d\n', r.n_skipped);
171 if r.n_fail > 0 || r.n_pass < 1
177 n_fail = r.n_fail;
178 n_pass = r.n_pass;
179 n_na = r.n_na;
225 test.fr_rp_max_db = prm.rp_tot; % Max. ripple +/- dB allowed
325 fail = -2;
359 fail = -2;
393 fprintf('Spectrogram test %d -> %d ...\n', t.fs1, t.fs2);
433 test.plot_fr_axis = [10 100e3 -4 1];
434 test.plot_thdn_axis = [10 100e3 -140 -59];
461 %print(pfn, '-dpng');