[FFmpeg-devel] [PATCH] avoid aligned stack variable in dnxhdenc.c

Reimar Döffinger Reimar.Doeffinger
Mon May 25 10:49:15 CEST 2009


Hello,
haven't actually tested but can't imagine it would have any really bad
effect, e.g. on speed.
Index: dnxhdenc.c
===================================================================
--- dnxhdenc.c  (revision 18938)
+++ dnxhdenc.c  (working copy)
@@ -416,7 +416,7 @@
             dnxhd_get_blocks(ctx, mb_x, mb_y);
 
             for (i = 0; i < 8; i++) {
-                DECLARE_ALIGNED_16(DCTELEM, block[64]);
+                DCTELEM *block = ctx->blocks[8];
                 DCTELEM *src_block = ctx->blocks[i];
                 int overflow, nbits, diff, last_index;
                 int n = dnxhd_switch_matrix(ctx, i);
Index: dnxhdenc.h
===================================================================
--- dnxhdenc.h  (revision 18938)
+++ dnxhdenc.h  (working copy)
@@ -54,7 +54,7 @@
     int interlaced;
     int cur_field;
 
-    DECLARE_ALIGNED_16(DCTELEM, blocks[8][64]);
+    DECLARE_ALIGNED_16(DCTELEM, blocks[9][64]);
 
     int      (*qmatrix_c)     [64];
     int      (*qmatrix_l)     [64];




More information about the ffmpeg-devel mailing list