Address clang-analyzer warning about undefined behavior in intra.

- Related to issue #35.
This commit is contained in:
Ari Koivula 2014-04-17 15:01:43 +03:00
parent 32da12f653
commit 0704c43836

View file

@ -24,6 +24,7 @@
#include "intra.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -679,6 +680,9 @@ void intra_get_angular_pred(const encoder_control * const encoder, pixel* src, i
pixel ref_above[2 * LCU_WIDTH + 1];
pixel ref_left[2 * LCU_WIDTH + 1];
// Tell clang-analyzer that everything is ok.
assert(width == 4 || width == 8 || width == 16 || width == 32);
abs_ang = ang_table[abs_ang];
intra_pred_angle = sign_ang * abs_ang;