mirror of
https://github.com/google/liblc3.git
synced 2026-04-18 05:35:31 +00:00
feature: Add 2.5 ms and 5 ms LC3 plus frame durations
fix: Check TNS bitstream data fix: LTPF Activation with 2.5 ms frame sizes
This commit is contained in:
committed by
Antoine Soulier
parent
a75f187e00
commit
149cb6537e
@@ -100,14 +100,15 @@ class Decoder:
|
||||
|
||||
def check_appendix_c(dt):
|
||||
|
||||
ok = True
|
||||
i0 = dt - T.DT_7M5
|
||||
|
||||
dec_c = lc3.setup_decoder(int(T.DT_MS[dt] * 1000), 16000)
|
||||
ok = True
|
||||
|
||||
for i in range(len(C.BYTES_AC[dt])):
|
||||
for i in range(len(C.BYTES_AC[i0])):
|
||||
|
||||
pcm = lc3.decode(dec_c, bytes(C.BYTES_AC[dt][i]))
|
||||
ok = ok and np.max(np.abs(pcm - C.X_HAT_CLIP[dt][i])) < 1
|
||||
pcm = lc3.decode(dec_c, bytes(C.BYTES_AC[i0][i]))
|
||||
ok = ok and np.max(np.abs(pcm - C.X_HAT_CLIP[i0][i])) < 1
|
||||
|
||||
return ok
|
||||
|
||||
@@ -115,7 +116,7 @@ def check():
|
||||
|
||||
ok = True
|
||||
|
||||
for dt in range(T.NUM_DT):
|
||||
for dt in range(T.DT_7M5, T.NUM_DT):
|
||||
ok = ok and check_appendix_c(dt)
|
||||
|
||||
return ok
|
||||
|
||||
Reference in New Issue
Block a user