1cabdff1aSopenharmony_ci/* 2cabdff1aSopenharmony_ci * Copyright (c) 2012 3cabdff1aSopenharmony_ci * MIPS Technologies, Inc., California. 4cabdff1aSopenharmony_ci * 5cabdff1aSopenharmony_ci * Redistribution and use in source and binary forms, with or without 6cabdff1aSopenharmony_ci * modification, are permitted provided that the following conditions 7cabdff1aSopenharmony_ci * are met: 8cabdff1aSopenharmony_ci * 1. Redistributions of source code must retain the above copyright 9cabdff1aSopenharmony_ci * notice, this list of conditions and the following disclaimer. 10cabdff1aSopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright 11cabdff1aSopenharmony_ci * notice, this list of conditions and the following disclaimer in the 12cabdff1aSopenharmony_ci * documentation and/or other materials provided with the distribution. 13cabdff1aSopenharmony_ci * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its 14cabdff1aSopenharmony_ci * contributors may be used to endorse or promote products derived from 15cabdff1aSopenharmony_ci * this software without specific prior written permission. 16cabdff1aSopenharmony_ci * 17cabdff1aSopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND 18cabdff1aSopenharmony_ci * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19cabdff1aSopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20cabdff1aSopenharmony_ci * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE 21cabdff1aSopenharmony_ci * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22cabdff1aSopenharmony_ci * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23cabdff1aSopenharmony_ci * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24cabdff1aSopenharmony_ci * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25cabdff1aSopenharmony_ci * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26cabdff1aSopenharmony_ci * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27cabdff1aSopenharmony_ci * SUCH DAMAGE. 28cabdff1aSopenharmony_ci * 29cabdff1aSopenharmony_ci * Authors: Djordje Pesut (djordje@mips.com) 30cabdff1aSopenharmony_ci * Mirjana Vulin (mvulin@mips.com) 31cabdff1aSopenharmony_ci * 32cabdff1aSopenharmony_ci * This file is part of FFmpeg. 33cabdff1aSopenharmony_ci * 34cabdff1aSopenharmony_ci * FFmpeg is free software; you can redistribute it and/or 35cabdff1aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public 36cabdff1aSopenharmony_ci * License as published by the Free Software Foundation; either 37cabdff1aSopenharmony_ci * version 2.1 of the License, or (at your option) any later version. 38cabdff1aSopenharmony_ci * 39cabdff1aSopenharmony_ci * FFmpeg is distributed in the hope that it will be useful, 40cabdff1aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 41cabdff1aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 42cabdff1aSopenharmony_ci * Lesser General Public License for more details. 43cabdff1aSopenharmony_ci * 44cabdff1aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public 45cabdff1aSopenharmony_ci * License along with FFmpeg; if not, write to the Free Software 46cabdff1aSopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 47cabdff1aSopenharmony_ci */ 48cabdff1aSopenharmony_ci 49cabdff1aSopenharmony_ci/** 50cabdff1aSopenharmony_ci * @file 51cabdff1aSopenharmony_ci * Reference: libavcodec/aacsbr.c 52cabdff1aSopenharmony_ci */ 53cabdff1aSopenharmony_ci 54cabdff1aSopenharmony_ci#ifndef AVCODEC_MIPS_AACSBR_MIPS_H 55cabdff1aSopenharmony_ci#define AVCODEC_MIPS_AACSBR_MIPS_H 56cabdff1aSopenharmony_ci 57cabdff1aSopenharmony_ci#include "libavcodec/aac.h" 58cabdff1aSopenharmony_ci#include "libavcodec/sbr.h" 59cabdff1aSopenharmony_ci#include "libavutil/mips/asmdefs.h" 60cabdff1aSopenharmony_ci 61cabdff1aSopenharmony_ci#if HAVE_INLINE_ASM 62cabdff1aSopenharmony_cistatic void sbr_qmf_analysis_mips(AVFloatDSPContext *fdsp, FFTContext *mdct, 63cabdff1aSopenharmony_ci SBRDSPContext *sbrdsp, const float *in, float *x, 64cabdff1aSopenharmony_ci float z[320], float W[2][32][32][2], int buf_idx) 65cabdff1aSopenharmony_ci{ 66cabdff1aSopenharmony_ci int i; 67cabdff1aSopenharmony_ci float *w0; 68cabdff1aSopenharmony_ci float *w1; 69cabdff1aSopenharmony_ci int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; 70cabdff1aSopenharmony_ci 71cabdff1aSopenharmony_ci w0 = x; 72cabdff1aSopenharmony_ci w1 = x + 1024; 73cabdff1aSopenharmony_ci for(i = 0; i < 36; i++) 74cabdff1aSopenharmony_ci { 75cabdff1aSopenharmony_ci /* loop unrolled 8 times */ 76cabdff1aSopenharmony_ci __asm__ volatile( 77cabdff1aSopenharmony_ci "lw %[temp0], 0(%[w1]) \n\t" 78cabdff1aSopenharmony_ci "lw %[temp1], 4(%[w1]) \n\t" 79cabdff1aSopenharmony_ci "lw %[temp2], 8(%[w1]) \n\t" 80cabdff1aSopenharmony_ci "lw %[temp3], 12(%[w1]) \n\t" 81cabdff1aSopenharmony_ci "lw %[temp4], 16(%[w1]) \n\t" 82cabdff1aSopenharmony_ci "lw %[temp5], 20(%[w1]) \n\t" 83cabdff1aSopenharmony_ci "lw %[temp6], 24(%[w1]) \n\t" 84cabdff1aSopenharmony_ci "lw %[temp7], 28(%[w1]) \n\t" 85cabdff1aSopenharmony_ci "sw %[temp0], 0(%[w0]) \n\t" 86cabdff1aSopenharmony_ci "sw %[temp1], 4(%[w0]) \n\t" 87cabdff1aSopenharmony_ci "sw %[temp2], 8(%[w0]) \n\t" 88cabdff1aSopenharmony_ci "sw %[temp3], 12(%[w0]) \n\t" 89cabdff1aSopenharmony_ci "sw %[temp4], 16(%[w0]) \n\t" 90cabdff1aSopenharmony_ci "sw %[temp5], 20(%[w0]) \n\t" 91cabdff1aSopenharmony_ci "sw %[temp6], 24(%[w0]) \n\t" 92cabdff1aSopenharmony_ci "sw %[temp7], 28(%[w0]) \n\t" 93cabdff1aSopenharmony_ci PTR_ADDIU " %[w0], %[w0], 32 \n\t" 94cabdff1aSopenharmony_ci PTR_ADDIU " %[w1], %[w1], 32 \n\t" 95cabdff1aSopenharmony_ci 96cabdff1aSopenharmony_ci : [w0]"+r"(w0), [w1]"+r"(w1), 97cabdff1aSopenharmony_ci [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), 98cabdff1aSopenharmony_ci [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), 99cabdff1aSopenharmony_ci [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), 100cabdff1aSopenharmony_ci [temp6]"=&r"(temp6), [temp7]"=&r"(temp7) 101cabdff1aSopenharmony_ci : 102cabdff1aSopenharmony_ci : "memory" 103cabdff1aSopenharmony_ci ); 104cabdff1aSopenharmony_ci } 105cabdff1aSopenharmony_ci 106cabdff1aSopenharmony_ci w0 = x + 288; 107cabdff1aSopenharmony_ci w1 = (float*)in; 108cabdff1aSopenharmony_ci for(i = 0; i < 128; i++) 109cabdff1aSopenharmony_ci { 110cabdff1aSopenharmony_ci /* loop unrolled 8 times */ 111cabdff1aSopenharmony_ci __asm__ volatile( 112cabdff1aSopenharmony_ci "lw %[temp0], 0(%[w1]) \n\t" 113cabdff1aSopenharmony_ci "lw %[temp1], 4(%[w1]) \n\t" 114cabdff1aSopenharmony_ci "lw %[temp2], 8(%[w1]) \n\t" 115cabdff1aSopenharmony_ci "lw %[temp3], 12(%[w1]) \n\t" 116cabdff1aSopenharmony_ci "lw %[temp4], 16(%[w1]) \n\t" 117cabdff1aSopenharmony_ci "lw %[temp5], 20(%[w1]) \n\t" 118cabdff1aSopenharmony_ci "lw %[temp6], 24(%[w1]) \n\t" 119cabdff1aSopenharmony_ci "lw %[temp7], 28(%[w1]) \n\t" 120cabdff1aSopenharmony_ci "sw %[temp0], 0(%[w0]) \n\t" 121cabdff1aSopenharmony_ci "sw %[temp1], 4(%[w0]) \n\t" 122cabdff1aSopenharmony_ci "sw %[temp2], 8(%[w0]) \n\t" 123cabdff1aSopenharmony_ci "sw %[temp3], 12(%[w0]) \n\t" 124cabdff1aSopenharmony_ci "sw %[temp4], 16(%[w0]) \n\t" 125cabdff1aSopenharmony_ci "sw %[temp5], 20(%[w0]) \n\t" 126cabdff1aSopenharmony_ci "sw %[temp6], 24(%[w0]) \n\t" 127cabdff1aSopenharmony_ci "sw %[temp7], 28(%[w0]) \n\t" 128cabdff1aSopenharmony_ci PTR_ADDIU " %[w0], %[w0], 32 \n\t" 129cabdff1aSopenharmony_ci PTR_ADDIU " %[w1], %[w1], 32 \n\t" 130cabdff1aSopenharmony_ci 131cabdff1aSopenharmony_ci : [w0]"+r"(w0), [w1]"+r"(w1), 132cabdff1aSopenharmony_ci [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), 133cabdff1aSopenharmony_ci [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), 134cabdff1aSopenharmony_ci [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), 135cabdff1aSopenharmony_ci [temp6]"=&r"(temp6), [temp7]"=&r"(temp7) 136cabdff1aSopenharmony_ci : 137cabdff1aSopenharmony_ci : "memory" 138cabdff1aSopenharmony_ci ); 139cabdff1aSopenharmony_ci } 140cabdff1aSopenharmony_ci 141cabdff1aSopenharmony_ci for (i = 0; i < 32; i++) { // numTimeSlots*RATE = 16*2 as 960 sample frames 142cabdff1aSopenharmony_ci // are not supported 143cabdff1aSopenharmony_ci fdsp->vector_fmul_reverse(z, sbr_qmf_window_ds, x, 320); 144cabdff1aSopenharmony_ci sbrdsp->sum64x5(z); 145cabdff1aSopenharmony_ci sbrdsp->qmf_pre_shuffle(z); 146cabdff1aSopenharmony_ci mdct->imdct_half(mdct, z, z+64); 147cabdff1aSopenharmony_ci sbrdsp->qmf_post_shuffle(W[buf_idx][i], z); 148cabdff1aSopenharmony_ci x += 32; 149cabdff1aSopenharmony_ci } 150cabdff1aSopenharmony_ci} 151cabdff1aSopenharmony_ci 152cabdff1aSopenharmony_ci#if HAVE_MIPSFPU 153cabdff1aSopenharmony_ci#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 154cabdff1aSopenharmony_cistatic void sbr_qmf_synthesis_mips(FFTContext *mdct, 155cabdff1aSopenharmony_ci SBRDSPContext *sbrdsp, AVFloatDSPContext *fdsp, 156cabdff1aSopenharmony_ci float *out, float X[2][38][64], 157cabdff1aSopenharmony_ci float mdct_buf[2][64], 158cabdff1aSopenharmony_ci float *v0, int *v_off, const unsigned int div) 159cabdff1aSopenharmony_ci{ 160cabdff1aSopenharmony_ci int i, n; 161cabdff1aSopenharmony_ci const float *sbr_qmf_window = div ? sbr_qmf_window_ds : sbr_qmf_window_us; 162cabdff1aSopenharmony_ci const int step = 128 >> div; 163cabdff1aSopenharmony_ci float *v; 164cabdff1aSopenharmony_ci float temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10, temp11, temp12, temp13; 165cabdff1aSopenharmony_ci float temp14, temp15, temp16, temp17, temp18, temp19; 166cabdff1aSopenharmony_ci float *vv0, *s0, *dst; 167cabdff1aSopenharmony_ci dst = out; 168cabdff1aSopenharmony_ci 169cabdff1aSopenharmony_ci for (i = 0; i < 32; i++) { 170cabdff1aSopenharmony_ci if (*v_off < step) { 171cabdff1aSopenharmony_ci int saved_samples = (1280 - 128) >> div; 172cabdff1aSopenharmony_ci memcpy(&v0[SBR_SYNTHESIS_BUF_SIZE - saved_samples], v0, saved_samples * sizeof(float)); 173cabdff1aSopenharmony_ci *v_off = SBR_SYNTHESIS_BUF_SIZE - saved_samples - step; 174cabdff1aSopenharmony_ci } else { 175cabdff1aSopenharmony_ci *v_off -= step; 176cabdff1aSopenharmony_ci } 177cabdff1aSopenharmony_ci v = v0 + *v_off; 178cabdff1aSopenharmony_ci if (div) { 179cabdff1aSopenharmony_ci for (n = 0; n < 32; n++) { 180cabdff1aSopenharmony_ci X[0][i][ n] = -X[0][i][n]; 181cabdff1aSopenharmony_ci X[0][i][32+n] = X[1][i][31-n]; 182cabdff1aSopenharmony_ci } 183cabdff1aSopenharmony_ci mdct->imdct_half(mdct, mdct_buf[0], X[0][i]); 184cabdff1aSopenharmony_ci sbrdsp->qmf_deint_neg(v, mdct_buf[0]); 185cabdff1aSopenharmony_ci } else { 186cabdff1aSopenharmony_ci sbrdsp->neg_odd_64(X[1][i]); 187cabdff1aSopenharmony_ci mdct->imdct_half(mdct, mdct_buf[0], X[0][i]); 188cabdff1aSopenharmony_ci mdct->imdct_half(mdct, mdct_buf[1], X[1][i]); 189cabdff1aSopenharmony_ci sbrdsp->qmf_deint_bfly(v, mdct_buf[1], mdct_buf[0]); 190cabdff1aSopenharmony_ci } 191cabdff1aSopenharmony_ci 192cabdff1aSopenharmony_ci if(div == 0) 193cabdff1aSopenharmony_ci { 194cabdff1aSopenharmony_ci float *v0_end; 195cabdff1aSopenharmony_ci vv0 = v; 196cabdff1aSopenharmony_ci v0_end = v + 60; 197cabdff1aSopenharmony_ci s0 = (float*)sbr_qmf_window; 198cabdff1aSopenharmony_ci 199cabdff1aSopenharmony_ci /* 10 calls of function vector_fmul_add merged into one loop 200cabdff1aSopenharmony_ci and loop unrolled 4 times */ 201cabdff1aSopenharmony_ci __asm__ volatile( 202cabdff1aSopenharmony_ci ".set push \n\t" 203cabdff1aSopenharmony_ci ".set noreorder \n\t" 204cabdff1aSopenharmony_ci "lwc1 %[temp4], 0(%[v0]) \n\t" 205cabdff1aSopenharmony_ci "lwc1 %[temp5], 0(%[s0]) \n\t" 206cabdff1aSopenharmony_ci "lwc1 %[temp6], 4(%[v0]) \n\t" 207cabdff1aSopenharmony_ci "lwc1 %[temp7], 4(%[s0]) \n\t" 208cabdff1aSopenharmony_ci "lwc1 %[temp8], 8(%[v0]) \n\t" 209cabdff1aSopenharmony_ci "lwc1 %[temp9], 8(%[s0]) \n\t" 210cabdff1aSopenharmony_ci "lwc1 %[temp10], 12(%[v0]) \n\t" 211cabdff1aSopenharmony_ci "lwc1 %[temp11], 12(%[s0]) \n\t" 212cabdff1aSopenharmony_ci "lwc1 %[temp12], 768(%[v0]) \n\t" 213cabdff1aSopenharmony_ci "lwc1 %[temp13], 256(%[s0]) \n\t" 214cabdff1aSopenharmony_ci "lwc1 %[temp14], 772(%[v0]) \n\t" 215cabdff1aSopenharmony_ci "lwc1 %[temp15], 260(%[s0]) \n\t" 216cabdff1aSopenharmony_ci "lwc1 %[temp16], 776(%[v0]) \n\t" 217cabdff1aSopenharmony_ci "lwc1 %[temp17], 264(%[s0]) \n\t" 218cabdff1aSopenharmony_ci "lwc1 %[temp18], 780(%[v0]) \n\t" 219cabdff1aSopenharmony_ci "lwc1 %[temp19], 268(%[s0]) \n\t" 220cabdff1aSopenharmony_ci "1: \n\t" 221cabdff1aSopenharmony_ci "mul.s %[temp0], %[temp4], %[temp5] \n\t" 222cabdff1aSopenharmony_ci "lwc1 %[temp4], 1024(%[v0]) \n\t" 223cabdff1aSopenharmony_ci "mul.s %[temp1], %[temp6], %[temp7] \n\t" 224cabdff1aSopenharmony_ci "lwc1 %[temp5], 512(%[s0]) \n\t" 225cabdff1aSopenharmony_ci "mul.s %[temp2], %[temp8], %[temp9] \n\t" 226cabdff1aSopenharmony_ci "lwc1 %[temp6], 1028(%[v0]) \n\t" 227cabdff1aSopenharmony_ci "mul.s %[temp3], %[temp10], %[temp11] \n\t" 228cabdff1aSopenharmony_ci "lwc1 %[temp7], 516(%[s0]) \n\t" 229cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" 230cabdff1aSopenharmony_ci "lwc1 %[temp8], 1032(%[v0]) \n\t" 231cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" 232cabdff1aSopenharmony_ci "lwc1 %[temp9], 520(%[s0]) \n\t" 233cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" 234cabdff1aSopenharmony_ci "lwc1 %[temp10], 1036(%[v0]) \n\t" 235cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" 236cabdff1aSopenharmony_ci "lwc1 %[temp11], 524(%[s0]) \n\t" 237cabdff1aSopenharmony_ci "lwc1 %[temp12], 1792(%[v0]) \n\t" 238cabdff1aSopenharmony_ci "lwc1 %[temp13], 768(%[s0]) \n\t" 239cabdff1aSopenharmony_ci "lwc1 %[temp14], 1796(%[v0]) \n\t" 240cabdff1aSopenharmony_ci "lwc1 %[temp15], 772(%[s0]) \n\t" 241cabdff1aSopenharmony_ci "lwc1 %[temp16], 1800(%[v0]) \n\t" 242cabdff1aSopenharmony_ci "lwc1 %[temp17], 776(%[s0]) \n\t" 243cabdff1aSopenharmony_ci "lwc1 %[temp18], 1804(%[v0]) \n\t" 244cabdff1aSopenharmony_ci "lwc1 %[temp19], 780(%[s0]) \n\t" 245cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" 246cabdff1aSopenharmony_ci "lwc1 %[temp4], 2048(%[v0]) \n\t" 247cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" 248cabdff1aSopenharmony_ci "lwc1 %[temp5], 1024(%[s0]) \n\t" 249cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" 250cabdff1aSopenharmony_ci "lwc1 %[temp6], 2052(%[v0]) \n\t" 251cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" 252cabdff1aSopenharmony_ci "lwc1 %[temp7], 1028(%[s0]) \n\t" 253cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" 254cabdff1aSopenharmony_ci "lwc1 %[temp8], 2056(%[v0]) \n\t" 255cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" 256cabdff1aSopenharmony_ci "lwc1 %[temp9], 1032(%[s0]) \n\t" 257cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" 258cabdff1aSopenharmony_ci "lwc1 %[temp10], 2060(%[v0]) \n\t" 259cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" 260cabdff1aSopenharmony_ci "lwc1 %[temp11], 1036(%[s0]) \n\t" 261cabdff1aSopenharmony_ci "lwc1 %[temp12], 2816(%[v0]) \n\t" 262cabdff1aSopenharmony_ci "lwc1 %[temp13], 1280(%[s0]) \n\t" 263cabdff1aSopenharmony_ci "lwc1 %[temp14], 2820(%[v0]) \n\t" 264cabdff1aSopenharmony_ci "lwc1 %[temp15], 1284(%[s0]) \n\t" 265cabdff1aSopenharmony_ci "lwc1 %[temp16], 2824(%[v0]) \n\t" 266cabdff1aSopenharmony_ci "lwc1 %[temp17], 1288(%[s0]) \n\t" 267cabdff1aSopenharmony_ci "lwc1 %[temp18], 2828(%[v0]) \n\t" 268cabdff1aSopenharmony_ci "lwc1 %[temp19], 1292(%[s0]) \n\t" 269cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" 270cabdff1aSopenharmony_ci "lwc1 %[temp4], 3072(%[v0]) \n\t" 271cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" 272cabdff1aSopenharmony_ci "lwc1 %[temp5], 1536(%[s0]) \n\t" 273cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" 274cabdff1aSopenharmony_ci "lwc1 %[temp6], 3076(%[v0]) \n\t" 275cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" 276cabdff1aSopenharmony_ci "lwc1 %[temp7], 1540(%[s0]) \n\t" 277cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" 278cabdff1aSopenharmony_ci "lwc1 %[temp8], 3080(%[v0]) \n\t" 279cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" 280cabdff1aSopenharmony_ci "lwc1 %[temp9], 1544(%[s0]) \n\t" 281cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" 282cabdff1aSopenharmony_ci "lwc1 %[temp10], 3084(%[v0]) \n\t" 283cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" 284cabdff1aSopenharmony_ci "lwc1 %[temp11], 1548(%[s0]) \n\t" 285cabdff1aSopenharmony_ci "lwc1 %[temp12], 3840(%[v0]) \n\t" 286cabdff1aSopenharmony_ci "lwc1 %[temp13], 1792(%[s0]) \n\t" 287cabdff1aSopenharmony_ci "lwc1 %[temp14], 3844(%[v0]) \n\t" 288cabdff1aSopenharmony_ci "lwc1 %[temp15], 1796(%[s0]) \n\t" 289cabdff1aSopenharmony_ci "lwc1 %[temp16], 3848(%[v0]) \n\t" 290cabdff1aSopenharmony_ci "lwc1 %[temp17], 1800(%[s0]) \n\t" 291cabdff1aSopenharmony_ci "lwc1 %[temp18], 3852(%[v0]) \n\t" 292cabdff1aSopenharmony_ci "lwc1 %[temp19], 1804(%[s0]) \n\t" 293cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" 294cabdff1aSopenharmony_ci "lwc1 %[temp4], 4096(%[v0]) \n\t" 295cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" 296cabdff1aSopenharmony_ci "lwc1 %[temp5], 2048(%[s0]) \n\t" 297cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" 298cabdff1aSopenharmony_ci "lwc1 %[temp6], 4100(%[v0]) \n\t" 299cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" 300cabdff1aSopenharmony_ci "lwc1 %[temp7], 2052(%[s0]) \n\t" 301cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" 302cabdff1aSopenharmony_ci "lwc1 %[temp8], 4104(%[v0]) \n\t" 303cabdff1aSopenharmony_ci PTR_ADDIU "%[dst], %[dst], 16 \n\t" 304cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" 305cabdff1aSopenharmony_ci "lwc1 %[temp9], 2056(%[s0]) \n\t" 306cabdff1aSopenharmony_ci PTR_ADDIU " %[s0], %[s0], 16 \n\t" 307cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" 308cabdff1aSopenharmony_ci "lwc1 %[temp10], 4108(%[v0]) \n\t" 309cabdff1aSopenharmony_ci PTR_ADDIU " %[v0], %[v0], 16 \n\t" 310cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" 311cabdff1aSopenharmony_ci "lwc1 %[temp11], 2044(%[s0]) \n\t" 312cabdff1aSopenharmony_ci "lwc1 %[temp12], 4848(%[v0]) \n\t" 313cabdff1aSopenharmony_ci "lwc1 %[temp13], 2288(%[s0]) \n\t" 314cabdff1aSopenharmony_ci "lwc1 %[temp14], 4852(%[v0]) \n\t" 315cabdff1aSopenharmony_ci "lwc1 %[temp15], 2292(%[s0]) \n\t" 316cabdff1aSopenharmony_ci "lwc1 %[temp16], 4856(%[v0]) \n\t" 317cabdff1aSopenharmony_ci "lwc1 %[temp17], 2296(%[s0]) \n\t" 318cabdff1aSopenharmony_ci "lwc1 %[temp18], 4860(%[v0]) \n\t" 319cabdff1aSopenharmony_ci "lwc1 %[temp19], 2300(%[s0]) \n\t" 320cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" 321cabdff1aSopenharmony_ci "lwc1 %[temp4], 0(%[v0]) \n\t" 322cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" 323cabdff1aSopenharmony_ci "lwc1 %[temp5], 0(%[s0]) \n\t" 324cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" 325cabdff1aSopenharmony_ci "lwc1 %[temp6], 4(%[v0]) \n\t" 326cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" 327cabdff1aSopenharmony_ci "lwc1 %[temp7], 4(%[s0]) \n\t" 328cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" 329cabdff1aSopenharmony_ci "lwc1 %[temp8], 8(%[v0]) \n\t" 330cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" 331cabdff1aSopenharmony_ci "lwc1 %[temp9], 8(%[s0]) \n\t" 332cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" 333cabdff1aSopenharmony_ci "lwc1 %[temp10], 12(%[v0]) \n\t" 334cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" 335cabdff1aSopenharmony_ci "lwc1 %[temp11], 12(%[s0]) \n\t" 336cabdff1aSopenharmony_ci "lwc1 %[temp12], 768(%[v0]) \n\t" 337cabdff1aSopenharmony_ci "lwc1 %[temp13], 256(%[s0]) \n\t" 338cabdff1aSopenharmony_ci "lwc1 %[temp14], 772(%[v0]) \n\t" 339cabdff1aSopenharmony_ci "lwc1 %[temp15], 260(%[s0]) \n\t" 340cabdff1aSopenharmony_ci "lwc1 %[temp16], 776(%[v0]) \n\t" 341cabdff1aSopenharmony_ci "lwc1 %[temp17], 264(%[s0]) \n\t" 342cabdff1aSopenharmony_ci "lwc1 %[temp18], 780(%[v0]) \n\t" 343cabdff1aSopenharmony_ci "lwc1 %[temp19], 268(%[s0]) \n\t" 344cabdff1aSopenharmony_ci "swc1 %[temp0], -16(%[dst]) \n\t" 345cabdff1aSopenharmony_ci "swc1 %[temp1], -12(%[dst]) \n\t" 346cabdff1aSopenharmony_ci "swc1 %[temp2], -8(%[dst]) \n\t" 347cabdff1aSopenharmony_ci "bne %[v0], %[v0_end], 1b \n\t" 348cabdff1aSopenharmony_ci " swc1 %[temp3], -4(%[dst]) \n\t" 349cabdff1aSopenharmony_ci "mul.s %[temp0], %[temp4], %[temp5] \n\t" 350cabdff1aSopenharmony_ci "lwc1 %[temp4], 1024(%[v0]) \n\t" 351cabdff1aSopenharmony_ci "mul.s %[temp1], %[temp6], %[temp7] \n\t" 352cabdff1aSopenharmony_ci "lwc1 %[temp5], 512(%[s0]) \n\t" 353cabdff1aSopenharmony_ci "mul.s %[temp2], %[temp8], %[temp9] \n\t" 354cabdff1aSopenharmony_ci "lwc1 %[temp6], 1028(%[v0]) \n\t" 355cabdff1aSopenharmony_ci "mul.s %[temp3], %[temp10], %[temp11] \n\t" 356cabdff1aSopenharmony_ci "lwc1 %[temp7], 516(%[s0]) \n\t" 357cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" 358cabdff1aSopenharmony_ci "lwc1 %[temp8], 1032(%[v0]) \n\t" 359cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" 360cabdff1aSopenharmony_ci "lwc1 %[temp9], 520(%[s0]) \n\t" 361cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" 362cabdff1aSopenharmony_ci "lwc1 %[temp10], 1036(%[v0]) \n\t" 363cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" 364cabdff1aSopenharmony_ci "lwc1 %[temp11], 524(%[s0]) \n\t" 365cabdff1aSopenharmony_ci "lwc1 %[temp12], 1792(%[v0]) \n\t" 366cabdff1aSopenharmony_ci "lwc1 %[temp13], 768(%[s0]) \n\t" 367cabdff1aSopenharmony_ci "lwc1 %[temp14], 1796(%[v0]) \n\t" 368cabdff1aSopenharmony_ci "lwc1 %[temp15], 772(%[s0]) \n\t" 369cabdff1aSopenharmony_ci "lwc1 %[temp16], 1800(%[v0]) \n\t" 370cabdff1aSopenharmony_ci "lwc1 %[temp17], 776(%[s0]) \n\t" 371cabdff1aSopenharmony_ci "lwc1 %[temp18], 1804(%[v0]) \n\t" 372cabdff1aSopenharmony_ci "lwc1 %[temp19], 780(%[s0]) \n\t" 373cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" 374cabdff1aSopenharmony_ci "lwc1 %[temp4], 2048(%[v0]) \n\t" 375cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" 376cabdff1aSopenharmony_ci "lwc1 %[temp5], 1024(%[s0]) \n\t" 377cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" 378cabdff1aSopenharmony_ci "lwc1 %[temp6], 2052(%[v0]) \n\t" 379cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" 380cabdff1aSopenharmony_ci "lwc1 %[temp7], 1028(%[s0]) \n\t" 381cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" 382cabdff1aSopenharmony_ci "lwc1 %[temp8], 2056(%[v0]) \n\t" 383cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" 384cabdff1aSopenharmony_ci "lwc1 %[temp9], 1032(%[s0]) \n\t" 385cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" 386cabdff1aSopenharmony_ci "lwc1 %[temp10], 2060(%[v0]) \n\t" 387cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" 388cabdff1aSopenharmony_ci "lwc1 %[temp11], 1036(%[s0]) \n\t" 389cabdff1aSopenharmony_ci "lwc1 %[temp12], 2816(%[v0]) \n\t" 390cabdff1aSopenharmony_ci "lwc1 %[temp13], 1280(%[s0]) \n\t" 391cabdff1aSopenharmony_ci "lwc1 %[temp14], 2820(%[v0]) \n\t" 392cabdff1aSopenharmony_ci "lwc1 %[temp15], 1284(%[s0]) \n\t" 393cabdff1aSopenharmony_ci "lwc1 %[temp16], 2824(%[v0]) \n\t" 394cabdff1aSopenharmony_ci "lwc1 %[temp17], 1288(%[s0]) \n\t" 395cabdff1aSopenharmony_ci "lwc1 %[temp18], 2828(%[v0]) \n\t" 396cabdff1aSopenharmony_ci "lwc1 %[temp19], 1292(%[s0]) \n\t" 397cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" 398cabdff1aSopenharmony_ci "lwc1 %[temp4], 3072(%[v0]) \n\t" 399cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" 400cabdff1aSopenharmony_ci "lwc1 %[temp5], 1536(%[s0]) \n\t" 401cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" 402cabdff1aSopenharmony_ci "lwc1 %[temp6], 3076(%[v0]) \n\t" 403cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" 404cabdff1aSopenharmony_ci "lwc1 %[temp7], 1540(%[s0]) \n\t" 405cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" 406cabdff1aSopenharmony_ci "lwc1 %[temp8], 3080(%[v0]) \n\t" 407cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" 408cabdff1aSopenharmony_ci "lwc1 %[temp9], 1544(%[s0]) \n\t" 409cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" 410cabdff1aSopenharmony_ci "lwc1 %[temp10], 3084(%[v0]) \n\t" 411cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" 412cabdff1aSopenharmony_ci "lwc1 %[temp11], 1548(%[s0]) \n\t" 413cabdff1aSopenharmony_ci "lwc1 %[temp12], 3840(%[v0]) \n\t" 414cabdff1aSopenharmony_ci "lwc1 %[temp13], 1792(%[s0]) \n\t" 415cabdff1aSopenharmony_ci "lwc1 %[temp14], 3844(%[v0]) \n\t" 416cabdff1aSopenharmony_ci "lwc1 %[temp15], 1796(%[s0]) \n\t" 417cabdff1aSopenharmony_ci "lwc1 %[temp16], 3848(%[v0]) \n\t" 418cabdff1aSopenharmony_ci "lwc1 %[temp17], 1800(%[s0]) \n\t" 419cabdff1aSopenharmony_ci "lwc1 %[temp18], 3852(%[v0]) \n\t" 420cabdff1aSopenharmony_ci "lwc1 %[temp19], 1804(%[s0]) \n\t" 421cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" 422cabdff1aSopenharmony_ci "lwc1 %[temp4], 4096(%[v0]) \n\t" 423cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" 424cabdff1aSopenharmony_ci "lwc1 %[temp5], 2048(%[s0]) \n\t" 425cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" 426cabdff1aSopenharmony_ci "lwc1 %[temp6], 4100(%[v0]) \n\t" 427cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" 428cabdff1aSopenharmony_ci "lwc1 %[temp7], 2052(%[s0]) \n\t" 429cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" 430cabdff1aSopenharmony_ci "lwc1 %[temp8], 4104(%[v0]) \n\t" 431cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" 432cabdff1aSopenharmony_ci "lwc1 %[temp9], 2056(%[s0]) \n\t" 433cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" 434cabdff1aSopenharmony_ci "lwc1 %[temp10], 4108(%[v0]) \n\t" 435cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" 436cabdff1aSopenharmony_ci "lwc1 %[temp11], 2060(%[s0]) \n\t" 437cabdff1aSopenharmony_ci "lwc1 %[temp12], 4864(%[v0]) \n\t" 438cabdff1aSopenharmony_ci "lwc1 %[temp13], 2304(%[s0]) \n\t" 439cabdff1aSopenharmony_ci "lwc1 %[temp14], 4868(%[v0]) \n\t" 440cabdff1aSopenharmony_ci "lwc1 %[temp15], 2308(%[s0]) \n\t" 441cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" 442cabdff1aSopenharmony_ci "lwc1 %[temp16], 4872(%[v0]) \n\t" 443cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" 444cabdff1aSopenharmony_ci "lwc1 %[temp17], 2312(%[s0]) \n\t" 445cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" 446cabdff1aSopenharmony_ci "lwc1 %[temp18], 4876(%[v0]) \n\t" 447cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" 448cabdff1aSopenharmony_ci "lwc1 %[temp19], 2316(%[s0]) \n\t" 449cabdff1aSopenharmony_ci "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" 450cabdff1aSopenharmony_ci PTR_ADDIU "%[dst], %[dst], 16 \n\t" 451cabdff1aSopenharmony_ci "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" 452cabdff1aSopenharmony_ci "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" 453cabdff1aSopenharmony_ci "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" 454cabdff1aSopenharmony_ci "swc1 %[temp0], -16(%[dst]) \n\t" 455cabdff1aSopenharmony_ci "swc1 %[temp1], -12(%[dst]) \n\t" 456cabdff1aSopenharmony_ci "swc1 %[temp2], -8(%[dst]) \n\t" 457cabdff1aSopenharmony_ci "swc1 %[temp3], -4(%[dst]) \n\t" 458cabdff1aSopenharmony_ci ".set pop \n\t" 459cabdff1aSopenharmony_ci 460cabdff1aSopenharmony_ci : [dst]"+r"(dst), [v0]"+r"(vv0), [s0]"+r"(s0), 461cabdff1aSopenharmony_ci [temp0]"=&f"(temp0), [temp1]"=&f"(temp1), [temp2]"=&f"(temp2), 462cabdff1aSopenharmony_ci [temp3]"=&f"(temp3), [temp4]"=&f"(temp4), [temp5]"=&f"(temp5), 463cabdff1aSopenharmony_ci [temp6]"=&f"(temp6), [temp7]"=&f"(temp7), [temp8]"=&f"(temp8), 464cabdff1aSopenharmony_ci [temp9]"=&f"(temp9), [temp10]"=&f"(temp10), [temp11]"=&f"(temp11), 465cabdff1aSopenharmony_ci [temp12]"=&f"(temp12), [temp13]"=&f"(temp13), [temp14]"=&f"(temp14), 466cabdff1aSopenharmony_ci [temp15]"=&f"(temp15), [temp16]"=&f"(temp16), [temp17]"=&f"(temp17), 467cabdff1aSopenharmony_ci [temp18]"=&f"(temp18), [temp19]"=&f"(temp19) 468cabdff1aSopenharmony_ci : [v0_end]"r"(v0_end) 469cabdff1aSopenharmony_ci : "memory" 470cabdff1aSopenharmony_ci ); 471cabdff1aSopenharmony_ci } 472cabdff1aSopenharmony_ci else 473cabdff1aSopenharmony_ci { 474cabdff1aSopenharmony_ci fdsp->vector_fmul (out, v , sbr_qmf_window , 64 >> div); 475cabdff1aSopenharmony_ci fdsp->vector_fmul_add(out, v + ( 192 >> div), sbr_qmf_window + ( 64 >> div), out , 64 >> div); 476cabdff1aSopenharmony_ci fdsp->vector_fmul_add(out, v + ( 256 >> div), sbr_qmf_window + (128 >> div), out , 64 >> div); 477cabdff1aSopenharmony_ci fdsp->vector_fmul_add(out, v + ( 448 >> div), sbr_qmf_window + (192 >> div), out , 64 >> div); 478cabdff1aSopenharmony_ci fdsp->vector_fmul_add(out, v + ( 512 >> div), sbr_qmf_window + (256 >> div), out , 64 >> div); 479cabdff1aSopenharmony_ci fdsp->vector_fmul_add(out, v + ( 704 >> div), sbr_qmf_window + (320 >> div), out , 64 >> div); 480cabdff1aSopenharmony_ci fdsp->vector_fmul_add(out, v + ( 768 >> div), sbr_qmf_window + (384 >> div), out , 64 >> div); 481cabdff1aSopenharmony_ci fdsp->vector_fmul_add(out, v + ( 960 >> div), sbr_qmf_window + (448 >> div), out , 64 >> div); 482cabdff1aSopenharmony_ci fdsp->vector_fmul_add(out, v + (1024 >> div), sbr_qmf_window + (512 >> div), out , 64 >> div); 483cabdff1aSopenharmony_ci fdsp->vector_fmul_add(out, v + (1216 >> div), sbr_qmf_window + (576 >> div), out , 64 >> div); 484cabdff1aSopenharmony_ci out += 64 >> div; 485cabdff1aSopenharmony_ci } 486cabdff1aSopenharmony_ci } 487cabdff1aSopenharmony_ci} 488cabdff1aSopenharmony_ci 489cabdff1aSopenharmony_ci#define sbr_qmf_analysis sbr_qmf_analysis_mips 490cabdff1aSopenharmony_ci#define sbr_qmf_synthesis sbr_qmf_synthesis_mips 491cabdff1aSopenharmony_ci 492cabdff1aSopenharmony_ci#endif /* !HAVE_MIPS32R6 && !HAVE_MIPS64R6 */ 493cabdff1aSopenharmony_ci#endif /* HAVE_MIPSFPU */ 494cabdff1aSopenharmony_ci#endif /* HAVE_INLINE_ASM */ 495cabdff1aSopenharmony_ci 496cabdff1aSopenharmony_ci#endif /* AVCODEC_MIPS_AACSBR_MIPS_H */ 497