[vlc-commits] Neon yuv->rgb: check if CPU supports NEON

Rafaël Carré git at videolan.org
Fri Jan 27 19:30:02 CET 2012


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Wed Jan 25 12:10:00 2012 -0500| [8b148da32117d1db8c7ec624ed10351423cc8bd7] | committer: Jean-Baptiste Kempf

Neon yuv->rgb: check if CPU supports NEON
(cherry picked from commit 14b6dc70ede19e0b5bbf7652afb053966a7c6610)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=8b148da32117d1db8c7ec624ed10351423cc8bd7
---

 modules/arm_neon/yuv_rgb.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/arm_neon/yuv_rgb.c b/modules/arm_neon/yuv_rgb.c
index f6113f2..8b458f4 100644
--- a/modules/arm_neon/yuv_rgb.c
+++ b/modules/arm_neon/yuv_rgb.c
@@ -125,6 +125,9 @@ static int Open (vlc_object_t *obj)
 {
     filter_t *filter = (filter_t *)obj;
 
+    if (!(vlc_CPU() & CPU_CAPABILITY_NEON))
+        return VLC_EGENERIC;
+
     if (((filter->fmt_in.video.i_width | filter->fmt_in.video.i_height) & 1)
      || (filter->fmt_in.video.i_width != filter->fmt_out.video.i_width)
      || (filter->fmt_in.video.i_height != filter->fmt_out.video.i_height))



More information about the vlc-commits mailing list