diff options
author | Alexandra Hájková <alexandra.khirnova@gmail.com> | 2018-03-24 07:45:32 +0000 |
---|---|---|
committer | Alexandra Hájková <alexandra.khirnova@gmail.com> | 2018-05-31 04:57:06 +0000 |
commit | a6a57507fb3dc1f12e5a7b5a500bc65544b38157 (patch) | |
tree | 26adc258745ae6abe1d5723358c4cdd8cb525e4c /vp9/common/ppc | |
parent | 2b08f89076d1e93339fbbcc10e3298a0eec66bd6 (diff) | |
download | libvpx-a6a57507fb3dc1f12e5a7b5a500bc65544b38157.tar libvpx-a6a57507fb3dc1f12e5a7b5a500bc65544b38157.tar.gz libvpx-a6a57507fb3dc1f12e5a7b5a500bc65544b38157.tar.bz2 libvpx-a6a57507fb3dc1f12e5a7b5a500bc65544b38157.zip |
ppc: add vp9_iht4x4_16_add_vsx
Change-Id: Id584d8f65fdda51b8680f41424074b4b0c979622
Diffstat (limited to 'vp9/common/ppc')
-rw-r--r-- | vp9/common/ppc/vp9_idct_vsx.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/vp9/common/ppc/vp9_idct_vsx.c b/vp9/common/ppc/vp9_idct_vsx.c new file mode 100644 index 000000000..a7b66e7fd --- /dev/null +++ b/vp9/common/ppc/vp9_idct_vsx.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2018 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 <assert.h> + +#include "vpx_dsp/vpx_dsp_common.h" +#include "vpx_dsp/ppc/inv_txfm_vsx.h" +#include "vpx_dsp/ppc/bitdepth_conversion_vsx.h" + +#include "vp9/common/vp9_enums.h" + +void vp9_iht4x4_16_add_vsx(const tran_low_t *input, uint8_t *dest, int stride, + int tx_type) { + int16x8_t in[2], out[2]; + + in[0] = load_tran_low(0, input); + in[1] = load_tran_low(8 * sizeof(*input), input); + + switch (tx_type) { + case DCT_DCT: + vpx_idct4_vsx(in, out); + vpx_idct4_vsx(out, in); + break; + case ADST_DCT: + vpx_idct4_vsx(in, out); + vp9_iadst4_vsx(out, in); + break; + case DCT_ADST: + vp9_iadst4_vsx(in, out); + vpx_idct4_vsx(out, in); + break; + default: + assert(tx_type == ADST_ADST); + vp9_iadst4_vsx(in, out); + vp9_iadst4_vsx(out, in); + break; + } + + vpx_round_store4x4_vsx(in, out, dest, stride); +} |