Commit f35f527f authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Change to use defined macros

Fixes compiling issue of using un-defined macros.

Change-Id: Icf754083c9797c3e141ef247bcd4aa6288ef8877
parent d46b4d30
......@@ -49,26 +49,20 @@ extern "C" {
// 0: Uniform
// 1: Difference weighted
#define COMPOUND_SEGMENT_TYPE 1
#if COMPOUND_SEGMENT_TYPE == 0
#define MAX_SEG_MASK_BITS 1
// SEG_MASK_TYPES should not surpass 1 << MAX_SEG_MASK_BITS
typedef enum {
#if COMPOUND_SEGMENT_TYPE == 0
UNIFORM_45 = 0,
UNIFORM_45_INV,
SEG_MASK_TYPES,
} SEG_MASK_TYPE;
#elif COMPOUND_SEGMENT_TYPE == 1
#define MAX_SEG_MASK_BITS 1
// SEG_MASK_TYPES should not surpass 1 << MAX_SEG_MASK_BITS
typedef enum {
DIFFWTD_38 = 0,
DIFFWTD_38_INV,
#endif // COMPOUND_SEGMENT_TYPE
SEG_MASK_TYPES,
} SEG_MASK_TYPE;
#endif // COMPOUND_SEGMENT_TYPE
#endif // CONFIG_COMPOUND_SEGMENT
#endif // CONFIG_EXT_INTER
......
......@@ -407,12 +407,12 @@ void build_compound_seg_mask_highbd(uint8_t *mask, SEG_MASK_TYPE mask_type,
const uint8_t *src1, int src1_stride,
BLOCK_SIZE sb_type, int h, int w, int bd) {
switch (mask_type) {
case DIFFWTD_42:
case DIFFWTD_38:
diffwtd_mask_highbd(mask, 0, 42, CONVERT_TO_SHORTPTR(src0), src0_stride,
CONVERT_TO_SHORTPTR(src1), src1_stride, sb_type, h, w,
bd);
break;
case DIFFWTD_42_INV:
case DIFFWTD_38_INV:
diffwtd_mask_highbd(mask, 1, 42, CONVERT_TO_SHORTPTR(src0), src0_stride,
CONVERT_TO_SHORTPTR(src1), src1_stride, sb_type, h, w,
bd);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment