aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevcdsp_template.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2016-09-01 22:18:22 +0200
committerDiego Biurrun <diego@biurrun.de>2016-09-29 17:54:23 +0200
commitba479f3daafc7e4359ec1212164569ebe59f0bb7 (patch)
tree872f7656fad3dd5e271b87642862f3baf59c2852 /libavcodec/hevcdsp_template.c
parente4a94d8b36c48d95a7d412c40d7b558422ff659c (diff)
downloadffmpeg-ba479f3daafc7e4359ec1212164569ebe59f0bb7.tar.gz
hevc: Change type of array stride parameters to ptrdiff_t
ptrdiff_t is the correct type for array strides and similar.
Diffstat (limited to 'libavcodec/hevcdsp_template.c')
-rw-r--r--libavcodec/hevcdsp_template.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c
index 076b251344..cd55571290 100644
--- a/libavcodec/hevcdsp_template.c
+++ b/libavcodec/hevcdsp_template.c
@@ -396,7 +396,7 @@ static void FUNC(sao_edge_filter_0)(uint8_t *_dst, uint8_t *_src,
if (sao_eo_class != SAO_EO_VERT) {
if (borders[0]) {
int offset_val = sao_offset_val[0];
- int y_stride = 0;
+ ptrdiff_t y_stride = 0;
for (y = 0; y < height; y++) {
dst[y_stride] = av_clip_pixel(src[y_stride] + offset_val);
y_stride += stride;
@@ -405,7 +405,7 @@ static void FUNC(sao_edge_filter_0)(uint8_t *_dst, uint8_t *_src,
}
if (borders[2]) {
int offset_val = sao_offset_val[0];
- int x_stride = width - 1;
+ ptrdiff_t x_stride = width - 1;
for (x = 0; x < height; x++) {
dst[x_stride] = av_clip_pixel(src[x_stride] + offset_val);
x_stride += stride;
@@ -422,21 +422,21 @@ static void FUNC(sao_edge_filter_0)(uint8_t *_dst, uint8_t *_src,
}
if (borders[3]) {
int offset_val = sao_offset_val[0];
- int y_stride = stride * (height - 1);
+ ptrdiff_t y_stride = stride * (height - 1);
for (x = init_x; x < width; x++)
dst[x + y_stride] = av_clip_pixel(src[x + y_stride] + offset_val);
height--;
}
}
{
- int y_stride = init_y * stride;
+ ptrdiff_t y_stride = init_y * stride;
int pos_0_0 = pos[sao_eo_class][0][0];
int pos_0_1 = pos[sao_eo_class][0][1];
int pos_1_0 = pos[sao_eo_class][1][0];
int pos_1_1 = pos[sao_eo_class][1][1];
- int y_stride_0_1 = (init_y + pos_0_1) * stride;
- int y_stride_1_1 = (init_y + pos_1_1) * stride;
+ ptrdiff_t y_stride_0_1 = (init_y + pos_0_1) * stride;
+ ptrdiff_t y_stride_1_1 = (init_y + pos_1_1) * stride;
for (y = init_y; y < height; y++) {
for (x = init_x; x < width; x++) {
int diff0 = CMP(src[x + y_stride], src[x + pos_0_0 + y_stride_0_1]);
@@ -503,7 +503,7 @@ static void FUNC(sao_edge_filter_1)(uint8_t *_dst, uint8_t *_src,
if (sao_eo_class != SAO_EO_VERT) {
if (borders[0]) {
int offset_val = sao_offset_val[0];
- int y_stride = 0;
+ ptrdiff_t y_stride = 0;
for (y = 0; y < height; y++) {
dst[y_stride] = av_clip_pixel(src[y_stride] + offset_val);
y_stride += stride;
@@ -512,7 +512,7 @@ static void FUNC(sao_edge_filter_1)(uint8_t *_dst, uint8_t *_src,
}
if (borders[2]) {
int offset_val = sao_offset_val[0];
- int x_stride = width - 1;
+ ptrdiff_t x_stride = width - 1;
for (x = 0; x < height; x++) {
dst[x_stride] = av_clip_pixel(src[x_stride] + offset_val);
x_stride += stride;
@@ -521,14 +521,14 @@ static void FUNC(sao_edge_filter_1)(uint8_t *_dst, uint8_t *_src,
}
}
{
- int y_stride = init_y * stride;
+ ptrdiff_t y_stride = init_y * stride;
int pos_0_0 = pos[sao_eo_class][0][0];
int pos_0_1 = pos[sao_eo_class][0][1];
int pos_1_0 = pos[sao_eo_class][1][0];
int pos_1_1 = pos[sao_eo_class][1][1];
- int y_stride_0_1 = (init_y + pos_0_1) * stride;
- int y_stride_1_1 = (init_y + pos_1_1) * stride;
+ ptrdiff_t y_stride_0_1 = (init_y + pos_0_1) * stride;
+ ptrdiff_t y_stride_1_1 = (init_y + pos_1_1) * stride;
for (y = init_y; y < height; y++) {
for (x = init_x; x < width; x++) {
int diff0 = CMP(src[x + y_stride], src[x + pos_0_0 + y_stride_0_1]);
@@ -601,21 +601,21 @@ static void FUNC(sao_edge_filter_2)(uint8_t *_dst, uint8_t *_src,
}
if (borders[3]) {
int offset_val = sao_offset_val[0];
- int y_stride = stride * (height - 1);
+ ptrdiff_t y_stride = stride * (height - 1);
for (x = init_x; x < width; x++)
dst[x + y_stride] = av_clip_pixel(src[x + y_stride] + offset_val);
height--;
}
}
{
- int y_stride = init_y * stride;
+ ptrdiff_t y_stride = init_y * stride;
int pos_0_0 = pos[sao_eo_class][0][0];
int pos_0_1 = pos[sao_eo_class][0][1];
int pos_1_0 = pos[sao_eo_class][1][0];
int pos_1_1 = pos[sao_eo_class][1][1];
- int y_stride_0_1 = (init_y + pos_0_1) * stride;
- int y_stride_1_1 = (init_y + pos_1_1) * stride;
+ ptrdiff_t y_stride_0_1 = (init_y + pos_0_1) * stride;
+ ptrdiff_t y_stride_1_1 = (init_y + pos_1_1) * stride;
for (y = init_y; y < height; y++) {
for (x = init_x; x < width; x++) {
int diff0 = CMP(src[x + y_stride], src[x + pos_0_0 + y_stride_0_1]);
@@ -681,14 +681,14 @@ static void FUNC(sao_edge_filter_3)(uint8_t *_dst, uint8_t *_src,
init_y = init_x = 0;
{
- int y_stride = init_y * stride;
+ ptrdiff_t y_stride = init_y * stride;
int pos_0_0 = pos[sao_eo_class][0][0];
int pos_0_1 = pos[sao_eo_class][0][1];
int pos_1_0 = pos[sao_eo_class][1][0];
int pos_1_1 = pos[sao_eo_class][1][1];
- int y_stride_0_1 = (init_y + pos_0_1) * stride;
- int y_stride_1_1 = (init_y + pos_1_1) * stride;
+ ptrdiff_t y_stride_0_1 = (init_y + pos_0_1) * stride;
+ ptrdiff_t y_stride_1_1 = (init_y + pos_1_1) * stride;
for (y = init_y; y < height; y++) {
for (x = init_x; x < width; x++) {