On 20.05.2023 16:17, Lynne wrote:

Yeah, no, this patch is far from complete.
I have a more complete and correct patch I was working on which had a minor 
issue I didn't get around to fixing.
I'll see if I have missed changing a constant that you haven't missed.

Your patch looks definitely more complete - but I think there is one change missing:

@@ -1190,16 +1191,20 @@ static void sbr_qmf_analysis(AVFloatDSPContext *dsp, AVTXContext *mdct,
                              av_tx_fn mdct_fn,
 #endif /* USE_FIXED */
                              SBRDSPContext *sbrdsp, const INTFLOAT *in, INTFLOAT *x, -                             INTFLOAT z[320], INTFLOAT W[2][32][32][2], int buf_idx) +                             INTFLOAT z[320], INTFLOAT W[2][32][32][2], int buf_idx,
+                             int frame_length_short)
 {
     int i;
 #if USE_FIXED
     int j;
 #endif
-    memcpy(x    , x+1024, (320-32)*sizeof(x[0]));
-    memcpy(x+288, in,         1024*sizeof(x[0]));
-    for (i = 0; i < 32; i++) { // numTimeSlots*RATE = 16*2 as 960 sample frames
-                               // are not supported
+    const int frameLength = frame_length_short ? 960 : 1024;
+    const int numTimeSlots = frame_length_short ? 15 : 16;
+
+    memcpy(x    , x+frameLength, (320-32)*sizeof(x[0]));
+    memcpy(x+288, in,         frameLength*sizeof(x[0]));

The adaptation of the memcpy to the changed framelength.

Best regards,
  Matthias

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to