aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Garrett-Glaser <darkshikari@gmail.com>2010-07-23 10:24:38 +0000
committerJason Garrett-Glaser <darkshikari@gmail.com>2010-07-23 10:24:38 +0000
commita71abb714e350b017e1e0c1607e343e1e2f2f8a9 (patch)
treeabcf4644ec234ca478eb496f1160508e2dc4ecda
parenta58ed9a2e7a3fba057e2d4e33b33a534e5246779 (diff)
downloadffmpeg-a71abb714e350b017e1e0c1607e343e1e2f2f8a9.tar.gz
VP8: shave a few clocks off check_intra_pred_mode
Originally committed as revision 24458 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/vp8.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 8ff6fbad99..762ba9506c 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -929,12 +929,11 @@ void xchg_mb_border(uint8_t *top_border, uint8_t *src_y, uint8_t *src_cb, uint8_
static int check_intra_pred_mode(int mode, int mb_x, int mb_y)
{
if (mode == DC_PRED8x8) {
- if (!(mb_x|mb_y))
- mode = DC_128_PRED8x8;
- else if (!mb_y)
- mode = LEFT_DC_PRED8x8;
- else if (!mb_x)
- mode = TOP_DC_PRED8x8;
+ if (!mb_x) {
+ mode = mb_y ? TOP_DC_PRED8x8 : DC_128_PRED8x8;
+ } else if (!mb_y) {
+ mode = mb_x ? LEFT_DC_PRED8x8 : DC_128_PRED8x8;
+ }
}
return mode;
}