summaryrefslogtreecommitdiff
path: root/libcamera/convert.S
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2011-11-11 18:09:08 +0530
committerVishal Bhoj <vishal.bhoj@linaro.org>2011-11-11 19:15:47 +0530
commit120c22ceb513ca37685854e467fb4cb482840d1c (patch)
treebea205b17fb99bb2b943dc1c515e1c9400901f8b /libcamera/convert.S
parent9f3cf8400b6c7e43b8ca434efb61acdbd42b3fa6 (diff)
camera: modified to support recordinglinaro_android_2.3.7linaro_android_2.3.5
The cameraHardware implementation has been modified for recording and also to support multipple resolutions.It also has additional cameraParameters which are tried to access by linphone application. Note:Moving ahead we may have to add other cameraparameters since there are a whole set of parameters which application can querry Change-Id: I7e3eee472c9ae0ca330d763b7272081962efb15b Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
Diffstat (limited to 'libcamera/convert.S')
-rw-r--r--libcamera/convert.S35
1 files changed, 35 insertions, 0 deletions
diff --git a/libcamera/convert.S b/libcamera/convert.S
new file mode 100644
index 0000000..5254a30
--- /dev/null
+++ b/libcamera/convert.S
@@ -0,0 +1,35 @@
+ .arch armv7-a
+ .fpu neon
+ .text
+
+ .globl yuyv422_to_yuv420sp
+ .type yuyv422_to_yuv420sp, STT_FUNC
+ .func yuyv422_to_yuv420sp
+yuyv422_to_yuv420sp:
+ push {r4-r5,lr}
+ mul r12, r2, r3
+ add r4, r0, r2, lsl #1 @ in_1
+ add r5, r1, r2 @ out_1
+ add lr, r1, r12 @ out_uv
+1:
+ mov r12, r2
+2:
+ vld1.8 {q0}, [r0]!
+ vld1.8 {q1}, [r4]!
+ vuzp.8 d0, d1
+ vuzp.8 d2, d3
+ vhadd.u8 d1, d1, d3
+ vrev16.8 d1, d1
+ vst1.8 {d0}, [r1]!
+ vst1.8 {d2}, [r5]!
+ vst1.8 {d1}, [lr]!
+ subs r12, r12, #8
+ bgt 2b
+ add r0, r0, r2, lsl #1
+ add r4, r4, r2, lsl #1
+ add r1, r1, r2
+ add r5, r5, r2
+ subs r3, r3, #2
+ bgt 1b
+ pop {r4-r5,pc}
+.endfunc