1@/***************************************************************************** 2@* 3@* Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore 4@* 5@* Licensed under the Apache License, Version 2.0 (the "License"); 6@* you may not use this file except in compliance with the License. 7@* You may obtain a copy of the License at: 8@* 9@* http://www.apache.org/licenses/LICENSE-2.0 10@* 11@* Unless required by applicable law or agreed to in writing, software 12@* distributed under the License is distributed on an "AS IS" BASIS, 13@* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14@* See the License for the specific language governing permissions and 15@* limitations under the License. 16@* 17@*****************************************************************************/ 18@/** 19@/******************************************************************************* 20@* @file 21@* ihevc_deblk_luma_vert.s 22@* 23@* @brief 24@* contains function definitions for inter prediction interpolation. 25@* functions are coded using neon intrinsics and can be compiled using 26 27@* rvct 28@* 29@* @author 30@* anand s 31@* 32@* @par list of functions: 33@* 34@* 35@* @remarks 36@* none 37@* 38@*******************************************************************************/ 39 40.text 41.align 4 42 43 44 45 46 47.extern gai4_ihevc_qp_table 48.extern gai4_ihevc_tc_table 49.globl ihevc_deblk_chroma_vert_a9q 50 51gai4_ihevc_qp_table_addr: 52.long gai4_ihevc_qp_table - ulbl1 - 8 53 54gai4_ihevc_tc_table_addr: 55.long gai4_ihevc_tc_table - ulbl2 - 8 56 57.type ihevc_deblk_chroma_vert_a9q, %function 58 59ihevc_deblk_chroma_vert_a9q: 60 push {r4-r12,lr} 61 sub r8,r0,#4 62 add r2,r2,r3 63 vld1.8 {d5},[r8],r1 64 add r2,r2,#1 65 vld1.8 {d17},[r8],r1 66 ldr r7,[sp,#0x28] 67 vld1.8 {d16},[r8],r1 68 ldr r4,[sp,#0x38] 69 vld1.8 {d4},[r8] 70 ldr r5,[sp,#0x30] 71 vtrn.8 d5,d17 72 adds r3,r7,r2,asr #1 73 vtrn.8 d16,d4 74 ldr r7,gai4_ihevc_qp_table_addr 75ulbl1: 76 add r7,r7,pc 77 ldr r12,[sp,#0x34] 78 ldr r6,[sp,#0x2c] 79 bmi l1.2944 80 cmp r3,#0x39 81 ldrle r3,[r7,r3,lsl #2] 82 subgt r3,r3,#6 83l1.2944: 84 vtrn.16 d5,d16 85 adds r2,r6,r2,asr #1 86 vtrn.16 d17,d4 87 bmi l1.2964 88 cmp r2,#0x39 89 ldrle r2,[r7,r2,lsl #2] 90 subgt r2,r2,#6 91l1.2964: 92 vtrn.32 d5,d17 93 add r3,r3,r5,lsl #1 94 vtrn.32 d16,d4 95 add r6,r3,#2 96 vmovl.u8 q9,d17 97 cmp r6,#0x35 98 movgt r3,#0x35 99 bgt l1.2996 100 adds r6,r3,#2 101 addpl r3,r3,#2 102 movmi r3,#0 103l1.2996: 104 vsubl.u8 q0,d17,d16 105 ldr r6,gai4_ihevc_tc_table_addr 106ulbl2: 107 add r6,r6,pc 108 vshl.i16 q0,q0,#2 109 add r2,r2,r5,lsl #1 110 add r5,r2,#2 111 vaddw.u8 q0,q0,d5 112 cmp r5,#0x35 113 ldr r3,[r6,r3,lsl #2] 114 vsubw.u8 q2,q0,d4 115 movgt r2,#0x35 116 bgt l1.3036 117 adds r5,r2,#2 118 addpl r2,r2,#2 119 movmi r2,#0 120l1.3036: 121 122 123 vrshr.s16 q3,q2,#3 124 vdup.16 d2,r3 125 ldr r2,[r6,r2,lsl #2] 126 rsb r3,r3,#0 127 cmp r12,#0 128 vdup.16 d3,r2 129 rsb r2,r2,#0 130 vdup.16 d30,r3 131 vdup.16 d31,r2 132 133 134 vmin.s16 q2,q3,q1 135 vmax.s16 q1,q15,q2 136 137 vmovl.u8 q3,d16 138 139 vadd.i16 q0,q3,q1 140 vsub.i16 q1,q9,q1 141 vqmovun.s16 d0,q0 142 sub r2,r0,#2 143 vqmovun.s16 d1,q1 144 vtrn.32 d0,d1 145 vtrn.8 d0,d1 146 beq l1.3204 147 148 vst1.16 {d0[0]},[r2],r1 149 vst1.16 {d1[0]},[r2],r1 150 vst1.16 {d0[1]},[r2],r1 151 vst1.16 {d1[1]},[r2] 152l1.3204: 153 cmp r4,#0 154 beq l1.3228 155 vst1.16 {d0[2]},[r0],r1 156 vst1.16 {d1[2]},[r0],r1 157 vst1.16 {d0[3]},[r0],r1 158 vst1.16 {d1[3]},[r0] 159l1.3228: 160 pop {r4-r12,pc} 161 162 163 164