[FFmpeg-cvslog] lavfi/edgedetect: add rounding for high/low threshold.

Clément Bœsch git at videolan.org
Fri Aug 17 08:02:53 CEST 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Fri Aug 17 08:07:37 2012 +0200| [517a2bbcf131df3e61ff4494d7f695b4570bc5fc] | committer: Clément Bœsch

lavfi/edgedetect: add rounding for high/low threshold.

This should fix the 32-bit FATE instances where low_u8=19 and high_u8=49.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=517a2bbcf131df3e61ff4494d7f695b4570bc5fc
---

 libavfilter/vf_edgedetect.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c
index 3b1cf32..018d9aa 100644
--- a/libavfilter/vf_edgedetect.c
+++ b/libavfilter/vf_edgedetect.c
@@ -60,8 +60,8 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
     if ((ret = av_set_options_string(edgedetect, args, "=", ":")) < 0)
         return ret;
 
-    edgedetect->low_u8  = edgedetect->low  * 255.;
-    edgedetect->high_u8 = edgedetect->high * 255.;
+    edgedetect->low_u8  = edgedetect->low  * 255. + .5;
+    edgedetect->high_u8 = edgedetect->high * 255. + .5;
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list