-rw-r--r-- | noncore/multimedia/opieplayer2/yuv2rgb_arm4l.S | 21 |
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 | /* | ||
2 | Copyright (c) 2001 Lionel Ulmer (lionel.ulmer@free.fr / bbrox@bbrox.org) | ||
3 | |||
4 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
5 | of this software and associated documentation files (the "Software"), to deal | ||
6 | in the Software without restriction, including without limitation the rights | ||
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
8 | copies of the Software, and to permit persons to whom the Software is | ||
9 | furnished to do so, subject to the following conditions: | ||
10 | |||
11 | The above copyright notice and this permission notice shall be included in | ||
12 | all copies or substantial portions of the Software. | ||
13 | |||
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
19 | CONNECTION 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 |
15 | convert_yuv420_rgb565: | 36 | convert_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 |