diff ra144.c @ 6832:9584a95fefcd libavcodec

Cosmetics: move function to remove forward declarations
author vitor
date Sat, 17 May 2008 14:51:49 +0000
parents 5ea1c314fae9
children 37464a7b3f59
line wrap: on
line diff
--- a/ra144.c	Sat May 17 14:42:55 2008 +0000
+++ b/ra144.c	Sat May 17 14:51:49 2008 +0000
@@ -62,11 +62,6 @@
     return 0;
 }
 
-static void final(const short *i1, const short *i2, void *out, int *statbuf, int len);
-static void add_wav(int n, int f, int m1, int m2, int m3, const short *s1, const short *s2, const short *s3, short *dest);
-static int irms(const short *data, int factor);
-static void rotate_block(const short *source, short *target, int offset);
-
 /* lookup square roots in table */
 static int t_sqrt(unsigned int x)
 {
@@ -100,40 +95,6 @@
         a2[x] >>= 4;
 }
 
-
-/* do quarter-block output */
-static void do_output_subblock(Real144_internal *glob, const unsigned short  *gsp, unsigned int gval, signed short *output_buffer, GetBitContext *gb)
-{
-    unsigned short int buffer_a[40];
-    unsigned short int *block;
-    int e, f, g;
-    int a = get_bits(gb, 7);
-    int d = get_bits(gb, 8);
-    int b = get_bits(gb, 7);
-    int c = get_bits(gb, 7);
-
-    if (a) {
-        a += HALFBLOCK - 1;
-        rotate_block(glob->buffer_2, buffer_a, a);
-    }
-
-    e = ((ftable1[b] >> 4) * gval) >> 8;
-    f = ((ftable2[c] >> 4) * gval) >> 8;
-
-    if (a)
-        g = irms(buffer_a, gval) >> 12;
-    else
-        g = 0;
-
-    memmove(glob->buffer_2, glob->buffer_2 + BLOCKSIZE, (BUFFERSIZE - BLOCKSIZE) * 2);
-    block = glob->buffer_2 + BUFFERSIZE - BLOCKSIZE;
-
-    add_wav(d, a, g, e, f, buffer_a, etable1 + b*BLOCKSIZE,
-            etable2 + c*BLOCKSIZE, block);
-
-    final(gsp, block, output_buffer, glob->buffer, BLOCKSIZE);
-}
-
 /* rotate block */
 static void rotate_block(const short *source, short *target, int offset)
 {
@@ -268,6 +229,39 @@
     return res;
 }
 
+/* do quarter-block output */
+static void do_output_subblock(Real144_internal *glob, const unsigned short  *gsp, unsigned int gval, signed short *output_buffer, GetBitContext *gb)
+{
+    unsigned short int buffer_a[40];
+    unsigned short int *block;
+    int e, f, g;
+    int a = get_bits(gb, 7);
+    int d = get_bits(gb, 8);
+    int b = get_bits(gb, 7);
+    int c = get_bits(gb, 7);
+
+    if (a) {
+        a += HALFBLOCK - 1;
+        rotate_block(glob->buffer_2, buffer_a, a);
+    }
+
+    e = ((ftable1[b] >> 4) * gval) >> 8;
+    f = ((ftable2[c] >> 4) * gval) >> 8;
+
+    if (a)
+        g = irms(buffer_a, gval) >> 12;
+    else
+        g = 0;
+
+    memmove(glob->buffer_2, glob->buffer_2 + BLOCKSIZE, (BUFFERSIZE - BLOCKSIZE) * 2);
+    block = glob->buffer_2 + BUFFERSIZE - BLOCKSIZE;
+
+    add_wav(d, a, g, e, f, buffer_a, etable1 + b*BLOCKSIZE,
+            etable2 + c*BLOCKSIZE, block);
+
+    final(gsp, block, output_buffer, glob->buffer, BLOCKSIZE);
+}
+
 static void dec1(Real144_internal *glob, const int *data, const int *inp,
                  int n, int f)
 {