FFmpeg
blockdsp_msa.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Parag Salasakar (parag.salasakar@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 
22 #include "blockdsp_mips.h"
23 
25  int32_t src_stride, int32_t height)
26 {
27  int32_t cnt;
28  uint64_t dst0;
29  v16u8 val0;
30 
31  val0 = (v16u8) __msa_fill_b(val);
32  dst0 = __msa_copy_u_d((v2i64) val0, 0);
33 
34  for (cnt = (height >> 2); cnt--;) {
35  SD4(dst0, dst0, dst0, dst0, src, src_stride);
36  src += (4 * src_stride);
37  }
38 }
39 
41  int32_t src_stride, int32_t height)
42 {
43  int32_t cnt;
44  v16u8 val0;
45 
46  val0 = (v16u8) __msa_fill_b(val);
47 
48  for (cnt = (height >> 3); cnt--;) {
49  ST_UB8(val0, val0, val0, val0, val0, val0, val0, val0, src, src_stride);
50  src += (8 * src_stride);
51  }
52 }
53 
56 {
57  int8_t cnt;
58  v16u8 zero = { 0 };
59 
60  for (cnt = (height / 2); cnt--;) {
61  ST_UB(zero, src);
62  src += stride;
63  ST_UB(zero, src);
64  src += stride;
65  }
66 }
67 
69 {
71 }
72 
74 {
76 }
77 
78 void ff_clear_block_msa(int16_t *block)
79 {
81 }
82 
83 void ff_clear_blocks_msa(int16_t *block)
84 {
85  memset_zero_16width_msa((uint8_t *) block, 16, 8 * 6);
86 }
stride
int stride
Definition: mace.c:144
blockdsp_mips.h
ST_UB8
#define ST_UB8(...)
Definition: generic_macros_msa.h:395
generic_macros_msa.h
val
static double val(void *priv, double ch)
Definition: aeval.c:76
copy_8bit_value_width8_msa
static void copy_8bit_value_width8_msa(uint8_t *src, uint8_t val, int32_t src_stride, int32_t height)
Definition: blockdsp_msa.c:24
int32_t
int32_t
Definition: audio_convert.c:194
src
#define src
Definition: vp8dsp.c:255
memset_zero_16width_msa
static void memset_zero_16width_msa(uint8_t *src, int32_t stride, int32_t height)
Definition: blockdsp_msa.c:54
ff_fill_block16_msa
void ff_fill_block16_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height)
Definition: blockdsp_msa.c:68
ff_clear_block_msa
void ff_clear_block_msa(int16_t *block)
Definition: blockdsp_msa.c:78
SD4
#define SD4(in0, in1, in2, in3, pdst, stride)
Definition: generic_macros_msa.h:260
ff_fill_block8_msa
void ff_fill_block8_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height)
Definition: blockdsp_msa.c:73
height
#define height
uint8_t
uint8_t
Definition: audio_convert.c:194
ff_clear_blocks_msa
void ff_clear_blocks_msa(int16_t *block)
Definition: blockdsp_msa.c:83
ST_UB
#define ST_UB(...)
Definition: generic_macros_msa.h:44
zero
#define zero
Definition: regdef.h:64
block
The exact code depends on how similar the blocks are and how related they are to the block
Definition: filter_design.txt:207
copy_8bit_value_width16_msa
static void copy_8bit_value_width16_msa(uint8_t *src, uint8_t val, int32_t src_stride, int32_t height)
Definition: blockdsp_msa.c:40