From: Matthias Walliczek <matthias@walliczek.de>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avcodec/aacdec: add support for AAC SBR with 960 frame length
Date: Sat, 20 May 2023 16:34:34 +0200
Message-ID: <9735e87c-384d-3d3c-98f7-593db4b22605@walliczek.de> (raw)
In-Reply-To: <NVtWPRX--3-9@lynne.ee>
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-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2023-05-20 14:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-20 13:25 Matthias Walliczek
2023-05-20 13:29 ` Paul B Mahol
2023-05-20 14:06 ` Matthias Walliczek
2023-05-20 14:17 ` Lynne
2023-05-20 14:34 ` Matthias Walliczek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9735e87c-384d-3d3c-98f7-593db4b22605@walliczek.de \
--to=matthias@walliczek.de \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git