aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-03-21 15:19:17 +0100
committerClément Bœsch <u@pkh.me>2017-03-21 15:19:17 +0100
commit6d11b2f6567619cfa40b7e3809572818c7fc41b9 (patch)
tree94a92e792bc55b0bc6336c0e0c0173ee4602491e
parent6eb75e7d592d103618f8b3fa1d9385abadbef156 (diff)
parentb2939a75270bc7e971462648168aa3a2a48c1c8c (diff)
downloadffmpeg-6d11b2f6567619cfa40b7e3809572818c7fc41b9.tar.gz
Merge commit 'b2939a75270bc7e971462648168aa3a2a48c1c8c'
* commit 'b2939a75270bc7e971462648168aa3a2a48c1c8c': blockdsp: Change type of array stride parameters to ptrdiff_t Merged-by: Clément Bœsch <u@pkh.me>
-rw-r--r--libavcodec/blockdsp.c6
-rw-r--r--libavcodec/blockdsp.h3
-rw-r--r--libavcodec/mips/blockdsp_mips.h8
-rw-r--r--libavcodec/mips/blockdsp_mmi.c4
-rw-r--r--libavcodec/mips/blockdsp_msa.c4
5 files changed, 14 insertions, 11 deletions
diff --git a/libavcodec/blockdsp.c b/libavcodec/blockdsp.c
index a5c527a4da..c7efe7e77b 100644
--- a/libavcodec/blockdsp.c
+++ b/libavcodec/blockdsp.c
@@ -35,7 +35,8 @@ static void clear_blocks_c(int16_t *blocks)
memset(blocks, 0, sizeof(int16_t) * 6 * 64);
}
-static void fill_block16_c(uint8_t *block, uint8_t value, int line_size, int h)
+static void fill_block16_c(uint8_t *block, uint8_t value, ptrdiff_t line_size,
+ int h)
{
int i;
@@ -45,7 +46,8 @@ static void fill_block16_c(uint8_t *block, uint8_t value, int line_size, int h)
}
}
-static void fill_block8_c(uint8_t *block, uint8_t value, int line_size, int h)
+static void fill_block8_c(uint8_t *block, uint8_t value, ptrdiff_t line_size,
+ int h)
{
int i;
diff --git a/libavcodec/blockdsp.h b/libavcodec/blockdsp.h
index 95e1d0f32e..6e27a02ba5 100644
--- a/libavcodec/blockdsp.h
+++ b/libavcodec/blockdsp.h
@@ -19,6 +19,7 @@
#ifndef AVCODEC_BLOCKDSP_H
#define AVCODEC_BLOCKDSP_H
+#include <stddef.h>
#include <stdint.h>
#include "avcodec.h"
@@ -29,7 +30,7 @@
* h for op_pixels_func is limited to { width / 2, width },
* but never larger than 16 and never smaller than 4. */
typedef void (*op_fill_func)(uint8_t *block /* align width (8 or 16) */,
- uint8_t value, int line_size, int h);
+ uint8_t value, ptrdiff_t line_size, int h);
typedef struct BlockDSPContext {
void (*clear_block)(int16_t *block /* align 16 */);
diff --git a/libavcodec/mips/blockdsp_mips.h b/libavcodec/mips/blockdsp_mips.h
index 9559d40eaa..1742b123c3 100644
--- a/libavcodec/mips/blockdsp_mips.h
+++ b/libavcodec/mips/blockdsp_mips.h
@@ -24,13 +24,13 @@
#include "../mpegvideo.h"
-void ff_fill_block16_msa(uint8_t *src, uint8_t val, int stride, int height);
-void ff_fill_block8_msa(uint8_t *src, uint8_t val, int stride, int height);
+void ff_fill_block16_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height);
+void ff_fill_block8_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height);
void ff_clear_block_msa(int16_t *block);
void ff_clear_blocks_msa(int16_t *block);
-void ff_fill_block16_mmi(uint8_t *block, uint8_t value, int line_size, int h);
-void ff_fill_block8_mmi(uint8_t *block, uint8_t value, int line_size, int h);
+void ff_fill_block16_mmi(uint8_t *block, uint8_t value, ptrdiff_t line_size, int h);
+void ff_fill_block8_mmi(uint8_t *block, uint8_t value, ptrdiff_t line_size, int h);
void ff_clear_block_mmi(int16_t *block);
void ff_clear_blocks_mmi(int16_t *block);
diff --git a/libavcodec/mips/blockdsp_mmi.c b/libavcodec/mips/blockdsp_mmi.c
index 1035dbbc57..68641e2544 100644
--- a/libavcodec/mips/blockdsp_mmi.c
+++ b/libavcodec/mips/blockdsp_mmi.c
@@ -24,7 +24,7 @@
#include "blockdsp_mips.h"
#include "libavutil/mips/mmiutils.h"
-void ff_fill_block16_mmi(uint8_t *block, uint8_t value, int line_size, int h)
+void ff_fill_block16_mmi(uint8_t *block, uint8_t value, ptrdiff_t line_size, int h)
{
double ftmp[1];
DECLARE_VAR_ALL64;
@@ -48,7 +48,7 @@ void ff_fill_block16_mmi(uint8_t *block, uint8_t value, int line_size, int h)
);
}
-void ff_fill_block8_mmi(uint8_t *block, uint8_t value, int line_size, int h)
+void ff_fill_block8_mmi(uint8_t *block, uint8_t value, ptrdiff_t line_size, int h)
{
double ftmp0;
DECLARE_VAR_ALL64;
diff --git a/libavcodec/mips/blockdsp_msa.c b/libavcodec/mips/blockdsp_msa.c
index 32ac858e1d..2b78c288f0 100644
--- a/libavcodec/mips/blockdsp_msa.c
+++ b/libavcodec/mips/blockdsp_msa.c
@@ -65,12 +65,12 @@ static void memset_zero_16width_msa(uint8_t *src, int32_t stride,
}
}
-void ff_fill_block16_msa(uint8_t *src, uint8_t val, int stride, int height)
+void ff_fill_block16_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height)
{
copy_8bit_value_width16_msa(src, val, stride, height);
}
-void ff_fill_block8_msa(uint8_t *src, uint8_t val, int stride, int height)
+void ff_fill_block8_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height)
{
copy_8bit_value_width8_msa(src, val, stride, height);
}