]> granicus.if.org Git - libvpx/commitdiff
Pass B_PREDICTION_MODE to intra4x4_predict
authorJohann <johannkoenig@google.com>
Thu, 2 Aug 2012 21:26:04 +0000 (14:26 -0700)
committerJohann <johannkoenig@google.com>
Thu, 2 Aug 2012 22:26:24 +0000 (15:26 -0700)
Use the correct type when calling and inside the function.

Change-Id: Idbaf1bf58b9574f0cba73d78780e9aedd8889dfd

vp8/common/reconintra4x4.c
vp8/common/rtcd_defs.sh
vp8/decoder/decodframe.c
vp8/decoder/threading.c
vp8/encoder/pickinter.c
vp8/encoder/rdopt.c

index 72375fd36014296d525d012d7f9bb5eb059c463b..7bb8d0ac14a35789cd5fd2171fb719c74c261576 100644 (file)
@@ -15,7 +15,7 @@
 
 void vp8_intra4x4_predict_c(unsigned char *Above,
                             unsigned char *yleft, int left_stride,
-                            int b_mode,
+                            B_PREDICTION_MODE b_mode,
                             unsigned char *dst, int dst_stride,
                             unsigned char top_left)
 {
@@ -290,6 +290,8 @@ void vp8_intra4x4_predict_c(unsigned char *Above,
     }
     break;
 
+    default:
+    break;
 
     }
 }
index 29b871ded36c1d493ca1a50570e409cc39aabaf3..05d0df4f4d71aaea3ee30590423378945f46c526 100644 (file)
@@ -1,5 +1,7 @@
 common_forward_decls() {
 cat <<EOF
+#include "vp8/common/blockd.h"
+
 struct blockd;
 struct macroblockd;
 struct loop_filter_info;
@@ -144,7 +146,7 @@ specialize vp8_build_intra_predictors_mby_s sse2 ssse3
 prototype void vp8_build_intra_predictors_mbuv_s "struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row,  unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride"
 specialize vp8_build_intra_predictors_mbuv_s sse2 ssse3
 
-prototype void vp8_intra4x4_predict "unsigned char *Above, unsigned char *yleft, int left_stride, int b_mode, unsigned char *dst, int dst_stride, unsigned char top_left"
+prototype void vp8_intra4x4_predict "unsigned char *Above, unsigned char *yleft, int left_stride, B_PREDICTION_MODE b_mode, unsigned char *dst, int dst_stride, unsigned char top_left"
 # No existing specializations
 
 #
index 4a33f5aef60bae53dd7500fffac276164b787ee5..c22bae30852365ad2241bc7b1d80e8d8b7b72578 100644 (file)
@@ -188,7 +188,8 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
             {
                 BLOCKD *b = &xd->block[i];
                 unsigned char *dst = xd->dst.y_buffer + b->offset;
-                int b_mode = xd->mode_info_context->bmi[i].as_mode;
+                B_PREDICTION_MODE b_mode =
+                    xd->mode_info_context->bmi[i].as_mode;
                 unsigned char *Above = dst - dst_stride;
                 unsigned char *yleft = dst - 1;
                 int left_stride = dst_stride;
index cbc6a43283a8df68a3a874576f41aa88828b0e32..dce1e4cd6d63d8889614aa5ca2479beb673e0229 100644 (file)
@@ -177,7 +177,8 @@ static void mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
             {
                 BLOCKD *b = &xd->block[i];
                 unsigned char *dst = xd->dst.y_buffer + b->offset;
-                int b_mode = xd->mode_info_context->bmi[i].as_mode;
+                B_PREDICTION_MODE b_mode =
+                    xd->mode_info_context->bmi[i].as_mode;
                 unsigned char *Above;
                 unsigned char *yleft;
                 int left_stride;
index 77d9152ebb5d88bad46ad376f5cf9ca3650488f6..c9d63c64ed060ac5a89f855c1d30e375515fc41c 100644 (file)
@@ -151,7 +151,7 @@ static int pick_intra4x4block(
     unsigned char *yleft = dst - 1;
     unsigned char top_left = Above[-1];
 
-    for (mode = B_DC_PRED; mode <= B_HE_PRED /*B_HU_PRED*/; mode++)
+    for (mode = B_DC_PRED; mode <= B_HE_PRED; mode++)
     {
         int this_rd;
 
@@ -171,7 +171,7 @@ static int pick_intra4x4block(
         }
     }
 
-    b->bmi.as_mode = (B_PREDICTION_MODE)(*best_mode);
+    b->bmi.as_mode = *best_mode;
     vp8_encode_intra4x4block(x, ib);
     return best_rd;
 }
index 005f26213ded38e76552450a3644072bb4f70d01..28d5c1ee8a23c3b35b5e4399e66bb660199ecd54 100644 (file)
@@ -694,7 +694,7 @@ static int rd_pick_intra4x4block(
             vpx_memcpy(best_dqcoeff, b->dqcoeff, 32);
         }
     }
-    b->bmi.as_mode = (B_PREDICTION_MODE)(*best_mode);
+    b->bmi.as_mode = *best_mode;
 
     vp8_short_idct4x4llm(best_dqcoeff, best_predictor, 16, dst, dst_stride);