Commit dec16372 authored by Shivraj Patil's avatar Shivraj Patil Committed by Ronald S. Bultje

avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP8 functions

Signed-off-by: 's avatarShivraj Patil <shivraj.patil@imgtec.com>
parent 63c442e3
......@@ -21,6 +21,7 @@ MIPSFPU-OBJS-$(CONFIG_AAC_ENCODER) += mips/iirfilter_mips.o
OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_init_mips.o \
mips/hevcpred_init_mips.o
OBJS-$(CONFIG_VP9_DECODER) += mips/vp9dsp_init_mips.o
OBJS-$(CONFIG_VP8_DECODER) += mips/vp8dsp_init_mips.o
OBJS-$(CONFIG_H264DSP) += mips/h264dsp_init_mips.o
OBJS-$(CONFIG_H264QPEL) += mips/h264qpel_init_mips.o
OBJS-$(CONFIG_H264CHROMA) += mips/h264chroma_init_mips.o
......@@ -47,6 +48,9 @@ MSA-OBJS-$(CONFIG_VP9_DECODER) += mips/vp9_mc_msa.o \
mips/vp9_lpf_msa.o \
mips/vp9_idct_msa.o \
mips/vp9_intra_msa.o
MSA-OBJS-$(CONFIG_VP8_DECODER) += mips/vp8_mc_msa.o \
mips/vp8_idct_msa.o \
mips/vp8_lpf_msa.o
MSA-OBJS-$(CONFIG_H264DSP) += mips/h264dsp_msa.o \
mips/h264idct_msa.o
MSA-OBJS-$(CONFIG_H264QPEL) += mips/h264qpel_msa.o
......
/*
* Copyright (c) 2015 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com)
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include "libavcodec/vp8dsp.h"
#include "libavutil/mips/generic_macros_msa.h"
#include "vp8dsp_mips.h"
static const int cospi8sqrt2minus1 = 20091;
static const int sinpi8sqrt2 = 35468;
#define VP8_IDCT_1D_W(in0, in1, in2, in3, out0, out1, out2, out3) \
{ \
v4i32 a1_m, b1_m, c1_m, d1_m; \
v4i32 c_tmp1_m, c_tmp2_m, d_tmp1_m, d_tmp2_m; \
v4i32 const_cospi8sqrt2minus1_m, sinpi8_sqrt2_m; \
\
const_cospi8sqrt2minus1_m = __msa_fill_w(cospi8sqrt2minus1); \
sinpi8_sqrt2_m = __msa_fill_w(sinpi8sqrt2); \
a1_m = in0 + in2; \
b1_m = in0 - in2; \
c_tmp1_m = ((in1) * sinpi8_sqrt2_m) >> 16; \
c_tmp2_m = in3 + (((in3) * const_cospi8sqrt2minus1_m) >> 16); \
c1_m = c_tmp1_m - c_tmp2_m; \
d_tmp1_m = (in1) + (((in1) * const_cospi8sqrt2minus1_m) >> 16); \
d_tmp2_m = ((in3) * sinpi8_sqrt2_m) >> 16; \
d1_m = d_tmp1_m + d_tmp2_m; \
BUTTERFLY_4(a1_m, b1_m, c1_m, d1_m, out0, out1, out2, out3); \
}
void ff_vp8_idct_add_msa(uint8_t *dst, int16_t input[16], ptrdiff_t stride)
{
v8i16 input0, input1;
v4i32 in0, in1, in2, in3, hz0, hz1, hz2, hz3, vt0, vt1, vt2, vt3;
v4i32 res0, res1, res2, res3;
v16i8 zero = { 0 };
v16i8 pred0, pred1, pred2, pred3, dest0, dest1;
v16i8 mask = { 0, 4, 8, 12, 16, 20, 24, 28, 0, 0, 0, 0, 0, 0, 0, 0 };
/* load short vector elements of 4x4 block */
LD_SH2(input, 8, input0, input1);
UNPCK_SH_SW(input0, in0, in1);
UNPCK_SH_SW(input1, in2, in3);
VP8_IDCT_1D_W(in0, in1, in2, in3, hz0, hz1, hz2, hz3);
/* transpose the block */
TRANSPOSE4x4_SW_SW(hz0, hz1, hz2, hz3, hz0, hz1, hz2, hz3);
VP8_IDCT_1D_W(hz0, hz1, hz2, hz3, vt0, vt1, vt2, vt3);
SRARI_W4_SW(vt0, vt1, vt2, vt3, 3);
/* transpose the block */
TRANSPOSE4x4_SW_SW(vt0, vt1, vt2, vt3, vt0, vt1, vt2, vt3);
LD_SB4(dst, stride, pred0, pred1, pred2, pred3);
ILVR_B4_SW(zero, pred0, zero, pred1, zero, pred2, zero, pred3,
res0, res1, res2, res3);
ILVR_H4_SW(zero, res0, zero, res1, zero, res2, zero, res3,
res0, res1, res2, res3);
ADD4(res0, vt0, res1, vt1, res2, vt2, res3, vt3, res0, res1, res2, res3);
res0 = CLIP_SW_0_255(res0);
res1 = CLIP_SW_0_255(res1);
res2 = CLIP_SW_0_255(res2);
res3 = CLIP_SW_0_255(res3);
VSHF_B2_SB(res0, res1, res2, res3, mask, mask, dest0, dest1);
ST4x4_UB(dest0, dest1, 0, 1, 0, 1, dst, stride);
memset(input, 0, 4 * 4 * sizeof(*input));
}
void ff_vp8_idct_dc_add_msa(uint8_t *dst, int16_t in_dc[16], ptrdiff_t stride)
{
v8i16 vec;
v8i16 res0, res1, res2, res3;
v16i8 zero = { 0 };
v16i8 pred0, pred1, pred2, pred3, dest0, dest1;
v16i8 mask = { 0, 2, 4, 6, 16, 18, 20, 22, 0, 0, 0, 0, 0, 0, 0, 0 };
vec = __msa_fill_h(in_dc[0]);
vec = __msa_srari_h(vec, 3);
LD_SB4(dst, stride, pred0, pred1, pred2, pred3);
ILVR_B4_SH(zero, pred0, zero, pred1, zero, pred2, zero, pred3,
res0, res1, res2, res3);
ADD4(res0, vec, res1, vec, res2, vec, res3, vec, res0, res1, res2, res3);
CLIP_SH4_0_255(res0, res1, res2, res3);
VSHF_B2_SB(res0, res1, res2, res3, mask, mask, dest0, dest1);
ST4x4_UB(dest0, dest1, 0, 1, 0, 1, dst, stride);
in_dc[0] = 0;
}
void ff_vp8_luma_dc_wht_msa(int16_t block[4][4][16], int16_t input[16])
{
int16_t *mb_dq_coeff = &block[0][0][0];
v8i16 input0, input1;
v4i32 in0, in1, in2, in3, a1, b1, c1, d1;
v4i32 hz0, hz1, hz2, hz3, vt0, vt1, vt2, vt3;
/* load short vector elements of 4x4 block */
LD_SH2(input, 8, input0, input1);
UNPCK_SH_SW(input0, in0, in1);
UNPCK_SH_SW(input1, in2, in3);
BUTTERFLY_4(in0, in1, in2, in3, a1, b1, c1, d1);
BUTTERFLY_4(a1, d1, c1, b1, hz0, hz1, hz3, hz2);
/* transpose the block */
TRANSPOSE4x4_SW_SW(hz0, hz1, hz2, hz3, hz0, hz1, hz2, hz3);
BUTTERFLY_4(hz0, hz1, hz2, hz3, a1, b1, c1, d1);
BUTTERFLY_4(a1, d1, c1, b1, vt0, vt1, vt3, vt2);
ADD4(vt0, 3, vt1, 3, vt2, 3, vt3, 3, vt0, vt1, vt2, vt3);
SRA_4V(vt0, vt1, vt2, vt3, 3);
mb_dq_coeff[0] = __msa_copy_s_h((v8i16) vt0, 0);
mb_dq_coeff[16] = __msa_copy_s_h((v8i16) vt1, 0);
mb_dq_coeff[32] = __msa_copy_s_h((v8i16) vt2, 0);
mb_dq_coeff[48] = __msa_copy_s_h((v8i16) vt3, 0);
mb_dq_coeff[64] = __msa_copy_s_h((v8i16) vt0, 2);
mb_dq_coeff[80] = __msa_copy_s_h((v8i16) vt1, 2);
mb_dq_coeff[96] = __msa_copy_s_h((v8i16) vt2, 2);
mb_dq_coeff[112] = __msa_copy_s_h((v8i16) vt3, 2);
mb_dq_coeff[128] = __msa_copy_s_h((v8i16) vt0, 4);
mb_dq_coeff[144] = __msa_copy_s_h((v8i16) vt1, 4);
mb_dq_coeff[160] = __msa_copy_s_h((v8i16) vt2, 4);
mb_dq_coeff[176] = __msa_copy_s_h((v8i16) vt3, 4);
mb_dq_coeff[192] = __msa_copy_s_h((v8i16) vt0, 6);
mb_dq_coeff[208] = __msa_copy_s_h((v8i16) vt1, 6);
mb_dq_coeff[224] = __msa_copy_s_h((v8i16) vt2, 6);
mb_dq_coeff[240] = __msa_copy_s_h((v8i16) vt3, 6);
memset(input, 0, 4 * 4 * sizeof(int16_t));
}
void ff_vp8_idct_dc_add4y_msa(uint8_t *dst, int16_t block[4][16],
ptrdiff_t stride)
{
ff_vp8_idct_dc_add_msa(dst, &block[0][0], stride);
ff_vp8_idct_dc_add_msa(dst + 4, &block[1][0], stride);
ff_vp8_idct_dc_add_msa(dst + 8, &block[2][0], stride);
ff_vp8_idct_dc_add_msa(dst + 12, &block[3][0], stride);
}
void ff_vp8_idct_dc_add4uv_msa(uint8_t *dst, int16_t block[4][16],
ptrdiff_t stride)
{
ff_vp8_idct_dc_add_msa(dst, &block[0][0], stride);
ff_vp8_idct_dc_add_msa(dst + 4, &block[1][0], stride);
ff_vp8_idct_dc_add_msa(dst + stride * 4, &block[2][0], stride);
ff_vp8_idct_dc_add_msa(dst + stride * 4 + 4, &block[3][0], stride);
}
This diff is collapsed.
This diff is collapsed.
/*
* Copyright (c) 2015 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com)
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* VP8 compatible video decoder
*/
#include "config.h"
#include "libavutil/attributes.h"
#include "libavcodec/vp8dsp.h"
#include "vp8dsp_mips.h"
#define VP8_MC_MIPS_FUNC(IDX, SIZE) \
dsp->put_vp8_epel_pixels_tab[IDX][0][1] = \
ff_put_vp8_epel##SIZE##_h4_msa; \
dsp->put_vp8_epel_pixels_tab[IDX][0][2] = \
ff_put_vp8_epel##SIZE##_h6_msa; \
dsp->put_vp8_epel_pixels_tab[IDX][1][0] = \
ff_put_vp8_epel##SIZE##_v4_msa; \
dsp->put_vp8_epel_pixels_tab[IDX][1][1] = \
ff_put_vp8_epel##SIZE##_h4v4_msa; \
dsp->put_vp8_epel_pixels_tab[IDX][1][2] = \
ff_put_vp8_epel##SIZE##_h6v4_msa; \
dsp->put_vp8_epel_pixels_tab[IDX][2][0] = \
ff_put_vp8_epel##SIZE##_v6_msa; \
dsp->put_vp8_epel_pixels_tab[IDX][2][1] = \
ff_put_vp8_epel##SIZE##_h4v6_msa; \
dsp->put_vp8_epel_pixels_tab[IDX][2][2] = \
ff_put_vp8_epel##SIZE##_h6v6_msa
#define VP8_BILINEAR_MC_MIPS_FUNC(IDX, SIZE) \
dsp->put_vp8_bilinear_pixels_tab[IDX][0][1] = \
ff_put_vp8_bilinear##SIZE##_h_msa; \
dsp->put_vp8_bilinear_pixels_tab[IDX][0][2] = \
ff_put_vp8_bilinear##SIZE##_h_msa; \
dsp->put_vp8_bilinear_pixels_tab[IDX][1][0] = \
ff_put_vp8_bilinear##SIZE##_v_msa; \
dsp->put_vp8_bilinear_pixels_tab[IDX][1][1] = \
ff_put_vp8_bilinear##SIZE##_hv_msa; \
dsp->put_vp8_bilinear_pixels_tab[IDX][1][2] = \
ff_put_vp8_bilinear##SIZE##_hv_msa; \
dsp->put_vp8_bilinear_pixels_tab[IDX][2][0] = \
ff_put_vp8_bilinear##SIZE##_v_msa; \
dsp->put_vp8_bilinear_pixels_tab[IDX][2][1] = \
ff_put_vp8_bilinear##SIZE##_hv_msa; \
dsp->put_vp8_bilinear_pixels_tab[IDX][2][2] = \
ff_put_vp8_bilinear##SIZE##_hv_msa
#define VP8_MC_MIPS_COPY(IDX, SIZE) \
dsp->put_vp8_epel_pixels_tab[IDX][0][0] = \
ff_put_vp8_pixels##SIZE##_msa; \
dsp->put_vp8_bilinear_pixels_tab[IDX][0][0] = \
ff_put_vp8_pixels##SIZE##_msa;
#if HAVE_MSA
static av_cold void vp8dsp_init_msa(VP8DSPContext *dsp)
{
dsp->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_msa;
dsp->vp8_idct_add = ff_vp8_idct_add_msa;
dsp->vp8_idct_dc_add = ff_vp8_idct_dc_add_msa;
dsp->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_msa;
dsp->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_msa;
VP8_MC_MIPS_FUNC(0, 16);
VP8_MC_MIPS_FUNC(1, 8);
VP8_MC_MIPS_FUNC(2, 4);
VP8_BILINEAR_MC_MIPS_FUNC(0, 16);
VP8_BILINEAR_MC_MIPS_FUNC(1, 8);
VP8_BILINEAR_MC_MIPS_FUNC(2, 4);
VP8_MC_MIPS_COPY(0, 16);
VP8_MC_MIPS_COPY(1, 8);
dsp->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16_msa;
dsp->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16_msa;
dsp->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_msa;
dsp->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_msa;
dsp->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16_inner_msa;
dsp->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16_inner_msa;
dsp->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_msa;
dsp->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_msa;
dsp->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_msa;
dsp->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_msa;
}
#endif // #if HAVE_MSA
av_cold void ff_vp8dsp_init_mips(VP8DSPContext *dsp)
{
#if HAVE_MSA
vp8dsp_init_msa(dsp);
#endif // #if HAVE_MSA
}
/*
* Copyright (c) 2015 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com)
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_MIPS_VP8DSP_MIPS_H
#define AVCODEC_MIPS_VP8DSP_MIPS_H
void ff_put_vp8_pixels4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int x, int y);
void ff_put_vp8_pixels8_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int x, int y);
void ff_put_vp8_pixels16_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int x, int y);
void ff_put_vp8_epel16_h4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel16_h6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel16_v4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel16_v6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel16_h4v4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel16_h6v4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel16_h4v6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel16_h6v6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel8_h4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel8_h6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel8_v4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel8_v6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel8_h4v4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel8_h6v4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel8_h4v6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel8_h6v6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel4_h4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel4_h6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel4_v4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel4_v6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel4_h4v4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel4_h6v4_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel4_h4v6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_epel4_h6v6_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_bilinear16_h_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_bilinear16_v_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_bilinear16_hv_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_bilinear8_h_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_bilinear8_v_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_bilinear8_hv_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_bilinear4_h_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_bilinear4_v_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
void ff_put_vp8_bilinear4_hv_msa(uint8_t *dst, ptrdiff_t dststride,
uint8_t *src, ptrdiff_t srcstride,
int h, int mx, int my);
/* loop filter */
void ff_vp8_h_loop_filter16_inner_msa(uint8_t *dst, ptrdiff_t stride,
int32_t e, int32_t i, int32_t h);
void ff_vp8_v_loop_filter16_inner_msa(uint8_t *dst, ptrdiff_t stride,
int32_t e, int32_t i, int32_t h);
void ff_vp8_h_loop_filter8uv_inner_msa(uint8_t *dst_u, uint8_t *dst_v,
ptrdiff_t stride,
int flim_e, int flim_i, int hev_thresh);
void ff_vp8_v_loop_filter8uv_inner_msa(uint8_t *dst_u, uint8_t *dst_v,
ptrdiff_t stride,
int flim_e, int flim_i, int hev_thresh);
void ff_vp8_h_loop_filter16_msa(uint8_t *dst, ptrdiff_t stride,
int flim_e, int flim_i, int hev_thresh);
void ff_vp8_v_loop_filter16_msa(uint8_t *dst, ptrdiff_t stride,
int flim_e, int flim_i, int hev_thresh);
void ff_vp8_h_loop_filter8uv_msa(uint8_t *dst_u, uint8_t *dst_v,
ptrdiff_t stride,
int flim_e, int flim_i, int hev_thresh);
void ff_vp8_v_loop_filter8uv_msa(uint8_t *dst_u, uint8_t *dst_v,
ptrdiff_t stride,
int flim_e, int flim_i, int hev_thresh);
void ff_vp8_h_loop_filter_simple_msa(uint8_t *dst, ptrdiff_t stride, int flim);
void ff_vp8_v_loop_filter_simple_msa(uint8_t *dst, ptrdiff_t stride, int flim);
/* Idct functions */
void ff_vp8_luma_dc_wht_msa(int16_t block[4][4][16], int16_t dc[16]);
void ff_vp8_idct_add_msa(uint8_t *dst, int16_t block[16], ptrdiff_t stride);
void ff_vp8_idct_dc_add_msa(uint8_t *dst, int16_t block[16], ptrdiff_t stride);
void ff_vp8_idct_dc_add4uv_msa(uint8_t *dst, int16_t block[4][16],
ptrdiff_t stride);
void ff_vp8_idct_dc_add4y_msa(uint8_t *dst, int16_t block[4][16],
ptrdiff_t stride);
#endif // #ifndef AVCODEC_MIPS_VP8DSP_MIPS_H
......@@ -735,5 +735,7 @@ av_cold void ff_vp8dsp_init(VP8DSPContext *dsp)
ff_vp8dsp_init_arm(dsp);
if (ARCH_X86)
ff_vp8dsp_init_x86(dsp);
if (ARCH_MIPS)
ff_vp8dsp_init_mips(dsp);
}
#endif /* CONFIG_VP8_DECODER */
......@@ -98,6 +98,7 @@ void ff_vp78dsp_init_x86(VP8DSPContext *c);
void ff_vp8dsp_init(VP8DSPContext *c);
void ff_vp8dsp_init_arm(VP8DSPContext *c);
void ff_vp8dsp_init_x86(VP8DSPContext *c);
void ff_vp8dsp_init_mips(VP8DSPContext *c);
#define IS_VP7 1
#define IS_VP8 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment