| 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 | |
| 14 | #ifndef WEBP_DEC_COMMON_DEC_H_ |
| 15 | #define WEBP_DEC_COMMON_DEC_H_ |
| 16 | |
| 17 | // intra prediction modes |
| 18 | enum { B_DC_PRED = 0, // 4x4 modes |
| 19 | B_TM_PRED = 1, |
| 20 | B_VE_PRED = 2, |
| 21 | B_HE_PRED = 3, |
| 22 | B_RD_PRED = 4, |
| 23 | B_VR_PRED = 5, |
| 24 | B_LD_PRED = 6, |
| 25 | B_VL_PRED = 7, |
| 26 | B_HD_PRED = 8, |
| 27 | B_HU_PRED = 9, |
| 28 | NUM_BMODES = B_HU_PRED + 1 - B_DC_PRED, // = 10 |
| 29 | |
| 30 | // Luma16 or UV modes |
| 31 | DC_PRED = B_DC_PRED, V_PRED = B_VE_PRED, |
| 32 | H_PRED = B_HE_PRED, TM_PRED = B_TM_PRED, |
| 33 | B_PRED = NUM_BMODES, // refined I4x4 mode |
| 34 | NUM_PRED_MODES = 4, |
| 35 | |
| 36 | // special modes |
| 37 | B_DC_PRED_NOTOP = 4, |
| 38 | B_DC_PRED_NOLEFT = 5, |
| 39 | B_DC_PRED_NOTOPLEFT = 6, |
| 40 | NUM_B_DC_MODES = 7 }; |
| 41 | |
| 42 | enum { MB_FEATURE_TREE_PROBS = 3, |
| 43 | NUM_MB_SEGMENTS = 4, |
| 44 | NUM_REF_LF_DELTAS = 4, |
| 45 | NUM_MODE_LF_DELTAS = 4, // I4x4, ZERO, *, SPLIT |
| 46 | MAX_NUM_PARTITIONS = 8, |
| 47 | // Probabilities |
| 48 | NUM_TYPES = 4, // 0: i16-AC, 1: i16-DC, 2:chroma-AC, 3:i4-AC |
| 49 | NUM_BANDS = 8, |
| 50 | NUM_CTX = 3, |
| 51 | NUM_PROBAS = 11 |
| 52 | }; |
| 53 | |
| 54 | #endif // WEBP_DEC_COMMON_DEC_H_ |
| 55 | |