summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/yuv2rgb_arm4l.S21
1 files changed, 21 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/yuv2rgb_arm4l.S b/noncore/multimedia/opieplayer2/yuv2rgb_arm4l.S
index f4a3395..521bcaa 100644
--- a/noncore/multimedia/opieplayer2/yuv2rgb_arm4l.S
+++ b/noncore/multimedia/opieplayer2/yuv2rgb_arm4l.S
@@ -1,24 +1,45 @@
1/*
2Copyright (c) 2001 Lionel Ulmer (lionel.ulmer@free.fr / bbrox@bbrox.org)
3
4Permission is hereby granted, free of charge, to any person obtaining a copy
5of this software and associated documentation files (the "Software"), to deal
6in the Software without restriction, including without limitation the rights
7to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8copies of the Software, and to permit persons to whom the Software is
9furnished to do so, subject to the following conditions:
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20*/
21
1/* WARNING : this function only works when stride_U == stride_V (I use some hacks to 22/* WARNING : this function only works when stride_U == stride_V (I use some hacks to
2 not have to do too many computations at line's end)... 23 not have to do too many computations at line's end)...
3 24
4 C-like prototype : 25 C-like prototype :
5 void convert_yuv420_rgb565(AVPicture *picture, unsigned char *results, int w, int h) ; 26 void convert_yuv420_rgb565(AVPicture *picture, unsigned char *results, int w, int h) ;
6 27
7*/ 28*/
8 29
9#ifdef __arm__ 30#ifdef __arm__
10 31
11 .text 32 .text
12 .align 33 .align
13 34
14 .global convert_yuv420_rgb565 35 .global convert_yuv420_rgb565
15convert_yuv420_rgb565: 36convert_yuv420_rgb565:
16 stmdb sp!, { r4 - r12, lr } @ all callee saved regs 37 stmdb sp!, { r4 - r12, lr } @ all callee saved regs
17 ldr r7, [r0, #0] @ Y ptr 38 ldr r7, [r0, #0] @ Y ptr
18 ldr r9, [r0, #4] @ U ptr 39 ldr r9, [r0, #4] @ U ptr
19 ldr r10, [r0, #8] @ V ptr 40 ldr r10, [r0, #8] @ V ptr
20 subs r10, r10, r9 @ V ptr - U ptr 41 subs r10, r10, r9 @ V ptr - U ptr
21 ldr r8, [r0, #12] 42 ldr r8, [r0, #12]
22 add r8, r8, r7 @ Y + stride_Y 43 add r8, r8, r7 @ Y + stride_Y
23 ldr r4, [r0, #12] @ Stride_Y 44 ldr r4, [r0, #12] @ Stride_Y
24 mov r4, r4, lsl #1 45 mov r4, r4, lsl #1