Commit d84e635d authored by Zhou Xiaoyong's avatar Zhou Xiaoyong Committed by Michael Niedermayer

avcodec/mips: version 1 of wmv2dsp optimizations for loongson mmi

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c5c6e307
......@@ -36,6 +36,7 @@ OBJS-$(CONFIG_MPEGVIDEO) += mips/mpegvideo_init_mips.o
OBJS-$(CONFIG_MPEGVIDEOENC) += mips/mpegvideoencdsp_init_mips.o
OBJS-$(CONFIG_ME_CMP) += mips/me_cmp_init_mips.o
OBJS-$(CONFIG_MPEG4_DECODER) += mips/xvididct_init_mips.o
OBJS-$(CONFIG_WMV2DSP) += mips/wmv2dsp_init_mips.o
MSA-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_msa.o \
mips/hevc_mc_uni_msa.o \
mips/hevc_mc_uniw_msa.o \
......@@ -79,3 +80,4 @@ MMI-OBJS-$(CONFIG_PIXBLOCKDSP) += mips/pixblockdsp_mmi.o
MMI-OBJS-$(CONFIG_H264QPEL) += mips/h264qpel_mmi.o
MMI-OBJS-$(CONFIG_VP8_DECODER) += mips/vp8dsp_mmi.o
MMI-OBJS-$(CONFIG_HPELDSP) += mips/hpeldsp_mmi.o
MMI-OBJS-$(CONFIG_WMV2DSP) += mips/wmv2dsp_mmi.o
/*
* Copyright (c) 2016 Zhou Xiaoyong <zhouxiaoyong@loongson.cn>
*
* 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 "config.h"
#include "libavutil/attributes.h"
#include "wmv2dsp_mips.h"
#if HAVE_MMI
static av_cold void wmv2dsp_init_mmi(WMV2DSPContext *c)
{
c->idct_add = ff_wmv2_idct_add_mmi;
c->idct_put = ff_wmv2_idct_put_mmi;
}
#endif /* HAVE_MMI */
av_cold void ff_wmv2dsp_init_mips(WMV2DSPContext *c)
{
#if HAVE_MMI
wmv2dsp_init_mmi(c);
#endif /* HAVE_MMI */
}
/*
* Copyright (c) 2016 Zhou Xiaoyong <zhouxiaoyong@loongson.cn>
*
* 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_WMV2DSP_MIPS_H
#define AVCODEC_MIPS_WMV2DSP_MIPS_H
#include "libavcodec/wmv2dsp.h"
void ff_wmv2_idct_add_mmi(uint8_t *dest, int line_size, int16_t *block);
void ff_wmv2_idct_put_mmi(uint8_t *dest, int line_size, int16_t *block);
#endif /* AVCODEC_MIPS_WMV2DSP_MIPS_H */
This diff is collapsed.
......@@ -262,4 +262,7 @@ av_cold void ff_wmv2dsp_init(WMV2DSPContext *c)
c->put_mspel_pixels_tab[5] = put_mspel8_mc12_c;
c->put_mspel_pixels_tab[6] = put_mspel8_mc22_c;
c->put_mspel_pixels_tab[7] = put_mspel8_mc32_c;
if (ARCH_MIPS)
ff_wmv2dsp_init_mips(c);
}
......@@ -33,5 +33,6 @@ typedef struct WMV2DSPContext {
} WMV2DSPContext;
void ff_wmv2dsp_init(WMV2DSPContext *c);
void ff_wmv2dsp_init_mips(WMV2DSPContext *c);
#endif /* AVCODEC_WMV2DSP_H */
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