comparison 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
comparison
equal deleted inserted replaced
7104:8a4a7069737d 7105:b55bedad89ad
92 92
93 for (x=0; x < 10; x++) 93 for (x=0; x < 10; x++)
94 coefs[x] >>= 4; 94 coefs[x] >>= 4;
95 } 95 }
96 96
97 /* rotate block */ 97 /**
98 static void rotate_block(const int16_t *source, int16_t *target, int offset) 98 * Copy the last offset values of *source to *target. If those values are not
99 * enough to fill the target buffer, fill it with another copy of those values.
100 */
101 static void copy_and_dup(const int16_t *source, int16_t *target, int offset)
99 { 102 {
100 source += BUFFERSIZE - offset; 103 source += BUFFERSIZE - offset;
101 104
102 if (offset > BLOCKSIZE) { 105 if (offset > BLOCKSIZE) {
103 memcpy(target, source, BLOCKSIZE*sizeof(*target)); 106 memcpy(target, source, BLOCKSIZE*sizeof(*target));
213 int cb2_idx = get_bits(gb, 7); 216 int cb2_idx = get_bits(gb, 7);
214 int m[3]; 217 int m[3];
215 218
216 if (cba_idx) { 219 if (cba_idx) {
217 cba_idx += HALFBLOCK - 1; 220 cba_idx += HALFBLOCK - 1;
218 rotate_block(ractx->adapt_cb, buffer_a, cba_idx); 221 copy_and_dup(ractx->adapt_cb, buffer_a, cba_idx);
219 m[0] = irms(buffer_a, gval) >> 12; 222 m[0] = irms(buffer_a, gval) >> 12;
220 } else { 223 } else {
221 m[0] = 0; 224 m[0] = 0;
222 } 225 }
223 226