aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-07-08 15:33:40 +0000
committerPaul B Mahol <onemda@gmail.com>2013-07-08 16:40:48 +0000
commitd2dd1e075cf92442883b1cfe7156cac277b0eaed (patch)
tree8be1dedd66e985fdcaae8833203ff355f3f32b0e
parent70b922f371e27440a51ee1e9cc1c7db0e042ebd1 (diff)
downloadffmpeg-d2dd1e075cf92442883b1cfe7156cac277b0eaed.tar.gz
lavfi/pad: use FFSIGN
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavfilter/vf_pad.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index 8090922cde..2e9aa56968 100644
--- a/libavfilter/vf_pad.c
+++ b/libavfilter/vf_pad.c
@@ -260,7 +260,6 @@ static int buffer_needs_copy(PadContext *s, AVFrame *frame, AVBufferRef *buf)
(buf->data + buf->size) - end < req_end)
return 1;
-#define SIGN(x) ((x) > 0 ? 1 : -1)
for (j = 0; j < FF_ARRAY_ELEMS(planes) && planes[j] >= 0; j++) {
int vsub1 = s->draw.vsub[planes[j]];
uint8_t *start1 = frame->data[planes[j]];
@@ -269,8 +268,8 @@ static int buffer_needs_copy(PadContext *s, AVFrame *frame, AVBufferRef *buf)
if (i == j)
continue;
- if (SIGN(start - end1) != SIGN(start - end1 - req_start) ||
- SIGN(end - start1) != SIGN(end - start1 + req_end))
+ if (FFSIGN(start - end1) != FFSIGN(start - end1 - req_start) ||
+ FFSIGN(end - start1) != FFSIGN(end - start1 + req_end))
return 1;
}
}