]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_edgedetect.c
doc/filters: Documentation to add sess_config option for tensorflow backend
[ffmpeg] / libavfilter / vf_edgedetect.c
index 25424dbccec5a1947234db6ba5f10b4cdf623065..e21d341fd292d5dd18375bbebe02dfa3d260166a 100644 (file)
@@ -216,7 +216,7 @@ static int get_rounded_direction(int gx, int gy)
 
         if (gx < 0)
             gx = -gx, gy = -gy;
-        gy <<= 16;
+        gy *= (1 << 16);
         tanpi8gx  =  27146 * gx;
         tan3pi8gx = 158218 * gx;
         if (gy > -tan3pi8gx && gy < -tanpi8gx)  return DIRECTION_45UP;
@@ -294,7 +294,7 @@ static void double_threshold(int low, int high, int w, int h,
                 continue;
             }
 
-            if ((!i || i == w - 1 || !j || j == h - 1) &&
+            if (!(!i || i == w - 1 || !j || j == h - 1) &&
                 src[i] > low &&
                 (src[-src_linesize + i-1] > high ||
                  src[-src_linesize + i  ] > high ||
@@ -431,7 +431,7 @@ static const AVFilterPad edgedetect_outputs[] = {
     { NULL }
 };
 
-AVFilter ff_vf_edgedetect = {
+const AVFilter ff_vf_edgedetect = {
     .name          = "edgedetect",
     .description   = NULL_IF_CONFIG_SMALL("Detect and draw edge."),
     .priv_size     = sizeof(EdgeDetectContext),