Commit 875a6675 authored by Urvang Joshi's avatar Urvang Joshi

is_directional_mode: Check for directional modes directly.

Earlier, the condition was negating all non-directional modes to check
if a mode is directional. This was error-prone, e.g. when a new
non-directional mode is added.

By checking for directional modes directly, we avoid such errors.

Change-Id: Ia4a62e278cd73078c53ed5096db646eff77f054e
parent e251825e
......@@ -318,6 +318,8 @@ typedef enum {
} PALETTE_COLOR;
#endif // CONFIG_PALETTE
// Note: All directional predictors must be between V_PRED and D63_PRED (both
// inclusive).
typedef enum ATTRIBUTE_PACKED {
DC_PRED, // Average of above and left pixels
V_PRED, // Vertical
......
......@@ -76,14 +76,7 @@ static const INTERINTRA_MODE intra_to_interintra_mode[INTRA_MODES] = {
#if CONFIG_EXT_INTRA
static INLINE int av1_is_directional_mode(PREDICTION_MODE mode,
BLOCK_SIZE bsize) {
return mode != DC_PRED && mode != TM_PRED &&
#if CONFIG_ALT_INTRA
mode != SMOOTH_PRED &&
#if CONFIG_SMOOTH_HV
mode != SMOOTH_V_PRED && mode != SMOOTH_H_PRED &&
#endif // CONFIG_SMOOTH_HV
#endif // CONFIG_ALT_INTRA
bsize >= BLOCK_8X8;
return mode >= V_PRED && mode <= D63_PRED && bsize >= BLOCK_8X8;
}
#endif // CONFIG_EXT_INTRA
......
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