Commit bb83e60dda for ffmpeg
commit bb83e60dda0b94a86b7ed9cd10f22fad6652e2d3
Author: Jun Zhao <barryjzhao@tencent.com>
Date: Sat Oct 10 16:36:22 2026 +0800
tests/fate/amrnb: cover resumption after a muted silent period
The first speech frame after silence resumes from the comfort-noise
state, including after that noise has been muted. Record the native
decoder's output level for the first speech frame after a muted DTX
period.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
diff --git a/tests/fate/amrnb.mak b/tests/fate/amrnb.mak
index 7790832f1e..7ee463392d 100644
--- a/tests/fate/amrnb.mak
+++ b/tests/fate/amrnb.mak
@@ -85,6 +85,18 @@ fate-amrnb-nodata-q-equal: CMD = ffmpeg -i $(TARGET_PATH)/tests/data/fate/amrnb-
fate-amrnb-nodata-q-equal: CMP = grep
fate-amrnb-nodata-q-equal: REF = RMS level dB: -inf
+# A silent period keeps every frame, including one that runs long enough
+# for the comfort noise to be muted before speech resumes.
+FATE_AMRNB_DTX-$(call ALLYES, $(AMRNB_DTX_DEPS)) += fate-amrnb-dtx-duration
+fate-amrnb-dtx-duration: CMD = ffmpeg -i $(TARGET_PATH)/tests/data/fate/amrnb-dtx-mute-resume.amr -af "aresample=osf=flt,astats=metadata=0:reset=0" -c:a pcm_f32le -f null -
+fate-amrnb-dtx-duration: CMP = grep
+fate-amrnb-dtx-duration: REF = Number of samples: 10400
+
+# Frame 63 is the first speech frame after the comfort noise has been muted.
+FATE_AMRNB_DTX-$(call ALLYES, $(AMRNB_DTX_DEPS)) += fate-amrnb-dtx-mute-resume
+fate-amrnb-dtx-mute-resume: CMD = ffmpeg -i $(TARGET_PATH)/tests/data/fate/amrnb-dtx-mute-resume.amr -af "atrim=start_sample=10080:end_sample=10240,aresample=osf=flt,astats=metadata=0:reset=0" -c:a pcm_f32le -f null -
+fate-amrnb-dtx-mute-resume: CMP = grep
+fate-amrnb-dtx-mute-resume: REF = RMS level dB: -89\.
fate-amrnb-sid-update: tests/data/fate/amrnb-sid-update.amr
fate-amrnb-sid-update-during-dtx: tests/data/fate/amrnb-state-resume-update.amr
@@ -92,6 +104,7 @@ fate-amrnb-state-resume-update: tests/data/fate/amrnb-state-resume-update.amr
fate-amrnb-nodata-ft15-q1 fate-amrnb-nodata-ft15-q0 fate-amrnb-nodata-reserved-q1: tests/data/fate/amrnb-nodata-cases.amr
fate-amrnb-sid-after-nodata: tests/data/fate/amrnb-sid-after-nodata.amr
fate-amrnb-nodata-q-equal: tests/data/fate/amrnb-nodata-qswap-q0.amr tests/data/fate/amrnb-nodata-cases.amr
+fate-amrnb-dtx-duration fate-amrnb-dtx-mute-resume: tests/data/fate/amrnb-dtx-mute-resume.amr
fate-amrnb: $(FATE_AMRNB_DTX-yes)
FATE_FFMPEG += $(FATE_AMRNB_DTX-yes)