packers.cpp 458 B

1234567891011121314151617181920
  1. #include "packers.h"
  2. #include "region_packer.h"
  3. namespace NPackers {
  4. #define _X_4(X) X, X, X, X
  5. #define _X_8(X) _X_4(X), _X_4(X)
  6. #define _X_16(X) _X_8(X), _X_8(X)
  7. #define _X_32(X) _X_16(X), _X_16(X)
  8. #define _X_64(X) _X_32(X), _X_32(X)
  9. #define _X_128(X) _X_64(X), _X_64(X)
  10. const ui8 SkipTable[256] = {_X_128(1), _X_64(2), _X_32(3), _X_16(4), _X_8(5), _X_4(6), 7, 7, 8, 9};
  11. #undef _X_4
  12. #undef _X_8
  13. #undef _X_16
  14. #undef _X_32
  15. #undef _X_64
  16. #undef _X_128
  17. }