checkasm: Explicitly declare function prototypes
[ffmpeg.git] / tests / checkasm / h264pred.c
index 08f23e6..a1ee720 100644 (file)
@@ -144,14 +144,16 @@ static void check_pred4x4(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,
     if (chroma_format == 1) {
         uint8_t *topright = buf0 + 2*16;
         int pred_mode;
+        declare_func(void, uint8_t *src, const uint8_t *topright, ptrdiff_t stride);
+
         for (pred_mode = 0; pred_mode < 15; pred_mode++) {
             if (check_pred_func(h->pred4x4[pred_mode], "4x4", pred4x4_modes[codec][pred_mode])) {
                 randomize_buffers();
-                call_ref(src0, topright, (ptrdiff_t)12*SIZEOF_PIXEL);
-                call_new(src1, topright, (ptrdiff_t)12*SIZEOF_PIXEL);
+                call_ref(src0, topright, 12*SIZEOF_PIXEL);
+                call_new(src1, topright, 12*SIZEOF_PIXEL);
                 if (memcmp(buf0, buf1, BUF_SIZE))
                     fail();
-                bench_new(src1, topright, (ptrdiff_t)12*SIZEOF_PIXEL);
+                bench_new(src1, topright, 12*SIZEOF_PIXEL);
             }
         }
     }
@@ -161,15 +163,17 @@ static void check_pred8x8(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,
                           int codec, int chroma_format, int bit_depth)
 {
     int pred_mode;
+    declare_func(void, uint8_t *src, ptrdiff_t stride);
+
     for (pred_mode = 0; pred_mode < 11; pred_mode++) {
         if (check_pred_func(h->pred8x8[pred_mode], (chroma_format == 2) ? "8x16" : "8x8",
                             pred8x8_modes[codec][pred_mode])) {
             randomize_buffers();
-            call_ref(src0, (ptrdiff_t)24*SIZEOF_PIXEL);
-            call_new(src1, (ptrdiff_t)24*SIZEOF_PIXEL);
+            call_ref(src0, 24*SIZEOF_PIXEL);
+            call_new(src1, 24*SIZEOF_PIXEL);
             if (memcmp(buf0, buf1, BUF_SIZE))
                 fail();
-            bench_new(src1, (ptrdiff_t)24*SIZEOF_PIXEL);
+            bench_new(src1, 24*SIZEOF_PIXEL);
         }
     }
 }
@@ -179,14 +183,16 @@ static void check_pred16x16(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,
 {
     if (chroma_format == 1) {
         int pred_mode;
+        declare_func(void, uint8_t *src, ptrdiff_t stride);
+
         for (pred_mode = 0; pred_mode < 9; pred_mode++) {
             if (check_pred_func(h->pred16x16[pred_mode], "16x16", pred16x16_modes[codec][pred_mode])) {
                 randomize_buffers();
-                call_ref(src0, (ptrdiff_t)48);
-                call_new(src1, (ptrdiff_t)48);
+                call_ref(src0, 48);
+                call_new(src1, 48);
                 if (memcmp(buf0, buf1, BUF_SIZE))
                     fail();
-                bench_new(src1, (ptrdiff_t)48);
+                bench_new(src1, 48);
             }
         }
     }
@@ -197,6 +203,8 @@ static void check_pred8x8l(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,
 {
     if (chroma_format == 1 && codec_ids[codec] == AV_CODEC_ID_H264) {
         int pred_mode;
+        declare_func(void, uint8_t *src, int topleft, int topright, ptrdiff_t stride);
+
         for (pred_mode = 0; pred_mode < 12; pred_mode++) {
             if (check_pred_func(h->pred8x8l[pred_mode], "8x8l", pred4x4_modes[codec][pred_mode])) {
                 int neighbors;
@@ -208,11 +216,11 @@ static void check_pred8x8l(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,
                         continue; /* Those aren't allowed according to the spec */
 
                     randomize_buffers();
-                    call_ref(src0, has_topleft, has_topright, (ptrdiff_t)24*SIZEOF_PIXEL);
-                    call_new(src1, has_topleft, has_topright, (ptrdiff_t)24*SIZEOF_PIXEL);
+                    call_ref(src0, has_topleft, has_topright, 24*SIZEOF_PIXEL);
+                    call_new(src1, has_topleft, has_topright, 24*SIZEOF_PIXEL);
                     if (memcmp(buf0, buf1, BUF_SIZE))
                         fail();
-                    bench_new(src1, has_topleft, has_topright, (ptrdiff_t)24*SIZEOF_PIXEL);
+                    bench_new(src1, has_topleft, has_topright, 24*SIZEOF_PIXEL);
                 }
             }
         }