FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vc1dsp_init_mips.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Zhou Xiaoyong <zhouxiaoyong@loongson.cn>
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #include "libavutil/attributes.h"
22 #include "libavcodec/vc1dsp.h"
23 #include "vc1dsp_mips.h"
24 #include "config.h"
25 
26 #if HAVE_MMI
27 static av_cold void vc1dsp_init_mmi(VC1DSPContext *dsp)
28 {
29 #if _MIPS_SIM != _ABIO32
33 #endif
39 
44 
51 
52 #define FN_ASSIGN(OP, X, Y, INSN) \
53  dsp->OP##vc1_mspel_pixels_tab[1][X+4*Y] = ff_##OP##vc1_mspel_mc##X##Y##INSN; \
54  dsp->OP##vc1_mspel_pixels_tab[0][X+4*Y] = ff_##OP##vc1_mspel_mc##X##Y##_16##INSN
55 
56  FN_ASSIGN(put_, 0, 0, _mmi);
57  FN_ASSIGN(put_, 0, 1, _mmi);
58  FN_ASSIGN(put_, 0, 2, _mmi);
59  FN_ASSIGN(put_, 0, 3, _mmi);
60 
61  FN_ASSIGN(put_, 1, 0, _mmi);
62  //FN_ASSIGN(put_, 1, 1, _mmi);//FIXME
63  //FN_ASSIGN(put_, 1, 2, _mmi);//FIXME
64  //FN_ASSIGN(put_, 1, 3, _mmi);//FIXME
65 
66  FN_ASSIGN(put_, 2, 0, _mmi);
67  //FN_ASSIGN(put_, 2, 1, _mmi);//FIXME
68  //FN_ASSIGN(put_, 2, 2, _mmi);//FIXME
69  //FN_ASSIGN(put_, 2, 3, _mmi);//FIXME
70 
71  FN_ASSIGN(put_, 3, 0, _mmi);
72  //FN_ASSIGN(put_, 3, 1, _mmi);//FIXME
73  //FN_ASSIGN(put_, 3, 2, _mmi);//FIXME
74  //FN_ASSIGN(put_, 3, 3, _mmi);//FIXME
75 
76  FN_ASSIGN(avg_, 0, 0, _mmi);
77  FN_ASSIGN(avg_, 0, 1, _mmi);
78  FN_ASSIGN(avg_, 0, 2, _mmi);
79  FN_ASSIGN(avg_, 0, 3, _mmi);
80 
81  FN_ASSIGN(avg_, 1, 0, _mmi);
82  //FN_ASSIGN(avg_, 1, 1, _mmi);//FIXME
83  //FN_ASSIGN(avg_, 1, 2, _mmi);//FIXME
84  //FN_ASSIGN(avg_, 1, 3, _mmi);//FIXME
85 
86  FN_ASSIGN(avg_, 2, 0, _mmi);
87  //FN_ASSIGN(avg_, 2, 1, _mmi);//FIXME
88  //FN_ASSIGN(avg_, 2, 2, _mmi);//FIXME
89  //FN_ASSIGN(avg_, 2, 3, _mmi);//FIXME
90 
91  FN_ASSIGN(avg_, 3, 0, _mmi);
92  //FN_ASSIGN(avg_, 3, 1, _mmi);//FIXME
93  //FN_ASSIGN(avg_, 3, 2, _mmi);//FIXME
94  //FN_ASSIGN(avg_, 3, 3, _mmi);//FIXME
95 
100 }
101 #endif /* HAVE_MMI */
102 
104 {
105 #if HAVE_MMI
106  vc1dsp_init_mmi(dsp);
107 #endif /* HAVE_MMI */
108 }
void(* vc1_h_overlap)(uint8_t *src, int stride)
Definition: vc1dsp.h:46
VC-1 and WMV3 decoder.
void ff_vc1_inv_trans_8x4_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block)
void ff_vc1_h_loop_filter8_mmi(uint8_t *src, int stride, int pq)
Definition: vc1dsp_mmi.c:1187
void(* vc1_v_loop_filter8)(uint8_t *src, int stride, int pq)
Definition: vc1dsp.h:51
Macro definitions for various function/variable attributes.
void ff_vc1_inv_trans_8x8_dc_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block)
Definition: vc1dsp_mmi.c:144
void ff_vc1_h_s_overlap_mmi(int16_t *left, int16_t *right)
Definition: vc1dsp_mmi.c:1022
#define av_cold
Definition: attributes.h:82
void(* vc1_v_loop_filter4)(uint8_t *src, int stride, int pq)
Definition: vc1dsp.h:49
void(* vc1_inv_trans_8x8)(int16_t *b)
Definition: vc1dsp.h:37
av_cold void ff_vc1dsp_init_mips(VC1DSPContext *dsp)
void(* vc1_h_loop_filter8)(uint8_t *src, int stride, int pq)
Definition: vc1dsp.h:52
void ff_vc1_h_loop_filter16_mmi(uint8_t *src, int stride, int pq)
Definition: vc1dsp_mmi.c:1197
void ff_vc1_v_s_overlap_mmi(int16_t *top, int16_t *bottom)
Definition: vc1dsp_mmi.c:1072
void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
Definition: vc1dsp_mmi.c:1861
void ff_vc1_inv_trans_8x8_mmi(int16_t block[64])
void(* vc1_inv_trans_8x8_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:41
void(* vc1_inv_trans_8x4)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:38
void ff_vc1_inv_trans_8x4_dc_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block)
Definition: vc1dsp_mmi.c:371
void ff_vc1_v_loop_filter8_mmi(uint8_t *src, int stride, int pq)
Definition: vc1dsp_mmi.c:1182
void(* vc1_v_loop_filter16)(uint8_t *src, int stride, int pq)
Definition: vc1dsp.h:53
void ff_vc1_inv_trans_4x4_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block)
Definition: vc1dsp_mmi.c:889
void(* vc1_inv_trans_4x4)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:40
void(* vc1_inv_trans_8x4_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:42
h264_chroma_mc_func avg_no_rnd_vc1_chroma_pixels_tab[3]
Definition: vc1dsp.h:64
void(* vc1_inv_trans_4x8)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:39
void(* vc1_inv_trans_4x8_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:43
void(* vc1_h_loop_filter4)(uint8_t *src, int stride, int pq)
Definition: vc1dsp.h:50
void(* vc1_inv_trans_4x4_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:44
void ff_vc1_h_loop_filter4_mmi(uint8_t *src, int stride, int pq)
Definition: vc1dsp_mmi.c:1177
void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
Definition: vc1dsp_mmi.c:1916
void ff_vc1_inv_trans_4x8_dc_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block)
Definition: vc1dsp_mmi.c:602
void ff_vc1_v_loop_filter4_mmi(uint8_t *src, int stride, int pq)
Definition: vc1dsp_mmi.c:1172
void ff_vc1_v_overlap_mmi(uint8_t *src, int stride)
Definition: vc1dsp_mmi.c:1049
h264_chroma_mc_func put_no_rnd_vc1_chroma_pixels_tab[3]
Definition: vc1dsp.h:63
void ff_vc1_inv_trans_4x8_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block)
void ff_vc1_inv_trans_4x4_dc_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block)
Definition: vc1dsp_mmi.c:841
#define FN_ASSIGN(X, Y)
void(* vc1_v_s_overlap)(int16_t *top, int16_t *bottom)
Definition: vc1dsp.h:47
void ff_vc1_h_overlap_mmi(uint8_t *src, int stride)
Definition: vc1dsp_mmi.c:999
void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
Definition: vc1dsp_mmi.c:2027
void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
Definition: vc1dsp_mmi.c:1969
void ff_vc1_v_loop_filter16_mmi(uint8_t *src, int stride, int pq)
Definition: vc1dsp_mmi.c:1192
void(* vc1_h_s_overlap)(int16_t *left, int16_t *right)
Definition: vc1dsp.h:48
void(* vc1_v_overlap)(uint8_t *src, int stride)
Definition: vc1dsp.h:45
void(* vc1_h_loop_filter16)(uint8_t *src, int stride, int pq)
Definition: vc1dsp.h:54