[FFmpeg-cvslog] aacdec_usac: zero out alpha values for the current frame

Lynne git at videolan.org
Sat Jun 8 01:23:24 EEST 2024


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Fri Jun  7 04:17:13 2024 +0200| [714596bcbf990ec3e82f8fde110954755cc1bf6e] | committer: Lynne

aacdec_usac: zero out alpha values for the current frame

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=714596bcbf990ec3e82f8fde110954755cc1bf6e
---

 libavcodec/aac/aacdec_usac.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
index fbec6e26bd..aa89b83182 100644
--- a/libavcodec/aac/aacdec_usac.c
+++ b/libavcodec/aac/aacdec_usac.c
@@ -691,6 +691,10 @@ static int decode_usac_stereo_cplx(AACDecContext *ac, AACUsacStereo *us,
     if (!indep_flag)
         delta_code_time = get_bits1(gb);
 
+    /* Alpha values must be zeroed out if pred_used is 0. */
+    memset(us->alpha_q_re, 0, sizeof(us->alpha_q_re));
+    memset(us->alpha_q_im, 0, sizeof(us->alpha_q_im));
+
     /* TODO: shouldn't be needed */
     for (int g = 0; g < num_window_groups; g++) {
         for (int sfb = 0; sfb < cpe->max_sfb_ste; sfb += SFB_PER_PRED_BAND) {



More information about the ffmpeg-cvslog mailing list