Mercurial > libavcodec.hg
comparison dsputil.c @ 6387:922774d1fb9c libavcodec
cleaner way of writing packed-byte constants.
suggested by Uoti Urpala
author | lorenm |
---|---|
date | Fri, 22 Feb 2008 16:53:26 +0000 |
parents | 8b570faa9a8d |
children | 7f9e2b5893fc |
comparison
equal
deleted
inserted
replaced
6386:8b570faa9a8d | 6387:922774d1fb9c |
---|---|
48 void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp); | 48 void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp); |
49 | 49 |
50 uint8_t ff_cropTbl[256 + 2 * MAX_NEG_CROP] = {0, }; | 50 uint8_t ff_cropTbl[256 + 2 * MAX_NEG_CROP] = {0, }; |
51 uint32_t ff_squareTbl[512] = {0, }; | 51 uint32_t ff_squareTbl[512] = {0, }; |
52 | 52 |
53 static const unsigned long pb_7f = 0x7f7f7f7f7f7f7f7fUL; | 53 // 0x7f7f7f7f or 0x7f7f7f7f7f7f7f7f or whatever, depending on the cpu's native arithmetic size |
54 static const unsigned long pb_80 = 0x8080808080808080UL; | 54 #define pb_7f (~0UL/255 * 0x7f) |
55 #define pb_80 (~0UL/255 * 0x80) | |
55 | 56 |
56 const uint8_t ff_zigzag_direct[64] = { | 57 const uint8_t ff_zigzag_direct[64] = { |
57 0, 1, 8, 16, 9, 2, 3, 10, | 58 0, 1, 8, 16, 9, 2, 3, 10, |
58 17, 24, 32, 25, 18, 11, 4, 5, | 59 17, 24, 32, 25, 18, 11, 4, 5, |
59 12, 19, 26, 33, 40, 48, 41, 34, | 60 12, 19, 26, 33, 40, 48, 41, 34, |