10c1bc742181ded4930842b46e9507372f0b1b963James Dong/* 278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Copyright (C) 2007-2008 ARM Limited 378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * 478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Licensed under the Apache License, Version 2.0 (the "License"); 578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * you may not use this file except in compliance with the License. 678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * You may obtain a copy of the License at 778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * 878e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * http://www.apache.org/licenses/LICENSE-2.0 978e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * 1078e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Unless required by applicable law or agreed to in writing, software 1178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * distributed under the License is distributed on an "AS IS" BASIS, 1278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * See the License for the specific language governing permissions and 1478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * limitations under the License. 1578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * 1678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar */ 1778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar/* 180c1bc742181ded4930842b46e9507372f0b1b963James Dong * 190c1bc742181ded4930842b46e9507372f0b1b963James Dong */ 200c1bc742181ded4930842b46e9507372f0b1b963James Dong 210c1bc742181ded4930842b46e9507372f0b1b963James Dong .eabi_attribute 24, 1 220c1bc742181ded4930842b46e9507372f0b1b963James Dong .eabi_attribute 25, 1 230c1bc742181ded4930842b46e9507372f0b1b963James Dong 240c1bc742181ded4930842b46e9507372f0b1b963James Dong .arm 250c1bc742181ded4930842b46e9507372f0b1b963James Dong .fpu neon 260c1bc742181ded4930842b46e9507372f0b1b963James Dong .text 277ea582e1dbdd9a88b2105fbe29ed0ec92cbf70c6Chih-Hung Hsieh .syntax unified 280c1bc742181ded4930842b46e9507372f0b1b963James Dong 290c1bc742181ded4930842b46e9507372f0b1b963James Dong .global omxVCM4P10_TransformDequantChromaDCFromPair 300c1bc742181ded4930842b46e9507372f0b1b963James DongomxVCM4P10_TransformDequantChromaDCFromPair: 310c1bc742181ded4930842b46e9507372f0b1b963James Dong push {r4-r10, lr} 320c1bc742181ded4930842b46e9507372f0b1b963James Dong ldr r9, [r0,#0] 330c1bc742181ded4930842b46e9507372f0b1b963James Dong vmov.i16 d0, #0 340c1bc742181ded4930842b46e9507372f0b1b963James Dong mov r8, #0x1f 350c1bc742181ded4930842b46e9507372f0b1b963James Dong vst1.16 {d0}, [r1] 360c1bc742181ded4930842b46e9507372f0b1b963James Dong ldrb r6, [r9], #1 370c1bc742181ded4930842b46e9507372f0b1b963James DongunpackLoop: 380c1bc742181ded4930842b46e9507372f0b1b963James Dong tst r6, #0x10 397ea582e1dbdd9a88b2105fbe29ed0ec92cbf70c6Chih-Hung Hsieh ldrsbne r5, [r9, #1] 407ea582e1dbdd9a88b2105fbe29ed0ec92cbf70c6Chih-Hung Hsieh ldrbne r4, [r9], #2 410c1bc742181ded4930842b46e9507372f0b1b963James Dong and r7, r8, r6, lsl #1 427ea582e1dbdd9a88b2105fbe29ed0ec92cbf70c6Chih-Hung Hsieh ldrsbeq r4, [r9], #1 430c1bc742181ded4930842b46e9507372f0b1b963James Dong orrne r4, r4, r5, lsl #8 440c1bc742181ded4930842b46e9507372f0b1b963James Dong tst r6, #0x20 457ea582e1dbdd9a88b2105fbe29ed0ec92cbf70c6Chih-Hung Hsieh ldrbeq r6, [r9], #1 460c1bc742181ded4930842b46e9507372f0b1b963James Dong strh r4, [r1, r7] 470c1bc742181ded4930842b46e9507372f0b1b963James Dong beq unpackLoop 480c1bc742181ded4930842b46e9507372f0b1b963James Dong ldmia r1, {r3, r4} 490c1bc742181ded4930842b46e9507372f0b1b963James Dong str r9, [r0, #0] 5022e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel ldr r5, .LarmVCM4P10_QPDivTable 5122e06318d04074d1a7c90caa173857abdcfd153eArd BiesheuvelP0: add r5, pc 5222e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel ldr r6, .LarmVCM4P10_VMatrixQPModTable 5322e06318d04074d1a7c90caa173857abdcfd153eArd BiesheuvelP1: add r6, pc 540c1bc742181ded4930842b46e9507372f0b1b963James Dong saddsubx r3, r3, r3 550c1bc742181ded4930842b46e9507372f0b1b963James Dong saddsubx r4, r4, r4 560c1bc742181ded4930842b46e9507372f0b1b963James Dong ldrsb r9, [r5, r2] 570c1bc742181ded4930842b46e9507372f0b1b963James Dong ldrsb r2, [r6, r2] 580c1bc742181ded4930842b46e9507372f0b1b963James Dong sadd16 r5, r3, r4 590c1bc742181ded4930842b46e9507372f0b1b963James Dong ssub16 r6, r3, r4 600c1bc742181ded4930842b46e9507372f0b1b963James Dong lsl r2, r2, r9 610c1bc742181ded4930842b46e9507372f0b1b963James Dong vmov d0, r5, r6 620c1bc742181ded4930842b46e9507372f0b1b963James Dong vrev32.16 d0, d0 630c1bc742181ded4930842b46e9507372f0b1b963James Dong vdup.16 d1, r2 640c1bc742181ded4930842b46e9507372f0b1b963James Dong vmull.s16 q1, d0, d1 650c1bc742181ded4930842b46e9507372f0b1b963James Dong vshrn.i32 d2, q1, #1 660c1bc742181ded4930842b46e9507372f0b1b963James Dong vst1.16 {d2}, [r1] 670c1bc742181ded4930842b46e9507372f0b1b963James Dong mov r0, #0 680c1bc742181ded4930842b46e9507372f0b1b963James Dong pop {r4-r10, pc} 690c1bc742181ded4930842b46e9507372f0b1b963James Dong 7022e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_QPDivTable: 7122e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel .word armVCM4P10_QPDivTable-(P0+8) 7222e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_VMatrixQPModTable: 7322e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel .word armVCM4P10_VMatrixQPModTable-(P1+8) 7422e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel 750c1bc742181ded4930842b46e9507372f0b1b963James Dong .end 76