Mercurial > libavcodec.hg
comparison ra144.c @ 6826:8e0c8ff0c781 libavcodec
Remove a useless temporary buffer
author | vitor |
---|---|
date | Sat, 17 May 2008 14:35:45 +0000 |
parents | 6a85ed5b605a |
children | 0969192d5f8b |
comparison
equal
deleted
inserted
replaced
6825:000f873d0220 | 6826:8e0c8ff0c781 |
---|---|
103 | 103 |
104 /* do quarter-block output */ | 104 /* do quarter-block output */ |
105 static void do_output_subblock(Real144_internal *glob, const unsigned short *gsp, unsigned int gval, signed short *output_buffer, GetBitContext *gb) | 105 static void do_output_subblock(Real144_internal *glob, const unsigned short *gsp, unsigned int gval, signed short *output_buffer, GetBitContext *gb) |
106 { | 106 { |
107 unsigned short int buffer_a[40]; | 107 unsigned short int buffer_a[40]; |
108 unsigned short int buffer_d[40]; | 108 unsigned short int *buffer_d; |
109 int e, f, g; | 109 int e, f, g; |
110 int a = get_bits(gb, 7); | 110 int a = get_bits(gb, 7); |
111 int d = get_bits(gb, 8); | 111 int d = get_bits(gb, 8); |
112 int b = get_bits(gb, 7); | 112 int b = get_bits(gb, 7); |
113 int c = get_bits(gb, 7); | 113 int c = get_bits(gb, 7); |
123 if (a) | 123 if (a) |
124 g = irms(buffer_a, gval) >> 12; | 124 g = irms(buffer_a, gval) >> 12; |
125 else | 125 else |
126 g = 0; | 126 g = 0; |
127 | 127 |
128 memmove(glob->buffer_2, glob->buffer_2 + BLOCKSIZE, (BUFFERSIZE - BLOCKSIZE) * 2); | |
129 buffer_d = glob->buffer_2 + BUFFERSIZE - BLOCKSIZE; | |
130 | |
128 add_wav(d, a, g, e, f, buffer_a, etable1 + b*BLOCKSIZE, | 131 add_wav(d, a, g, e, f, buffer_a, etable1 + b*BLOCKSIZE, |
129 etable2 + c*BLOCKSIZE, buffer_d); | 132 etable2 + c*BLOCKSIZE, buffer_d); |
130 | |
131 memmove(glob->buffer_2, glob->buffer_2 + BLOCKSIZE, (BUFFERSIZE - BLOCKSIZE) * 2); | |
132 memcpy(glob->buffer_2 + BUFFERSIZE - BLOCKSIZE, buffer_d, BLOCKSIZE * 2); | |
133 | 133 |
134 final(gsp, buffer_d, output_buffer, glob->buffer, BLOCKSIZE); | 134 final(gsp, buffer_d, output_buffer, glob->buffer, BLOCKSIZE); |
135 } | 135 } |
136 | 136 |
137 /* rotate block */ | 137 /* rotate block */ |