Home | History | Annotate | Download | only in armv7
      1 @/******************************************************************************
      2 @ *
      3 @ * Copyright (C) 2018 The Android Open Source Project
      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 @ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
     19 @*/
     20 
     21 
     22 .text
     23 .p2align 2
     24 
     25     .global ixheaacd_overlap_out_copy_armv7
     26     .global ixheaacd_spec_to_overlapbuf_armv7
     27     .global ixheaacd_overlap_buf_out_armv7
     28 
     29 ixheaacd_overlap_buf_out_armv7:
     30 
     31     STMFD           sp!, {r4-r5}
     32     MOV             r3, r3, lsl #1
     33 
     34 OUTSAMPLE_LOOP:
     35 
     36     LDR             r4, [r1], #4
     37     LDR             r5, [r1], #4
     38     SUBS            r2, r2, #2
     39 
     40     QADD16          r4, r4, r4
     41     QADD16          r5, r5, r5
     42 
     43     STRH            r4, [r0], r3
     44     STRH            r5, [r0], r3
     45 
     46     BGT             OUTSAMPLE_LOOP
     47 
     48     LDMFD           sp!, {r4-r5}
     49     BX              lr
     50 
     51 
     52 ixheaacd_overlap_out_copy_armv7:
     53 
     54     STMFD           sp!, {r4-r9, r14}
     55     MOV             r9, #32
     56     MOV             r8, r1
     57     MOV             r3, r3, LSL #1
     58 
     59 
     60 OUT_OVERLAP_LOOP:
     61     LDR             r4, [r1], #4
     62     LDR             r5, [r1], #4
     63     SUBS            r9, r9, #1
     64 
     65     QADD16          r4, r4, r4
     66     QADD16          r5, r5, r5
     67 
     68     LDR             r6, [r2], #4
     69     LDR             r7, [r2], #4
     70 
     71     STRH            r4, [r0], r3
     72     STRH            r5, [r0], r3
     73 
     74     STR             r6, [r8], #4
     75     STR             r7, [r8], #4
     76 
     77     BGT             OUT_OVERLAP_LOOP
     78 
     79     LDMFD           sp!, {r4-r9, r15}
     80 
     81 
     82 
     83 
     84 ixheaacd_spec_to_overlapbuf_armv7:
     85 
     86     STMFD           sp!, {r4-r10, r14}
     87 
     88     MOV             r6, #1
     89     RSB             r2, r2, #16
     90     AND             r2, r2, #0xFF
     91     SUB             r7, r2, #1
     92     LSL             r14, r6, r7
     93     MOV             r3, r3, ASR #1
     94 
     95 OVERLAP_LOOP1:
     96 
     97 
     98     LDMIA           r1!, {r4-r5}
     99     SUBS            r3, r3, #1
    100 
    101     QADD            r4, r4, r14
    102     QADD            r5, r5, r14
    103 
    104     MOV             r4, r4, ASR r2
    105     MOV             r5, r5, ASR r2
    106 
    107     STR             r4, [r0], #4
    108     STR             r5, [r0], #4
    109 
    110 
    111     BGT             OVERLAP_LOOP1
    112     LDMFD           sp!, {r4-r10, pc}
    113 
    114