FFmpeg
Loading...
Searching...
No Matches
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
24static void copy_8bit_value_width8_msa(uint8_t *src, uint8_t val,
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
40static void copy_8bit_value_width16_msa(uint8_t *src, uint8_t val,
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
68void ff_fill_block16_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height)
69{
71}
72
73void ff_fill_block8_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height)
74{
76}
77
79{
80 memset_zero_16width_msa((uint8_t *) block, 16, 8);
81}
82
84{
85 memset_zero_16width_msa((uint8_t *) block, 16, 8 * 6);
86}
static double val(void *priv, double ch)
Definition aeval.c:77
int32_t
void ff_clear_block_msa(int16_t *block)
static void copy_8bit_value_width8_msa(uint8_t *src, uint8_t val, int32_t src_stride, int32_t height)
static void copy_8bit_value_width16_msa(uint8_t *src, uint8_t val, int32_t src_stride, int32_t height)
static void memset_zero_16width_msa(uint8_t *src, int32_t stride, int32_t height)
void ff_fill_block16_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height)
void ff_fill_block8_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height)
void ff_clear_blocks_msa(int16_t *block)
static int16_t block[64]
Definition dct.c:125
#define SD4(in0, in1, in2, in3, pdst, stride)
#define ST_UB8(...)
#define ST_UB(...)
static int zero(InterplayACMContext *s, unsigned ind, unsigned col)
#define stride
#define src
Definition vp8dsp.c:248
#define height
Definition dsp.h:89