Mercurial > libavcodec.hg
comparison cook.c @ 4429:ba087eea0a53 libavcodec
Kill a warning and don't use modulus.
author | banan |
---|---|
date | Mon, 29 Jan 2007 08:58:03 +0000 |
parents | eeb16216b454 |
children | 407e7fd9b4f4 |
comparison
equal
deleted
inserted
replaced
4428:eeb16216b454 | 4429:ba087eea0a53 |
---|---|
301 * I'm too lazy though, should be something like | 301 * I'm too lazy though, should be something like |
302 * for(i=0 ; i<bitamount/64 ; i++) | 302 * for(i=0 ; i<bitamount/64 ; i++) |
303 * (int64_t)out[i] = 0x37c511f237c511f2^be2me_64(int64_t)in[i]); | 303 * (int64_t)out[i] = 0x37c511f237c511f2^be2me_64(int64_t)in[i]); |
304 * Buffer alignment needs to be checked. */ | 304 * Buffer alignment needs to be checked. */ |
305 | 305 |
306 off = (uint32_t)inbuffer % 4; | 306 off = (int)((long)inbuffer & 3); |
307 buf = (uint32_t*) (inbuffer - off); | 307 buf = (uint32_t*) (inbuffer - off); |
308 c = be2me_32((0x37c511f2 >> (off*8)) | (0x37c511f2 << (32-(off*8)))); | 308 c = be2me_32((0x37c511f2 >> (off*8)) | (0x37c511f2 << (32-(off*8)))); |
309 bytes += 3 + off; | 309 bytes += 3 + off; |
310 for (i = 0; i < bytes/4; i++) | 310 for (i = 0; i < bytes/4; i++) |
311 obuf[i] = c ^ buf[i]; | 311 obuf[i] = c ^ buf[i]; |