123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805 |
- /*
- * Copyright (c) 2017 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
- #include "./vpx_dsp_rtcd.h"
- #include "vpx_ports/asmdefs_mmi.h"
- #include "vpx/vpx_integer.h"
- #include "vpx_ports/mem.h"
- #define SAD_SRC_REF_ABS_SUB_64 \
- "gsldlc1 %[ftmp1], 0x07(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x0f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x08(%[src]) \n\t" \
- "gsldlc1 %[ftmp3], 0x07(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x00(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x0f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x08(%[ref]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t" \
- "gsldlc1 %[ftmp1], 0x17(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x10(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x1f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x18(%[src]) \n\t" \
- "gsldlc1 %[ftmp3], 0x17(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x10(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x1f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x18(%[ref]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t" \
- "gsldlc1 %[ftmp1], 0x27(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x20(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x2f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x28(%[src]) \n\t" \
- "gsldlc1 %[ftmp3], 0x27(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x20(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x2f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x28(%[ref]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t" \
- "gsldlc1 %[ftmp1], 0x37(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x30(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x3f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x38(%[src]) \n\t" \
- "gsldlc1 %[ftmp3], 0x37(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x30(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x3f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x38(%[ref]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t"
- #define SAD_SRC_REF_ABS_SUB_32 \
- "gsldlc1 %[ftmp1], 0x07(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x0f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x08(%[src]) \n\t" \
- "gsldlc1 %[ftmp3], 0x07(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x00(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x0f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x08(%[ref]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t" \
- "gsldlc1 %[ftmp1], 0x17(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x10(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x1f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x18(%[src]) \n\t" \
- "gsldlc1 %[ftmp3], 0x17(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x10(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x1f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x18(%[ref]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t"
- #define SAD_SRC_REF_ABS_SUB_16 \
- "gsldlc1 %[ftmp1], 0x07(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x0f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x08(%[src]) \n\t" \
- "gsldlc1 %[ftmp3], 0x07(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x00(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x0f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x08(%[ref]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t"
- #define SAD_SRC_REF_ABS_SUB_8 \
- "gsldlc1 %[ftmp1], 0x07(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x07(%[ref]) \n\t" \
- "gsldrc1 %[ftmp2], 0x00(%[ref]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp2] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "paddw %[ftmp3], %[ftmp3], %[ftmp1] \n\t"
- #if _MIPS_SIM == _ABIO32
- #define SAD_SRC_REF_ABS_SUB_4 \
- "ulw %[tmp0], 0x00(%[src]) \n\t" \
- "mtc1 %[tmp0], %[ftmp1] \n\t" \
- "ulw %[tmp0], 0x00(%[ref]) \n\t" \
- "mtc1 %[tmp0], %[ftmp2] \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp2] \n\t" \
- "mthc1 $0, %[ftmp1] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "paddw %[ftmp3], %[ftmp3], %[ftmp1] \n\t"
- #else /* _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 */
- #define SAD_SRC_REF_ABS_SUB_4 \
- "gslwlc1 %[ftmp1], 0x03(%[src]) \n\t" \
- "gslwrc1 %[ftmp1], 0x00(%[src]) \n\t" \
- "gslwlc1 %[ftmp2], 0x03(%[ref]) \n\t" \
- "gslwrc1 %[ftmp2], 0x00(%[ref]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp2] \n\t" \
- "mthc1 $0, %[ftmp1] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "paddw %[ftmp3], %[ftmp3], %[ftmp1] \n\t"
- #endif /* _MIPS_SIM == _ABIO32 */
- #define SAD_SRC_AVGREF_ABS_SUB_64 \
- "gsldlc1 %[ftmp1], 0x07(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp2], 0x0f(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp2], 0x08(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp3], 0x07(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x00(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x0f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x08(%[ref]) \n\t" \
- "pavgb %[ftmp3], %[ftmp1], %[ftmp3] \n\t" \
- "pavgb %[ftmp4], %[ftmp2], %[ftmp4] \n\t" \
- "gsldlc1 %[ftmp1], 0x07(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x0f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x08(%[src]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t" \
- "gsldlc1 %[ftmp1], 0x17(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp1], 0x10(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp2], 0x1f(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp2], 0x18(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp3], 0x17(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x10(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x1f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x18(%[ref]) \n\t" \
- "pavgb %[ftmp3], %[ftmp1], %[ftmp3] \n\t" \
- "pavgb %[ftmp4], %[ftmp2], %[ftmp4] \n\t" \
- "gsldlc1 %[ftmp1], 0x17(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x10(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x1f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x18(%[src]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t" \
- "gsldlc1 %[ftmp1], 0x27(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp1], 0x20(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp2], 0x2f(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp2], 0x28(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp3], 0x27(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x20(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x2f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x28(%[ref]) \n\t" \
- "pavgb %[ftmp3], %[ftmp1], %[ftmp3] \n\t" \
- "pavgb %[ftmp4], %[ftmp2], %[ftmp4] \n\t" \
- "gsldlc1 %[ftmp1], 0x27(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x20(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x2f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x28(%[src]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t" \
- "gsldlc1 %[ftmp1], 0x37(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp1], 0x30(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp2], 0x3f(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp2], 0x38(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp3], 0x37(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x30(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x3f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x38(%[ref]) \n\t" \
- "pavgb %[ftmp3], %[ftmp1], %[ftmp3] \n\t" \
- "pavgb %[ftmp4], %[ftmp2], %[ftmp4] \n\t" \
- "gsldlc1 %[ftmp1], 0x37(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x30(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x3f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x38(%[src]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t"
- #define SAD_SRC_AVGREF_ABS_SUB_32 \
- "gsldlc1 %[ftmp1], 0x07(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp2], 0x0f(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp2], 0x08(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp3], 0x07(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x00(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x0f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x08(%[ref]) \n\t" \
- "pavgb %[ftmp3], %[ftmp1], %[ftmp3] \n\t" \
- "pavgb %[ftmp4], %[ftmp2], %[ftmp4] \n\t" \
- "gsldlc1 %[ftmp1], 0x07(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x0f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x08(%[src]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t" \
- "gsldlc1 %[ftmp1], 0x17(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp1], 0x10(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp2], 0x1f(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp2], 0x18(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp3], 0x17(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x10(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x1f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x18(%[ref]) \n\t" \
- "pavgb %[ftmp3], %[ftmp1], %[ftmp3] \n\t" \
- "pavgb %[ftmp4], %[ftmp2], %[ftmp4] \n\t" \
- "gsldlc1 %[ftmp1], 0x17(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x10(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x1f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x18(%[src]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t"
- #define SAD_SRC_AVGREF_ABS_SUB_16 \
- "gsldlc1 %[ftmp1], 0x07(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp2], 0x0f(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp2], 0x08(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp3], 0x07(%[ref]) \n\t" \
- "gsldrc1 %[ftmp3], 0x00(%[ref]) \n\t" \
- "gsldlc1 %[ftmp4], 0x0f(%[ref]) \n\t" \
- "gsldrc1 %[ftmp4], 0x08(%[ref]) \n\t" \
- "pavgb %[ftmp3], %[ftmp1], %[ftmp3] \n\t" \
- "pavgb %[ftmp4], %[ftmp2], %[ftmp4] \n\t" \
- "gsldlc1 %[ftmp1], 0x07(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[src]) \n\t" \
- "gsldlc1 %[ftmp2], 0x0f(%[src]) \n\t" \
- "gsldrc1 %[ftmp2], 0x08(%[src]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp3] \n\t" \
- "pasubub %[ftmp2], %[ftmp2], %[ftmp4] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "biadd %[ftmp2], %[ftmp2] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp1] \n\t" \
- "paddw %[ftmp5], %[ftmp5], %[ftmp2] \n\t"
- #define SAD_SRC_AVGREF_ABS_SUB_8 \
- "gsldlc1 %[ftmp1], 0x07(%[second_pred]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[second_pred]) \n\t" \
- "gsldlc1 %[ftmp2], 0x07(%[ref]) \n\t" \
- "gsldrc1 %[ftmp2], 0x00(%[ref]) \n\t" \
- "pavgb %[ftmp2], %[ftmp1], %[ftmp2] \n\t" \
- "gsldlc1 %[ftmp1], 0x07(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[src]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp2] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "paddw %[ftmp3], %[ftmp3], %[ftmp1] \n\t"
- #if _MIPS_SIM == _ABIO32
- #define SAD_SRC_AVGREF_ABS_SUB_4 \
- "ulw %[tmp0], 0x00(%[second_pred]) \n\t" \
- "mtc1 %[tmp0], %[ftmp1] \n\t" \
- "ulw %[tmp0], 0x00(%[ref]) \n\t" \
- "mtc1 %[tmp0], %[ftmp2] \n\t" \
- "pavgb %[ftmp2], %[ftmp1], %[ftmp2] \n\t" \
- "gsldlc1 %[ftmp1], 0x07(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[src]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp2] \n\t" \
- "mthc1 $0, %[ftmp1] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "paddw %[ftmp3], %[ftmp3], %[ftmp1] \n\t"
- #else /* _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 */
- #define SAD_SRC_AVGREF_ABS_SUB_4 \
- "gslwlc1 %[ftmp1], 0x03(%[second_pred]) \n\t" \
- "gslwrc1 %[ftmp1], 0x00(%[second_pred]) \n\t" \
- "gslwlc1 %[ftmp2], 0x03(%[ref]) \n\t" \
- "gslwrc1 %[ftmp2], 0x00(%[ref]) \n\t" \
- "pavgb %[ftmp2], %[ftmp1], %[ftmp2] \n\t" \
- "gsldlc1 %[ftmp1], 0x07(%[src]) \n\t" \
- "gsldrc1 %[ftmp1], 0x00(%[src]) \n\t" \
- "pasubub %[ftmp1], %[ftmp1], %[ftmp2] \n\t" \
- "mthc1 $0, %[ftmp1] \n\t" \
- "biadd %[ftmp1], %[ftmp1] \n\t" \
- "paddw %[ftmp3], %[ftmp3], %[ftmp1] \n\t"
- #endif /* _MIPS_SIM == _ABIO32 */
- // depending on call sites, pass **ref_array to avoid & in subsequent call and
- // de-dup with 4D below.
- #define sadMxNxK_mmi(m, n, k) \
- void vpx_sad##m##x##n##x##k##_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *ref_array, int ref_stride, \
- uint32_t *sad_array) { \
- int i; \
- for (i = 0; i < (k); ++i) \
- sad_array[i] = \
- vpx_sad##m##x##n##_mmi(src, src_stride, &ref_array[i], ref_stride); \
- }
- // This appears to be equivalent to the above when k == 4 and refs is const
- #define sadMxNx4D_mmi(m, n) \
- void vpx_sad##m##x##n##x4d_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *const ref_array[], \
- int ref_stride, uint32_t *sad_array) { \
- int i; \
- for (i = 0; i < 4; ++i) \
- sad_array[i] = \
- vpx_sad##m##x##n##_mmi(src, src_stride, ref_array[i], ref_stride); \
- }
- static inline unsigned int vpx_sad64x(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride,
- int counter) {
- unsigned int sad;
- double ftmp1, ftmp2, ftmp3, ftmp4, ftmp5;
- mips_reg l_counter = counter;
- __asm__ volatile (
- "xor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
- "1: \n\t"
- // Include two loop body, to reduce loop time.
- SAD_SRC_REF_ABS_SUB_64
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- SAD_SRC_REF_ABS_SUB_64
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- MMI_ADDIU(%[counter], %[counter], -0x02)
- "bnez %[counter], 1b \n\t"
- "mfc1 %[sad], %[ftmp5] \n\t"
- : [ftmp1]"=&f"(ftmp1), [ftmp2]"=&f"(ftmp2), [ftmp3]"=&f"(ftmp3),
- [ftmp4]"=&f"(ftmp4), [ftmp5]"=&f"(ftmp5), [counter]"+&r"(l_counter),
- [src]"+&r"(src), [ref]"+&r"(ref), [sad]"=&r"(sad)
- : [src_stride]"r"((mips_reg)src_stride),
- [ref_stride]"r"((mips_reg)ref_stride)
- );
- return sad;
- }
- #define vpx_sad64xN(H) \
- unsigned int vpx_sad64x##H##_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *ref, int ref_stride) { \
- return vpx_sad64x(src, src_stride, ref, ref_stride, H); \
- }
- vpx_sad64xN(64);
- vpx_sad64xN(32);
- sadMxNx4D_mmi(64, 64);
- sadMxNx4D_mmi(64, 32);
- static inline unsigned int vpx_sad_avg64x(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride,
- const uint8_t *second_pred,
- int counter) {
- unsigned int sad;
- double ftmp1, ftmp2, ftmp3, ftmp4, ftmp5;
- mips_reg l_counter = counter;
- __asm__ volatile (
- "xor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
- "1: \n\t"
- // Include two loop body, to reduce loop time.
- SAD_SRC_AVGREF_ABS_SUB_64
- MMI_ADDIU(%[second_pred], %[second_pred], 0x40)
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- SAD_SRC_AVGREF_ABS_SUB_64
- MMI_ADDIU(%[second_pred], %[second_pred], 0x40)
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- MMI_ADDIU(%[counter], %[counter], -0x02)
- "bnez %[counter], 1b \n\t"
- "mfc1 %[sad], %[ftmp5] \n\t"
- : [ftmp1]"=&f"(ftmp1), [ftmp2]"=&f"(ftmp2), [ftmp3]"=&f"(ftmp3),
- [ftmp4]"=&f"(ftmp4), [ftmp5]"=&f"(ftmp5), [counter]"+&r"(l_counter),
- [src]"+&r"(src), [ref]"+&r"(ref),
- [second_pred]"+&r"((mips_reg)second_pred),
- [sad]"=&r"(sad)
- : [src_stride]"r"((mips_reg)src_stride),
- [ref_stride]"r"((mips_reg)ref_stride)
- );
- return sad;
- }
- #define vpx_sad_avg64xN(H) \
- unsigned int vpx_sad64x##H##_avg_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *ref, int ref_stride, \
- const uint8_t *second_pred) { \
- return vpx_sad_avg64x(src, src_stride, ref, ref_stride, second_pred, H); \
- }
- vpx_sad_avg64xN(64);
- vpx_sad_avg64xN(32);
- static inline unsigned int vpx_sad32x(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride,
- int counter) {
- unsigned int sad;
- double ftmp1, ftmp2, ftmp3, ftmp4, ftmp5;
- mips_reg l_counter = counter;
- __asm__ volatile (
- "xor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
- "1: \n\t"
- // Include two loop body, to reduce loop time.
- SAD_SRC_REF_ABS_SUB_32
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- SAD_SRC_REF_ABS_SUB_32
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- MMI_ADDIU(%[counter], %[counter], -0x02)
- "bnez %[counter], 1b \n\t"
- "mfc1 %[sad], %[ftmp5] \n\t"
- : [ftmp1]"=&f"(ftmp1), [ftmp2]"=&f"(ftmp2), [ftmp3]"=&f"(ftmp3),
- [ftmp4]"=&f"(ftmp4), [ftmp5]"=&f"(ftmp5), [counter]"+&r"(l_counter),
- [src]"+&r"(src), [ref]"+&r"(ref), [sad]"=&r"(sad)
- : [src_stride]"r"((mips_reg)src_stride),
- [ref_stride]"r"((mips_reg)ref_stride)
- );
- return sad;
- }
- #define vpx_sad32xN(H) \
- unsigned int vpx_sad32x##H##_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *ref, int ref_stride) { \
- return vpx_sad32x(src, src_stride, ref, ref_stride, H); \
- }
- vpx_sad32xN(64);
- vpx_sad32xN(32);
- vpx_sad32xN(16);
- sadMxNx4D_mmi(32, 64);
- sadMxNx4D_mmi(32, 32);
- sadMxNx4D_mmi(32, 16);
- static inline unsigned int vpx_sad_avg32x(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride,
- const uint8_t *second_pred,
- int counter) {
- unsigned int sad;
- double ftmp1, ftmp2, ftmp3, ftmp4, ftmp5;
- mips_reg l_counter = counter;
- __asm__ volatile (
- "xor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
- "1: \n\t"
- // Include two loop body, to reduce loop time.
- SAD_SRC_AVGREF_ABS_SUB_32
- MMI_ADDIU(%[second_pred], %[second_pred], 0x20)
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- SAD_SRC_AVGREF_ABS_SUB_32
- MMI_ADDIU(%[second_pred], %[second_pred], 0x20)
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- MMI_ADDIU(%[counter], %[counter], -0x02)
- "bnez %[counter], 1b \n\t"
- "mfc1 %[sad], %[ftmp5] \n\t"
- : [ftmp1]"=&f"(ftmp1), [ftmp2]"=&f"(ftmp2), [ftmp3]"=&f"(ftmp3),
- [ftmp4]"=&f"(ftmp4), [ftmp5]"=&f"(ftmp5), [counter]"+&r"(l_counter),
- [src]"+&r"(src), [ref]"+&r"(ref),
- [second_pred]"+&r"((mips_reg)second_pred),
- [sad]"=&r"(sad)
- : [src_stride]"r"((mips_reg)src_stride),
- [ref_stride]"r"((mips_reg)ref_stride)
- );
- return sad;
- }
- #define vpx_sad_avg32xN(H) \
- unsigned int vpx_sad32x##H##_avg_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *ref, int ref_stride, \
- const uint8_t *second_pred) { \
- return vpx_sad_avg32x(src, src_stride, ref, ref_stride, second_pred, H); \
- }
- vpx_sad_avg32xN(64);
- vpx_sad_avg32xN(32);
- vpx_sad_avg32xN(16);
- static inline unsigned int vpx_sad16x(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride,
- int counter) {
- unsigned int sad;
- double ftmp1, ftmp2, ftmp3, ftmp4, ftmp5;
- mips_reg l_counter = counter;
- __asm__ volatile (
- "xor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
- "1: \n\t"
- // Include two loop body, to reduce loop time.
- SAD_SRC_REF_ABS_SUB_16
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- SAD_SRC_REF_ABS_SUB_16
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- MMI_ADDIU(%[counter], %[counter], -0x02)
- "bnez %[counter], 1b \n\t"
- "mfc1 %[sad], %[ftmp5] \n\t"
- : [ftmp1]"=&f"(ftmp1), [ftmp2]"=&f"(ftmp2), [ftmp3]"=&f"(ftmp3),
- [ftmp4]"=&f"(ftmp4), [ftmp5]"=&f"(ftmp5), [counter]"+&r"(l_counter),
- [src]"+&r"(src), [ref]"+&r"(ref), [sad]"=&r"(sad)
- : [src_stride]"r"((mips_reg)src_stride),
- [ref_stride]"r"((mips_reg)ref_stride)
- );
- return sad;
- }
- #define vpx_sad16xN(H) \
- unsigned int vpx_sad16x##H##_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *ref, int ref_stride) { \
- return vpx_sad16x(src, src_stride, ref, ref_stride, H); \
- }
- vpx_sad16xN(32);
- vpx_sad16xN(16);
- vpx_sad16xN(8);
- sadMxNxK_mmi(16, 16, 3);
- sadMxNxK_mmi(16, 16, 8);
- sadMxNxK_mmi(16, 8, 3);
- sadMxNxK_mmi(16, 8, 8);
- sadMxNx4D_mmi(16, 32);
- sadMxNx4D_mmi(16, 16);
- sadMxNx4D_mmi(16, 8);
- static inline unsigned int vpx_sad_avg16x(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride,
- const uint8_t *second_pred,
- int counter) {
- unsigned int sad;
- double ftmp1, ftmp2, ftmp3, ftmp4, ftmp5;
- mips_reg l_counter = counter;
- __asm__ volatile (
- "xor %[ftmp5], %[ftmp5], %[ftmp5] \n\t"
- "1: \n\t"
- // Include two loop body, to reduce loop time.
- SAD_SRC_AVGREF_ABS_SUB_16
- MMI_ADDIU(%[second_pred], %[second_pred], 0x10)
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- SAD_SRC_AVGREF_ABS_SUB_16
- MMI_ADDIU(%[second_pred], %[second_pred], 0x10)
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- MMI_ADDIU(%[counter], %[counter], -0x02)
- "bnez %[counter], 1b \n\t"
- "mfc1 %[sad], %[ftmp5] \n\t"
- : [ftmp1]"=&f"(ftmp1), [ftmp2]"=&f"(ftmp2), [ftmp3]"=&f"(ftmp3),
- [ftmp4]"=&f"(ftmp4), [ftmp5]"=&f"(ftmp5), [counter]"+&r"(l_counter),
- [src]"+&r"(src), [ref]"+&r"(ref),
- [second_pred]"+&r"((mips_reg)second_pred),
- [sad]"=&r"(sad)
- : [src_stride]"r"((mips_reg)src_stride),
- [ref_stride]"r"((mips_reg)ref_stride)
- );
- return sad;
- }
- #define vpx_sad_avg16xN(H) \
- unsigned int vpx_sad16x##H##_avg_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *ref, int ref_stride, \
- const uint8_t *second_pred) { \
- return vpx_sad_avg16x(src, src_stride, ref, ref_stride, second_pred, H); \
- }
- vpx_sad_avg16xN(32);
- vpx_sad_avg16xN(16);
- vpx_sad_avg16xN(8);
- static inline unsigned int vpx_sad8x(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride,
- int counter) {
- unsigned int sad;
- double ftmp1, ftmp2, ftmp3;
- mips_reg l_counter = counter;
- __asm__ volatile (
- "xor %[ftmp3], %[ftmp3], %[ftmp3] \n\t"
- "1: \n\t"
- // Include two loop body, to reduce loop time.
- SAD_SRC_REF_ABS_SUB_8
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- SAD_SRC_REF_ABS_SUB_8
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- MMI_ADDIU(%[counter], %[counter], -0x02)
- "bnez %[counter], 1b \n\t"
- "mfc1 %[sad], %[ftmp3] \n\t"
- : [ftmp1]"=&f"(ftmp1), [ftmp2]"=&f"(ftmp2), [ftmp3]"=&f"(ftmp3),
- [counter]"+&r"(l_counter), [src]"+&r"(src), [ref]"+&r"(ref),
- [sad]"=&r"(sad)
- : [src_stride]"r"((mips_reg)src_stride),
- [ref_stride]"r"((mips_reg)ref_stride)
- );
- return sad;
- }
- #define vpx_sad8xN(H) \
- unsigned int vpx_sad8x##H##_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *ref, int ref_stride) { \
- return vpx_sad8x(src, src_stride, ref, ref_stride, H); \
- }
- vpx_sad8xN(16);
- vpx_sad8xN(8);
- vpx_sad8xN(4);
- sadMxNxK_mmi(8, 16, 3);
- sadMxNxK_mmi(8, 16, 8);
- sadMxNxK_mmi(8, 8, 3);
- sadMxNxK_mmi(8, 8, 8);
- sadMxNx4D_mmi(8, 16);
- sadMxNx4D_mmi(8, 8);
- sadMxNx4D_mmi(8, 4);
- static inline unsigned int vpx_sad_avg8x(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride,
- const uint8_t *second_pred,
- int counter) {
- unsigned int sad;
- double ftmp1, ftmp2, ftmp3;
- mips_reg l_counter = counter;
- __asm__ volatile (
- "xor %[ftmp3], %[ftmp3], %[ftmp3] \n\t"
- "1: \n\t"
- // Include two loop body, to reduce loop time.
- SAD_SRC_AVGREF_ABS_SUB_8
- MMI_ADDIU(%[second_pred], %[second_pred], 0x08)
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- SAD_SRC_AVGREF_ABS_SUB_8
- MMI_ADDIU(%[second_pred], %[second_pred], 0x08)
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- MMI_ADDIU(%[counter], %[counter], -0x02)
- "bnez %[counter], 1b \n\t"
- "mfc1 %[sad], %[ftmp3] \n\t"
- : [ftmp1]"=&f"(ftmp1), [ftmp2]"=&f"(ftmp2), [ftmp3]"=&f"(ftmp3),
- [counter]"+&r"(l_counter), [src]"+&r"(src), [ref]"+&r"(ref),
- [second_pred]"+&r"((mips_reg)second_pred),
- [sad]"=&r"(sad)
- : [src_stride]"r"((mips_reg)src_stride),
- [ref_stride]"r"((mips_reg)ref_stride)
- );
- return sad;
- }
- #define vpx_sad_avg8xN(H) \
- unsigned int vpx_sad8x##H##_avg_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *ref, int ref_stride, \
- const uint8_t *second_pred) { \
- return vpx_sad_avg8x(src, src_stride, ref, ref_stride, second_pred, H); \
- }
- vpx_sad_avg8xN(16);
- vpx_sad_avg8xN(8);
- vpx_sad_avg8xN(4);
- static inline unsigned int vpx_sad4x(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride,
- int counter) {
- unsigned int sad;
- double ftmp1, ftmp2, ftmp3;
- mips_reg l_counter = counter;
- __asm__ volatile (
- "xor %[ftmp3], %[ftmp3], %[ftmp3] \n\t"
- "1: \n\t"
- // Include two loop body, to reduce loop time.
- SAD_SRC_REF_ABS_SUB_4
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- SAD_SRC_REF_ABS_SUB_4
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- MMI_ADDIU(%[counter], %[counter], -0x02)
- "bnez %[counter], 1b \n\t"
- "mfc1 %[sad], %[ftmp3] \n\t"
- : [ftmp1]"=&f"(ftmp1), [ftmp2]"=&f"(ftmp2), [ftmp3]"=&f"(ftmp3),
- [counter]"+&r"(l_counter), [src]"+&r"(src), [ref]"+&r"(ref),
- [sad]"=&r"(sad)
- : [src_stride]"r"((mips_reg)src_stride),
- [ref_stride]"r"((mips_reg)ref_stride)
- );
- return sad;
- }
- #define vpx_sad4xN(H) \
- unsigned int vpx_sad4x##H##_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *ref, int ref_stride) { \
- return vpx_sad4x(src, src_stride, ref, ref_stride, H); \
- }
- vpx_sad4xN(8);
- vpx_sad4xN(4);
- sadMxNxK_mmi(4, 4, 3);
- sadMxNxK_mmi(4, 4, 8);
- sadMxNx4D_mmi(4, 8);
- sadMxNx4D_mmi(4, 4);
- static inline unsigned int vpx_sad_avg4x(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride,
- const uint8_t *second_pred,
- int counter) {
- unsigned int sad;
- double ftmp1, ftmp2, ftmp3;
- mips_reg l_counter = counter;
- __asm__ volatile (
- "xor %[ftmp3], %[ftmp3], %[ftmp3] \n\t"
- "1: \n\t"
- // Include two loop body, to reduce loop time.
- SAD_SRC_AVGREF_ABS_SUB_4
- MMI_ADDIU(%[second_pred], %[second_pred], 0x04)
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- SAD_SRC_AVGREF_ABS_SUB_4
- MMI_ADDIU(%[second_pred], %[second_pred], 0x04)
- MMI_ADDU(%[src], %[src], %[src_stride])
- MMI_ADDU(%[ref], %[ref], %[ref_stride])
- MMI_ADDIU(%[counter], %[counter], -0x02)
- "bnez %[counter], 1b \n\t"
- "mfc1 %[sad], %[ftmp3] \n\t"
- : [ftmp1]"=&f"(ftmp1), [ftmp2]"=&f"(ftmp2), [ftmp3]"=&f"(ftmp3),
- [counter]"+&r"(l_counter), [src]"+&r"(src), [ref]"+&r"(ref),
- [second_pred]"+&r"((mips_reg)second_pred),
- [sad]"=&r"(sad)
- : [src_stride]"r"((mips_reg)src_stride),
- [ref_stride]"r"((mips_reg)ref_stride)
- );
- return sad;
- }
- #define vpx_sad_avg4xN(H) \
- unsigned int vpx_sad4x##H##_avg_mmi(const uint8_t *src, int src_stride, \
- const uint8_t *ref, int ref_stride, \
- const uint8_t *second_pred) { \
- return vpx_sad_avg4x(src, src_stride, ref, ref_stride, second_pred, H); \
- }
- vpx_sad_avg4xN(8);
- vpx_sad_avg4xN(4);
|