[SCM] libav/experimental: Only one out of two values of gbuf1 is actually used. Make it half the size.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:20:53 UTC 2013


The following commit has been merged in the experimental branch:
commit c7666095fae221b3f25ca05d46b3150c67f2b7f6
Author: Vitor Sessak <vitor1001 at gmail.com>
Date:   Wed May 21 16:41:58 2008 +0000

    Only one out of two values of gbuf1 is actually used. Make it half the size.
    
    Originally committed as revision 13213 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index f52396e..5bc4827 100644
--- a/libavcodec/ra144.c
+++ b/libavcodec/ra144.c
@@ -32,7 +32,7 @@
 /* internal globals */
 typedef struct {
     unsigned int     oldval;
-    unsigned int     gbuf1[8];
+    unsigned int     gbuf1[4];
     unsigned short   gbuf2[120];
     unsigned int    *decptr;                /* decoder ptr */
     signed   short  *decsp;
@@ -268,7 +268,6 @@ static void dec1(Real144_internal *glob, const int *data, const int *inp,
     short *ptr,*end;
 
     *(glob->decptr++) = rms(data, f);
-    glob->decptr++;
     end = (ptr = glob->decsp) + (n * 10);
 
     while (ptr < end)
@@ -367,7 +366,6 @@ static void dec2(Real144_internal *glob, const int *data, const int *inp,
         dec1(glob, data, inp, n, f);
     } else {
         *(glob->decptr++) = rms(work, f);
-        glob->decptr++;
     }
     glob->decsp += n * 10;
 }
@@ -412,7 +410,7 @@ static int ra144_decode_frame(AVCodecContext * avctx,
 
     /* do output */
     for (b=0, c=0; c<4; c++) {
-        unsigned int gval = glob->gbuf1[c * 2];
+        unsigned int gval = glob->gbuf1[c];
         unsigned short *gsp = glob->gbuf2 + b;
         signed short output_buffer[40];
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list