diff ra144.c @ 7105:b55bedad89ad libavcodec

Rename rotate_buffer() to copy_and_dup() and doxy it
author vitor
date Mon, 23 Jun 2008 20:18:51 +0000
parents 8a4a7069737d
children 709ee2a35813
line wrap: on
line diff
--- a/ra144.c	Mon Jun 23 20:13:07 2008 +0000
+++ b/ra144.c	Mon Jun 23 20:18:51 2008 +0000
@@ -94,8 +94,11 @@
         coefs[x] >>= 4;
 }
 
-/* rotate block */
-static void rotate_block(const int16_t *source, int16_t *target, int offset)
+/**
+ * Copy the last offset values of *source to *target. If those values are not
+ * enough to fill the target buffer, fill it with another copy of those values.
+ */
+static void copy_and_dup(const int16_t *source, int16_t *target, int offset)
 {
     source += BUFFERSIZE - offset;
 
@@ -215,7 +218,7 @@
 
     if (cba_idx) {
         cba_idx += HALFBLOCK - 1;
-        rotate_block(ractx->adapt_cb, buffer_a, cba_idx);
+        copy_and_dup(ractx->adapt_cb, buffer_a, cba_idx);
         m[0] = irms(buffer_a, gval) >> 12;
     } else {
         m[0] = 0;