ref: d04d0a6cf61c14f65c6cb3c07bbc8096bab564db
parent: af0375ca35ea4b6142364613bdc6a4afb60de665
author: Luc Trudeau <ltrudeau@twoorioles.com>
date: Fri May 17 10:37:44 EDT 2019
Reduce branching in intra angle to mode
--- a/src/ipred_prepare_tmpl.c
+++ b/src/ipred_prepare_tmpl.c
@@ -99,17 +99,12 @@
case VERT_LEFT_PRED: {
*angle = av1_mode_to_angle_map[mode - VERT_PRED] + 3 * *angle;
- if (*angle < 90) {
- mode = have_top ? Z1_PRED : VERT_PRED;
- } else if (*angle == 90) {
- mode = VERT_PRED;
- } else if (*angle < 180) {
+ if (*angle <= 90)
+ mode = *angle < 90 && have_top ? Z1_PRED : VERT_PRED;
+ else if (*angle < 180)
mode = Z2_PRED;
- } else if (*angle == 180) {
- mode = HOR_PRED;
- } else {
- mode = have_left ? Z3_PRED : HOR_PRED;
- }
+ else
+ mode = *angle > 180 && have_left ? Z3_PRED : HOR_PRED;
break;
}
case DC_PRED: