avfilter: Add missing emms_c when needed
authorLuca Barbato <lu_zero@gentoo.org>
Wed, 5 Mar 2014 09:41:33 +0000 (10:41 +0100)
committerSean McGovern <gseanmcg@gmail.com>
Mon, 14 Apr 2014 22:29:46 +0000 (18:29 -0400)
Arch specific calls should have an emms_c following to keep the cpu
state consistent.

Reported-By: wm4
CC: libav-stable@libav.org
(cherry picked from commit e995cf1bccc6e91bbaa6a8771e23fb3ab259c110)

libavfilter/af_volume.c
libavfilter/vf_gradfun.c
libavfilter/vf_hqdn3d.c

index 3f3ad47..c8e8897 100644 (file)
@@ -282,6 +282,8 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
         }
     }
 
+    emms_c();
+
     if (buf != out_buf)
         avfilter_unref_buffer(buf);
 
index 79e1490..b9fd50f 100644 (file)
@@ -117,6 +117,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, const char *args)
index e2d90d5..ae794d8 100644 (file)
@@ -155,6 +155,7 @@ static void denoise_depth(HQDN3DContext *hqdn3d,
     else
         denoise_temporal(src, dst, frame_ant,
                          w, h, sstride, dstride, temporal, depth);
+    emms_c();
 }
 
 #define denoise(...) \