changeset 6836:e271c9b997b1 libavcodec

Only one out of two values of gbuf1 is actually used. Make it half the size.
author vitor
date Wed, 21 May 2008 16:41:58 +0000
parents 179da35eba93
children 1acb9df14634
files ra144.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ra144.c	Wed May 21 16:38:44 2008 +0000
+++ b/ra144.c	Wed May 21 16:41:58 2008 +0000
@@ -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 @@
     short *ptr,*end;
 
     *(glob->decptr++) = rms(data, f);
-    glob->decptr++;
     end = (ptr = glob->decsp) + (n * 10);
 
     while (ptr < end)
@@ -367,7 +366,6 @@
         dec1(glob, data, inp, n, f);
     } else {
         *(glob->decptr++) = rms(work, f);
-        glob->decptr++;
     }
     glob->decsp += n * 10;
 }
@@ -412,7 +410,7 @@
 
     /* 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];