Loading scripts/pyaudio3dtools/audioarray.py +8 −2 Original line number Diff line number Diff line Loading @@ -569,6 +569,12 @@ def ssnr( ss.append(ss_seg) # round to 2 decimals. this is just to be in line with the meg conformance tool if np.all(segment_counter == 0): # the reference signal was outside of [thresh_lowm thresh_high] for all segments -> return -inf # note that this is not in line with the mpeg conf tool which gives +/-0.0 in this case ssnr = np.asarray([-np.inf] * len(segment_counter)) else: # round to 2 decimals. this is just to be in line with the mpeg conformance tool ssnr = np.round(10 * np.log10(10 ** (np.sum(ss, axis=0) / segment_counter) - 1), 2) return ssnr Loading
scripts/pyaudio3dtools/audioarray.py +8 −2 Original line number Diff line number Diff line Loading @@ -569,6 +569,12 @@ def ssnr( ss.append(ss_seg) # round to 2 decimals. this is just to be in line with the meg conformance tool if np.all(segment_counter == 0): # the reference signal was outside of [thresh_lowm thresh_high] for all segments -> return -inf # note that this is not in line with the mpeg conf tool which gives +/-0.0 in this case ssnr = np.asarray([-np.inf] * len(segment_counter)) else: # round to 2 decimals. this is just to be in line with the mpeg conformance tool ssnr = np.round(10 * np.log10(10 ** (np.sum(ss, axis=0) / segment_counter) - 1), 2) return ssnr