]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_gradfun.c
intrax8: Drop lots of pointless parentheses
[ffmpeg] / libavfilter / vf_gradfun.c
index 79f6790f30da0f97da723a15d9bb11a15143d57f..ce79329b61fb7cf05a2ca72ec0b4f6612a90d5a8 100644 (file)
@@ -118,6 +118,7 @@ static void filter(GradFunContext *ctx, uint8_t *dst, uint8_t *src, int width, i
         ctx->filter_line(dst + y * dst_linesize, src + y * src_linesize, dc - r / 2, width, thresh, dither[y & 7]);
         if (++y >= height) break;
     }
+    emms_c();
 }
 
 static av_cold int init(AVFilterContext *ctx)
@@ -171,8 +172,8 @@ static int config_input(AVFilterLink *inlink)
     if (!s->buf)
         return AVERROR(ENOMEM);
 
-    s->chroma_w = -((-inlink->w) >> hsub);
-    s->chroma_h = -((-inlink->h) >> vsub);
+    s->chroma_w = AV_CEIL_RSHIFT(inlink->w, hsub);
+    s->chroma_h = AV_CEIL_RSHIFT(inlink->h, vsub);
     s->chroma_r = av_clip(((((s->radius >> hsub) + (s->radius >> vsub)) / 2 ) + 1) & ~1, 4, 32);
 
     return 0;