]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_vectorscope: use av_clip_uint8()
authorJames Almer <jamrial@gmail.com>
Sun, 29 Dec 2019 01:38:52 +0000 (22:38 -0300)
committerJames Almer <jamrial@gmail.com>
Sun, 29 Dec 2019 01:38:58 +0000 (22:38 -0300)
Fixes fate-source

Signed-off-by: James Almer <jamrial@gmail.com>
libavfilter/vf_vectorscope.c

index e25214355e45ce40e324c10f87d84a99815636ac..37e36b9eefe7d85855444bb9dbf90e2f51de7a3e 100644 (file)
@@ -781,8 +781,8 @@ static void vectorscope8(VectorscopeContext *s, AVFrame *in, AVFrame *out, int p
             for (j = 0; j < out->width; j++) {
                 const int pos = i * dlinesize + j;
                 if (dpd[pos]) {
-                    dpx[pos] = av_clip(dpd[pos] + dpd[pos] * s->ftint[0], 0, 255);
-                    dpy[pos] = av_clip(dpd[pos] + dpd[pos] * s->ftint[1], 0, 255);
+                    dpx[pos] = av_clip_uint8(dpd[pos] + dpd[pos] * s->ftint[0]);
+                    dpy[pos] = av_clip_uint8(dpd[pos] + dpd[pos] * s->ftint[1]);
                 }
             }
         }