common_dec.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright 2015 Google Inc. All Rights Reserved.
  2. //
  3. // Use of this source code is governed by a BSD-style license
  4. // that can be found in the COPYING file in the root of the source
  5. // tree. An additional intellectual property rights grant can be found
  6. // in the file PATENTS. All contributing project authors may
  7. // be found in the AUTHORS file in the root of the source tree.
  8. // -----------------------------------------------------------------------------
  9. //
  10. // Definitions and macros common to encoding and decoding
  11. //
  12. // Author: Skal (pascal.massimino@gmail.com)
  13. #ifndef WEBP_DEC_COMMON_DEC_H_
  14. #define WEBP_DEC_COMMON_DEC_H_
  15. // intra prediction modes
  16. enum { B_DC_PRED = 0, // 4x4 modes
  17. B_TM_PRED = 1,
  18. B_VE_PRED = 2,
  19. B_HE_PRED = 3,
  20. B_RD_PRED = 4,
  21. B_VR_PRED = 5,
  22. B_LD_PRED = 6,
  23. B_VL_PRED = 7,
  24. B_HD_PRED = 8,
  25. B_HU_PRED = 9,
  26. NUM_BMODES = B_HU_PRED + 1 - B_DC_PRED, // = 10
  27. // Luma16 or UV modes
  28. DC_PRED = B_DC_PRED, V_PRED = B_VE_PRED,
  29. H_PRED = B_HE_PRED, TM_PRED = B_TM_PRED,
  30. B_PRED = NUM_BMODES, // refined I4x4 mode
  31. NUM_PRED_MODES = 4,
  32. // special modes
  33. B_DC_PRED_NOTOP = 4,
  34. B_DC_PRED_NOLEFT = 5,
  35. B_DC_PRED_NOTOPLEFT = 6,
  36. NUM_B_DC_MODES = 7 };
  37. enum { MB_FEATURE_TREE_PROBS = 3,
  38. NUM_MB_SEGMENTS = 4,
  39. NUM_REF_LF_DELTAS = 4,
  40. NUM_MODE_LF_DELTAS = 4, // I4x4, ZERO, *, SPLIT
  41. MAX_NUM_PARTITIONS = 8,
  42. // Probabilities
  43. NUM_TYPES = 4, // 0: i16-AC, 1: i16-DC, 2:chroma-AC, 3:i4-AC
  44. NUM_BANDS = 8,
  45. NUM_CTX = 3,
  46. NUM_PROBAS = 11
  47. };
  48. #endif // WEBP_DEC_COMMON_DEC_H_