2 * (C) GraÅžvydas "notaz" Ignotas, 2010
4 * This work is licensed under the terms of any of these licenses
6 * - GNU GPL, version 2 or later.
7 * - GNU LGPL, version 2.1 or later.
8 * See the COPYING file in the top-level directory.
11 #include "arm_features.h"
15 #error Compiling NEON code, but appropriate preprocessor flag is missing
16 #error This usually means -mfpu=neon or -mfloat-abi= is not correctly specified
22 FUNCTION(bgr555_to_rgb565): @ dst, src, bytes
57 @ handle the remainder (reasonably rare)
84 @ note: may overflow source
85 FUNCTION(bgr555_to_rgb565_b): @ dst, src, bytes, int brightness2k // 0-0x0800
100 vmul.u16 q6, q10, q15
101 vmul.u16 q7, q11, q15
122 vshr.u16 q10, q2, #10
123 vshr.u16 q11, q3, #10
134 vsri.u16 q6, q10, #11
135 vsri.u16 q7, q11, #11
165 FUNCTION(bgr888_to_rgb888): @ dst, src, bytes
174 vld3.8 {d0-d2}, [r1, :64]!
175 vld3.8 {d3-d5}, [r1, :64]!
178 vst3.8 {d0-d2}, [r0, :64]!
179 vst3.8 {d3-d5}, [r0, :64]!
186 FUNCTION(bgr888_to_rgb565): @ dst, src, bytes
198 vld3.8 {d1-d3}, [r1, :64]!
199 vld3.8 {d5-d7}, [r1, :64]!
201 vshll.u8 q8, d2, #3 @ g
203 vshr.u8 d0, d3, #3 @ b
218 FUNCTION(rgb888_to_rgb565): @ dst, src, bytes
230 vld3.8 {d1-d3}, [r1, :64]!
231 vld3.8 {d5-d7}, [r1, :64]!
233 vshll.u8 q8, d2, #3 @ g
235 vshr.u8 d2, d1, #3 @ b
250 @ vim:filetype=armasm