diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-01 14:06:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-01 14:17:53 +0200 |
commit | 9e052df86d522cddbddaafe584c2c8cf4d5f5032 (patch) | |
tree | 670749e93d430fc77dc29f6cf5a16c823ca23d07 /libavfilter | |
parent | a80191379bb994e7d8f5484993e39d33e07240f0 (diff) | |
download | ffmpeg-9e052df86d522cddbddaafe584c2c8cf4d5f5032.tar.gz |
avfilter/vf_pullup: 2nd try to workaround gcc 4.4.3 bug on arm
The first try failed to work with some build flags
The gcc version affected is very old and unmaintained AFAIK thus i made no
attempt to report this to the gcc developers.
The workaround is pushed as it may still affect users and does affect one
fate client
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_pullup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c index ac67de674d..c38d0bb05c 100644 --- a/libavfilter/vf_pullup.c +++ b/libavfilter/vf_pullup.c @@ -67,7 +67,7 @@ static int query_formats(AVFilterContext *ctx) return 0; } -#define ABS(a) ((a) > 0 ? (a) : -(a)) +#define ABS(a) (((a) ^ ((a) >> 31)) - ((a) >> 31)) static int diff_c(const uint8_t *a, const uint8_t *b, ptrdiff_t s) { @@ -389,8 +389,8 @@ static void compute_affinity(PullupContext *s, PullupField *f) int v = f->vars[i]; int lv = f->prev->vars[i]; int rv = f->next->vars[i]; - int lc = f->combs[i] - (v + lv) + ABS(v - lv); - int rc = f->next->combs[i] - (v + rv) + ABS(v - rv); + int lc = f-> combs[i] - 2*(v < lv ? v : lv); + int rc = f->next->combs[i] - 2*(v < rv ? v : rv); lc = FFMAX(lc, 0); rc = FFMAX(rc, 0); |