# HG changeset patch # User vitor # Date 1214252331 0 # Node ID b55bedad89add55d79f0948ac546d6c23629b903 # Parent 8a4a7069737d1410437e38d422c53717b14d8f02 Rename rotate_buffer() to copy_and_dup() and doxy it diff -r 8a4a7069737d -r b55bedad89ad ra144.c --- 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;