]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ppc/vp3dsp_altivec.c
pthread: Avoid spurious wakeups
[ffmpeg] / libavcodec / ppc / vp3dsp_altivec.c
index 48436f33371523bb8b5583d30a53ce89c47ff764..bf50c02822dabe76ca162e6659e7ba517a45eaae 100644 (file)
@@ -180,9 +180,10 @@ static void vp3_idct_add_altivec(uint8_t *dst, int stride, int16_t block[64])
 av_cold void ff_vp3dsp_init_ppc(VP3DSPContext *c, int flags)
 {
 #if HAVE_ALTIVEC
-    if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {
-        c->idct_put  = vp3_idct_put_altivec;
-        c->idct_add  = vp3_idct_add_altivec;
-    }
+    if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC))
+        return;
+
+    c->idct_put = vp3_idct_put_altivec;
+    c->idct_add = vp3_idct_add_altivec;
 #endif
 }