aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mips/h264dsp_init_mips.c
diff options
context:
space:
mode:
authorShivraj Patil <shivraj.patil@imgtec.com>2015-06-10 19:48:40 +0530
committerMichael Niedermayer <michaelni@gmx.at>2015-06-11 17:10:45 +0200
commitfb92f3ecb4d48a5612ee61aa39bd538cac9d08cf (patch)
treef60612a94b011b4a0fefac3e5b5d9d5b5fff886f /libavcodec/mips/h264dsp_init_mips.c
parent1d70b6fe1d9d67a35daf2ec4c653ba3eff5d31b7 (diff)
downloadffmpeg-fb92f3ecb4d48a5612ee61aa39bd538cac9d08cf.tar.gz
avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for AVC idct functions
This patch adds MSA (MIPS-SIMD-Arch) optimizations for AVC idct functions in new file h264idct_msa.c Adds new generic macros (needed for this patch) in libavutil/mips/generic_macros_msa.h Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mips/h264dsp_init_mips.c')
-rw-r--r--libavcodec/mips/h264dsp_init_mips.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavcodec/mips/h264dsp_init_mips.c b/libavcodec/mips/h264dsp_init_mips.c
index d9182f28a5..7f74adf591 100644
--- a/libavcodec/mips/h264dsp_init_mips.c
+++ b/libavcodec/mips/h264dsp_init_mips.c
@@ -62,6 +62,21 @@ static av_cold void h264dsp_init_msa(H264DSPContext *c,
c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels16_8_msa;
c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels8_8_msa;
c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels4_8_msa;
+
+ c->h264_idct_add = ff_h264_idct_add_msa;
+ c->h264_idct8_add = ff_h264_idct8_addblk_msa;
+ c->h264_idct_dc_add = ff_h264_idct4x4_addblk_dc_msa;
+ c->h264_idct8_dc_add = ff_h264_idct8_dc_addblk_msa;
+ c->h264_idct_add16 = ff_h264_idct_add16_msa;
+ c->h264_idct8_add4 = ff_h264_idct8_add4_msa;
+
+ if (chroma_format_idc <= 1)
+ c->h264_idct_add8 = ff_h264_idct_add8_msa;
+ else
+ c->h264_idct_add8 = ff_h264_idct_add8_422_msa;
+
+ c->h264_idct_add16intra = ff_h264_idct_add16_intra_msa;
+ c->h264_luma_dc_dequant_idct = ff_h264_deq_idct_luma_dc_msa;
} // if (8 == bit_depth)
}
#endif // #if HAVE_MSA