FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vp8dsp_init_mips.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com)
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 /**
22  * @file
23  * VP8 compatible video decoder
24  */
25 
26 #include "config.h"
27 #include "libavutil/attributes.h"
28 #include "libavcodec/vp8dsp.h"
29 #include "vp8dsp_mips.h"
30 
31 #define VP8_MC_MIPS_FUNC(IDX, SIZE) \
32  dsp->put_vp8_epel_pixels_tab[IDX][0][1] = \
33  ff_put_vp8_epel##SIZE##_h4_msa; \
34  dsp->put_vp8_epel_pixels_tab[IDX][0][2] = \
35  ff_put_vp8_epel##SIZE##_h6_msa; \
36  dsp->put_vp8_epel_pixels_tab[IDX][1][0] = \
37  ff_put_vp8_epel##SIZE##_v4_msa; \
38  dsp->put_vp8_epel_pixels_tab[IDX][1][1] = \
39  ff_put_vp8_epel##SIZE##_h4v4_msa; \
40  dsp->put_vp8_epel_pixels_tab[IDX][1][2] = \
41  ff_put_vp8_epel##SIZE##_h6v4_msa; \
42  dsp->put_vp8_epel_pixels_tab[IDX][2][0] = \
43  ff_put_vp8_epel##SIZE##_v6_msa; \
44  dsp->put_vp8_epel_pixels_tab[IDX][2][1] = \
45  ff_put_vp8_epel##SIZE##_h4v6_msa; \
46  dsp->put_vp8_epel_pixels_tab[IDX][2][2] = \
47  ff_put_vp8_epel##SIZE##_h6v6_msa
48 
49 #define VP8_BILINEAR_MC_MIPS_FUNC(IDX, SIZE) \
50  dsp->put_vp8_bilinear_pixels_tab[IDX][0][1] = \
51  ff_put_vp8_bilinear##SIZE##_h_msa; \
52  dsp->put_vp8_bilinear_pixels_tab[IDX][0][2] = \
53  ff_put_vp8_bilinear##SIZE##_h_msa; \
54  dsp->put_vp8_bilinear_pixels_tab[IDX][1][0] = \
55  ff_put_vp8_bilinear##SIZE##_v_msa; \
56  dsp->put_vp8_bilinear_pixels_tab[IDX][1][1] = \
57  ff_put_vp8_bilinear##SIZE##_hv_msa; \
58  dsp->put_vp8_bilinear_pixels_tab[IDX][1][2] = \
59  ff_put_vp8_bilinear##SIZE##_hv_msa; \
60  dsp->put_vp8_bilinear_pixels_tab[IDX][2][0] = \
61  ff_put_vp8_bilinear##SIZE##_v_msa; \
62  dsp->put_vp8_bilinear_pixels_tab[IDX][2][1] = \
63  ff_put_vp8_bilinear##SIZE##_hv_msa; \
64  dsp->put_vp8_bilinear_pixels_tab[IDX][2][2] = \
65  ff_put_vp8_bilinear##SIZE##_hv_msa
66 
67 #define VP8_MC_MIPS_COPY(IDX, SIZE) \
68  dsp->put_vp8_epel_pixels_tab[IDX][0][0] = \
69  ff_put_vp8_pixels##SIZE##_msa; \
70  dsp->put_vp8_bilinear_pixels_tab[IDX][0][0] = \
71  ff_put_vp8_pixels##SIZE##_msa;
72 
73 #if HAVE_MSA
74 static av_cold void vp8dsp_init_msa(VP8DSPContext *dsp)
75 {
81 
82  VP8_MC_MIPS_FUNC(0, 16);
83  VP8_MC_MIPS_FUNC(1, 8);
84  VP8_MC_MIPS_FUNC(2, 4);
85 
89 
90  VP8_MC_MIPS_COPY(0, 16);
91  VP8_MC_MIPS_COPY(1, 8);
92 
97 
102 
105 }
106 #endif // #if HAVE_MSA
107 
109 {
110 #if HAVE_MSA
111  vp8dsp_init_msa(dsp);
112 #endif // #if HAVE_MSA
113 }
void ff_vp8_v_loop_filter16_inner_msa(uint8_t *src, ptrdiff_t pitch, int32_t e, int32_t i, int32_t h)
Definition: vp8_lpf_msa.c:637
void ff_vp8_h_loop_filter16_msa(uint8_t *src, ptrdiff_t pitch, int b_limit_in, int limit_in, int thresh_in)
Definition: vp8_lpf_msa.c:374
#define VP8_MC_MIPS_FUNC(IDX, SIZE)
void(* vp8_v_loop_filter16y)(uint8_t *dst, ptrdiff_t stride, int flim_E, int flim_I, int hev_thresh)
Definition: vp8dsp.h:48
#define VP8_BILINEAR_MC_MIPS_FUNC(IDX, SIZE)
Macro definitions for various function/variable attributes.
void ff_vp8_idct_dc_add4y_msa(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride)
Definition: vp8_idct_msa.c:144
#define av_cold
Definition: attributes.h:82
VP8 compatible video decoder.
void(* vp8_h_loop_filter8uv_inner)(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, int flim_E, int flim_I, int hev_thresh)
Definition: vp8dsp.h:65
av_cold void ff_vp8dsp_init_mips(VP8DSPContext *dsp)
void ff_vp8_v_loop_filter16_msa(uint8_t *src, ptrdiff_t pitch, int b_limit_in, int limit_in, int thresh_in)
Definition: vp8_lpf_msa.c:297
#define VP8_MC_MIPS_COPY(IDX, SIZE)
void(* vp8_h_loop_filter8uv)(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, int flim_E, int flim_I, int hev_thresh)
Definition: vp8dsp.h:54
void(* vp8_v_loop_filter8uv)(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, int flim_E, int flim_I, int hev_thresh)
Definition: vp8dsp.h:52
void(* vp8_idct_dc_add4y)(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride)
Definition: vp8dsp.h:42
void ff_vp8_v_loop_filter8uv_msa(uint8_t *src_u, uint8_t *src_v, ptrdiff_t pitch, int b_limit_in, int limit_in, int thresh_in)
Definition: vp8_lpf_msa.c:320
void(* vp8_v_loop_filter8uv_inner)(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, int flim_E, int flim_I, int hev_thresh)
Definition: vp8dsp.h:62
void(* vp8_h_loop_filter_simple)(uint8_t *dst, ptrdiff_t stride, int flim)
Definition: vp8dsp.h:70
void(* vp8_idct_add)(uint8_t *dst, int16_t block[16], ptrdiff_t stride)
Definition: vp8dsp.h:40
void ff_vp8_v_loop_filter8uv_inner_msa(uint8_t *src_u, uint8_t *src_v, ptrdiff_t pitch, int b_limit_in, int limit_in, int thresh_in)
Definition: vp8_lpf_msa.c:553
void(* vp8_idct_dc_add4uv)(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride)
Definition: vp8dsp.h:44
void ff_vp8_h_loop_filter8uv_msa(uint8_t *src_u, uint8_t *src_v, ptrdiff_t pitch, int b_limit_in, int limit_in, int thresh_in)
Definition: vp8_lpf_msa.c:439
void(* vp8_h_loop_filter16y_inner)(uint8_t *dst, ptrdiff_t stride, int flim_E, int flim_I, int hev_thresh)
Definition: vp8dsp.h:60
void(* vp8_luma_dc_wht)(int16_t block[4][4][16], int16_t dc[16])
Definition: vp8dsp.h:38
void ff_vp8_h_loop_filter_simple_msa(uint8_t *src, ptrdiff_t pitch, int b_limit_ptr)
Definition: vp8_lpf_msa.c:519
void ff_vp8_v_loop_filter_simple_msa(uint8_t *src, ptrdiff_t pitch, int b_limit_ptr)
Definition: vp8_lpf_msa.c:505
void(* vp8_v_loop_filter_simple)(uint8_t *dst, ptrdiff_t stride, int flim)
Definition: vp8dsp.h:69
void(* vp8_h_loop_filter16y)(uint8_t *dst, ptrdiff_t stride, int flim_E, int flim_I, int hev_thresh)
Definition: vp8dsp.h:50
void ff_vp8_h_loop_filter8uv_inner_msa(uint8_t *src_u, uint8_t *src_v, ptrdiff_t pitch, int b_limit_in, int limit_in, int thresh_in)
Definition: vp8_lpf_msa.c:595
void(* vp8_idct_dc_add)(uint8_t *dst, int16_t block[16], ptrdiff_t stride)
Definition: vp8dsp.h:41
void(* vp8_v_loop_filter16y_inner)(uint8_t *dst, ptrdiff_t stride, int flim_E, int flim_I, int hev_thresh)
Definition: vp8dsp.h:58
void ff_vp8_idct_add_msa(uint8_t *dst, int16_t input[16], ptrdiff_t stride)
Definition: vp8_idct_msa.c:48
void ff_vp8_luma_dc_wht_msa(int16_t block[4][4][16], int16_t input[16])
Definition: vp8_idct_msa.c:105
void ff_vp8_idct_dc_add4uv_msa(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride)
Definition: vp8_idct_msa.c:153
void ff_vp8_h_loop_filter16_inner_msa(uint8_t *src, ptrdiff_t pitch, int32_t e, int32_t i, int32_t h)
Definition: vp8_lpf_msa.c:657
void ff_vp8_idct_dc_add_msa(uint8_t *dst, int16_t in_dc[16], ptrdiff_t stride)
Definition: vp8_idct_msa.c:84