Mercurial > libavcodec.hg
comparison dsputil.h @ 1264:2fa34e615c76 libavcodec
cleanup
author | michaelni |
---|---|
date | Wed, 14 May 2003 23:08:01 +0000 |
parents | e8c3884f2c7e |
children | 85b71f9f7450 |
comparison
equal
deleted
inserted
replaced
1263:9fce515e9894 | 1264:2fa34e615c76 |
---|---|
266 * permute block according to permuatation. | 266 * permute block according to permuatation. |
267 * @param last last non zero element in scantable order | 267 * @param last last non zero element in scantable order |
268 */ | 268 */ |
269 void ff_block_permute(DCTELEM *block, uint8_t *permutation, const uint8_t *scantable, int last); | 269 void ff_block_permute(DCTELEM *block, uint8_t *permutation, const uint8_t *scantable, int last); |
270 | 270 |
271 #define BYTE_VEC32(c) ((c)*0x01010101UL) | |
272 | |
273 static inline uint32_t rnd_avg32(uint32_t a, uint32_t b) | |
274 { | |
275 return (a | b) - (((a ^ b) & ~BYTE_VEC32(0x01)) >> 1); | |
276 } | |
277 | |
278 static inline uint32_t no_rnd_avg32(uint32_t a, uint32_t b) | |
279 { | |
280 return (a & b) + (((a ^ b) & ~BYTE_VEC32(0x01)) >> 1); | |
281 } | |
282 | |
271 /** | 283 /** |
272 * Empty mmx state. | 284 * Empty mmx state. |
273 * this must be called between any dsp function and float/double code. | 285 * this must be called between any dsp function and float/double code. |
274 * for example sin(); dsp->idct_put(); emms_c(); cos() | 286 * for example sin(); dsp->idct_put(); emms_c(); cos() |
275 */ | 287 */ |