1/* 2 * Copyright (C) 2007-2008 ARM Limited 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17/* 18 * 19 */ 20 21 .eabi_attribute 24, 1 22 .eabi_attribute 25, 1 23 24 .arm 25 .fpu neon 26 .text 27 28 .global omxVCM4P10_TransformDequantChromaDCFromPair 29 .func omxVCM4P10_TransformDequantChromaDCFromPair 30omxVCM4P10_TransformDequantChromaDCFromPair: 31 push {r4-r10, lr} 32 ldr r9, [r0,#0] 33 vmov.i16 d0, #0 34 mov r8, #0x1f 35 vst1.16 {d0}, [r1] 36 ldrb r6, [r9], #1 37unpackLoop: 38 tst r6, #0x10 39 ldrnesb r5, [r9, #1] 40 ldrneb r4, [r9], #2 41 and r7, r8, r6, lsl #1 42 ldreqsb r4, [r9], #1 43 orrne r4, r4, r5, lsl #8 44 tst r6, #0x20 45 ldreqb r6, [r9], #1 46 strh r4, [r1, r7] 47 beq unpackLoop 48 ldmia r1, {r3, r4} 49 str r9, [r0, #0] 50 ldr r5, .LarmVCM4P10_QPDivTable 51P0: add r5, pc 52 ldr r6, .LarmVCM4P10_VMatrixQPModTable 53P1: add r6, pc 54 saddsubx r3, r3, r3 55 saddsubx r4, r4, r4 56 ldrsb r9, [r5, r2] 57 ldrsb r2, [r6, r2] 58 sadd16 r5, r3, r4 59 ssub16 r6, r3, r4 60 lsl r2, r2, r9 61 vmov d0, r5, r6 62 vrev32.16 d0, d0 63 vdup.16 d1, r2 64 vmull.s16 q1, d0, d1 65 vshrn.i32 d2, q1, #1 66 vst1.16 {d2}, [r1] 67 mov r0, #0 68 pop {r4-r10, pc} 69 .endfunc 70 71.LarmVCM4P10_QPDivTable: 72 .word armVCM4P10_QPDivTable-(P0+8) 73.LarmVCM4P10_VMatrixQPModTable: 74 .word armVCM4P10_VMatrixQPModTable-(P1+8) 75 76 .end 77