[FFmpeg-cvslog] aacps.c: Move large arrays to context to reduce stack usage.

Reimar Döffinger git at videolan.org
Thu Dec 18 23:52:46 CET 2014


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sat Nov 22 21:26:45 2014 +0100| [de6d44829c43c666d881979520e86aabb10e105f] | committer: Reimar Döffinger

aacps.c: Move large arrays to context to reduce stack usage.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

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

 libavcodec/aacps.c |    4 ++--
 libavcodec/aacps.h |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c
index 20012f9..ea5a5d2 100644
--- a/libavcodec/aacps.c
+++ b/libavcodec/aacps.c
@@ -908,8 +908,8 @@ static void stereo_processing(PSContext *ps, float (*l)[32][2], float (*r)[32][2
 
 int ff_ps_apply(AVCodecContext *avctx, PSContext *ps, float L[2][38][64], float R[2][38][64], int top)
 {
-    LOCAL_ALIGNED_16(float, Lbuf, [91], [32][2]);
-    LOCAL_ALIGNED_16(float, Rbuf, [91], [32][2]);
+    float (*Lbuf)[32][2] = ps->Lbuf;
+    float (*Rbuf)[32][2] = ps->Rbuf;
     const int len = 32;
     int is34 = ps->is34bands;
 
diff --git a/libavcodec/aacps.h b/libavcodec/aacps.h
index 29323ff..174770d 100644
--- a/libavcodec/aacps.h
+++ b/libavcodec/aacps.h
@@ -71,6 +71,8 @@ typedef struct PSContext {
     DECLARE_ALIGNED(16, float, H12)[2][PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC];
     DECLARE_ALIGNED(16, float, H21)[2][PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC];
     DECLARE_ALIGNED(16, float, H22)[2][PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC];
+    DECLARE_ALIGNED(16, float, Lbuf)[91][32][2];
+    DECLARE_ALIGNED(16, float, Rbuf)[91][32][2];
     int8_t opd_hist[PS_MAX_NR_IIDICC];
     int8_t ipd_hist[PS_MAX_NR_IIDICC];
     PSDSPContext dsp;



More information about the ffmpeg-cvslog mailing list