Mercurial > libavcodec.hg
comparison vp8.c @ 12243:788445bf10c0 libavcodec
VP8: shave a few clocks off check_intra_pred_mode
author | darkshikari |
---|---|
date | Fri, 23 Jul 2010 10:24:38 +0000 |
parents | a2f6d8c61b9c |
children | 49c9a10309dd |
comparison
equal
deleted
inserted
replaced
12242:a2f6d8c61b9c | 12243:788445bf10c0 |
---|---|
927 } | 927 } |
928 | 928 |
929 static int check_intra_pred_mode(int mode, int mb_x, int mb_y) | 929 static int check_intra_pred_mode(int mode, int mb_x, int mb_y) |
930 { | 930 { |
931 if (mode == DC_PRED8x8) { | 931 if (mode == DC_PRED8x8) { |
932 if (!(mb_x|mb_y)) | 932 if (!mb_x) { |
933 mode = DC_128_PRED8x8; | 933 mode = mb_y ? TOP_DC_PRED8x8 : DC_128_PRED8x8; |
934 else if (!mb_y) | 934 } else if (!mb_y) { |
935 mode = LEFT_DC_PRED8x8; | 935 mode = mb_x ? LEFT_DC_PRED8x8 : DC_128_PRED8x8; |
936 else if (!mb_x) | 936 } |
937 mode = TOP_DC_PRED8x8; | |
938 } | 937 } |
939 return mode; | 938 return mode; |
940 } | 939 } |
941 | 940 |
942 static void intra_predict(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb, | 941 static void intra_predict(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb, |