diff options
author | 周晓勇 <zhouxiaoyong@loongson.cn> | 2015-05-27 11:11:29 +0800 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-27 13:01:54 +0200 |
commit | e89e23e1bc1be8caebf666ff11252a38dc651484 (patch) | |
tree | 131567d1050d1eb6ff46a401238c235081c460c8 /libavcodec/mips/h264dsp_init_mips.c | |
parent | 1cf87e1680423370d26d4e20d4591a6561aa12b9 (diff) | |
download | ffmpeg-e89e23e1bc1be8caebf666ff11252a38dc651484.tar.gz |
avcodec: loongson3 optimized h264dsp weighted mc with mmi
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
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.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libavcodec/mips/h264dsp_init_mips.c b/libavcodec/mips/h264dsp_init_mips.c index 8d3d76085f..d9182f28a5 100644 --- a/libavcodec/mips/h264dsp_init_mips.c +++ b/libavcodec/mips/h264dsp_init_mips.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2015 Parag Salasakar (Parag.Salasakar@imgtec.com) + * Copyright (c) 2015 Zhou Xiaoyong <zhouxiaoyong@loongson.cn> * * This file is part of FFmpeg. * @@ -65,10 +66,30 @@ static av_cold void h264dsp_init_msa(H264DSPContext *c, } #endif // #if HAVE_MSA +#if HAVE_LOONGSON3 +static av_cold void h264dsp_init_mmi(H264DSPContext * c, + const int bit_depth, + const int chroma_format_idc) +{ + if (bit_depth == 8) { + c->weight_h264_pixels_tab[0] = ff_h264_weight_pixels16_8_mmi; + c->weight_h264_pixels_tab[1] = ff_h264_weight_pixels8_8_mmi; + c->weight_h264_pixels_tab[2] = ff_h264_weight_pixels4_8_mmi; + + c->biweight_h264_pixels_tab[0] = ff_h264_biweight_pixels16_8_mmi; + c->biweight_h264_pixels_tab[1] = ff_h264_biweight_pixels8_8_mmi; + c->biweight_h264_pixels_tab[2] = ff_h264_biweight_pixels4_8_mmi; + } +} +#endif /* HAVE_LOONGSON3 */ + av_cold void ff_h264dsp_init_mips(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) { #if HAVE_MSA h264dsp_init_msa(c, bit_depth, chroma_format_idc); #endif // #if HAVE_MSA +#if HAVE_LOONGSON3 + h264dsp_init_mmi(c, bit_depth, chroma_format_idc); +#endif /* HAVE_LOONGSON3 */ } |