diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2008-02-22 16:53:26 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2008-02-22 16:53:26 +0000 |
commit | 917f55cc037b3c1d76f4f7a1b793d3404171fa6e (patch) | |
tree | 13955c68c5799cffd2971b1cb1e4b85f39da8f82 /libavcodec/dsputil.c | |
parent | 0cb25594454dbfe8c855a4c512796897d525e5d4 (diff) | |
download | ffmpeg-streaming-917f55cc037b3c1d76f4f7a1b793d3404171fa6e.zip ffmpeg-streaming-917f55cc037b3c1d76f4f7a1b793d3404171fa6e.tar.gz |
cleaner way of writing packed-byte constants.
suggested by Uoti Urpala
Originally committed as revision 12177 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 1514a4a..07511de 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -50,8 +50,9 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w uint8_t ff_cropTbl[256 + 2 * MAX_NEG_CROP] = {0, }; uint32_t ff_squareTbl[512] = {0, }; -static const unsigned long pb_7f = 0x7f7f7f7f7f7f7f7fUL; -static const unsigned long pb_80 = 0x8080808080808080UL; +// 0x7f7f7f7f or 0x7f7f7f7f7f7f7f7f or whatever, depending on the cpu's native arithmetic size +#define pb_7f (~0UL/255 * 0x7f) +#define pb_80 (~0UL/255 * 0x80) const uint8_t ff_zigzag_direct[64] = { 0, 1, 8, 16, 9, 2, 3, 10, |