Mercurial > libavcodec.hg
comparison xan.c @ 9501:880d9562d218 libavcodec
Avoid code duplication in xan_unpack for the final memcpy.
author | reimar |
---|---|
date | Sat, 18 Apr 2009 17:26:00 +0000 |
parents | 9157421b6239 |
children | 5da84f0d0a55 |
comparison
equal
deleted
inserted
replaced
9500:9157421b6239 | 9501:880d9562d218 |
---|---|
155 } | 155 } |
156 memcpy(dest, src, size); dest += size; src += size; | 156 memcpy(dest, src, size); dest += size; src += size; |
157 av_memcpy_backptr(dest, back, size2); | 157 av_memcpy_backptr(dest, back, size2); |
158 dest += size2; | 158 dest += size2; |
159 } else { | 159 } else { |
160 int finish; | |
160 size = ((opcode & 0x1f) << 2) + 4; | 161 size = ((opcode & 0x1f) << 2) + 4; |
161 | 162 |
162 if (size > 0x70) | 163 finish = size > 0x70; |
163 break; | 164 if (finish) |
165 size = opcode & 3; | |
164 | 166 |
165 memcpy(dest, src, size); dest += size; src += size; | 167 memcpy(dest, src, size); dest += size; src += size; |
166 } | 168 if (finish) |
167 } | 169 return; |
168 | 170 } |
169 size = opcode & 3; | 171 } |
170 memcpy(dest, src, size); dest += size; src += size; | |
171 } | 172 } |
172 | 173 |
173 static inline void xan_wc3_output_pixel_run(XanContext *s, | 174 static inline void xan_wc3_output_pixel_run(XanContext *s, |
174 const unsigned char *pixel_buffer, int x, int y, int pixel_count) | 175 const unsigned char *pixel_buffer, int x, int y, int pixel_count) |
175 { | 176 { |