FFmpeg
h264dsp_lasx.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 Loongson Technology Corporation Limited
3  * Contributed by Shiyou Yin <yinshiyou-hf@loongson.cn>
4  * Xiwei Gu <guxiwei-hf@loongson.cn>
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef AVCODEC_LOONGARCH_H264DSP_LASX_H
24 #define AVCODEC_LOONGARCH_H264DSP_LASX_H
25 
26 #include "libavcodec/h264dec.h"
27 
28 void ff_h264_h_lpf_luma_8_lasx(uint8_t *src, ptrdiff_t stride,
29  int alpha, int beta, int8_t *tc0);
30 void ff_h264_v_lpf_luma_8_lasx(uint8_t *src, ptrdiff_t stride,
31  int alpha, int beta, int8_t *tc0);
32 void ff_h264_h_lpf_luma_intra_8_lasx(uint8_t *src, ptrdiff_t stride,
33  int alpha, int beta);
34 void ff_h264_v_lpf_luma_intra_8_lasx(uint8_t *src, ptrdiff_t stride,
35  int alpha, int beta);
36 void ff_h264_h_lpf_chroma_8_lasx(uint8_t *src, ptrdiff_t stride,
37  int alpha, int beta, int8_t *tc0);
38 void ff_h264_v_lpf_chroma_8_lasx(uint8_t *src, ptrdiff_t stride,
39  int alpha, int beta, int8_t *tc0);
40 void ff_h264_h_lpf_chroma_intra_8_lasx(uint8_t *src, ptrdiff_t stride,
41  int alpha, int beta);
42 void ff_h264_v_lpf_chroma_intra_8_lasx(uint8_t *src, ptrdiff_t stride,
43  int alpha, int beta);
44 void ff_biweight_h264_pixels16_8_lasx(uint8_t *dst, uint8_t *src,
45  ptrdiff_t stride, int height,
46  int log2_denom, int weight_dst,
47  int weight_src, int offset_in);
48 void ff_biweight_h264_pixels8_8_lasx(uint8_t *dst, uint8_t *src,
49  ptrdiff_t stride, int height,
50  int log2_denom, int weight_dst,
51  int weight_src, int offset);
52 void ff_biweight_h264_pixels4_8_lasx(uint8_t *dst, uint8_t *src,
53  ptrdiff_t stride, int height,
54  int log2_denom, int weight_dst,
55  int weight_src, int offset);
56 void ff_weight_h264_pixels16_8_lasx(uint8_t *src, ptrdiff_t stride,
57  int height, int log2_denom,
58  int weight_src, int offset_in);
59 void ff_weight_h264_pixels8_8_lasx(uint8_t *src, ptrdiff_t stride,
60  int height, int log2_denom,
61  int weight_src, int offset);
62 void ff_weight_h264_pixels4_8_lasx(uint8_t *src, ptrdiff_t stride,
63  int height, int log2_denom,
64  int weight_src, int offset);
65 void ff_h264_add_pixels4_8_lasx(uint8_t *_dst, int16_t *_src, int stride);
66 
67 void ff_h264_add_pixels8_8_lasx(uint8_t *_dst, int16_t *_src, int stride);
68 void ff_h264_idct_add_lasx(uint8_t *dst, int16_t *src, int32_t dst_stride);
69 void ff_h264_idct8_addblk_lasx(uint8_t *dst, int16_t *src, int32_t dst_stride);
70 void ff_h264_idct4x4_addblk_dc_lasx(uint8_t *dst, int16_t *src,
71  int32_t dst_stride);
72 void ff_h264_idct8_dc_addblk_lasx(uint8_t *dst, int16_t *src,
73  int32_t dst_stride);
74 void ff_h264_idct_add16_lasx(uint8_t *dst, const int32_t *blk_offset,
75  int16_t *block, int32_t dst_stride,
76  const uint8_t nzc[15 * 8]);
77 void ff_h264_idct8_add4_lasx(uint8_t *dst, const int32_t *blk_offset,
78  int16_t *block, int32_t dst_stride,
79  const uint8_t nzc[15 * 8]);
80 void ff_h264_idct_add8_lasx(uint8_t **dst, const int32_t *blk_offset,
81  int16_t *block, int32_t dst_stride,
82  const uint8_t nzc[15 * 8]);
83 void ff_h264_idct_add8_422_lasx(uint8_t **dst, const int32_t *blk_offset,
84  int16_t *block, int32_t dst_stride,
85  const uint8_t nzc[15 * 8]);
86 void ff_h264_idct_add16_intra_lasx(uint8_t *dst, const int32_t *blk_offset,
87  int16_t *block, int32_t dst_stride,
88  const uint8_t nzc[15 * 8]);
89 void ff_h264_deq_idct_luma_dc_lasx(int16_t *dst, int16_t *src,
90  int32_t de_qval);
91 
92 void ff_h264_loop_filter_strength_lasx(int16_t bS[2][4][4], uint8_t nnz[40],
93  int8_t ref[2][40], int16_t mv[2][40][2],
94  int bidir, int edges, int step,
95  int mask_mv0, int mask_mv1, int field);
96 
97 #endif // #ifndef AVCODEC_LOONGARCH_H264DSP_LASX_H
stride
int stride
Definition: mace.c:144
ff_h264_loop_filter_strength_lasx
void ff_h264_loop_filter_strength_lasx(int16_t bS[2][4][4], uint8_t nnz[40], int8_t ref[2][40], int16_t mv[2][40][2], int bidir, int edges, int step, int mask_mv0, int mask_mv1, int field)
Definition: h264_deblock_lasx.c:112
ff_h264_h_lpf_luma_intra_8_lasx
void ff_h264_h_lpf_luma_intra_8_lasx(uint8_t *src, ptrdiff_t stride, int alpha, int beta)
Definition: h264dsp_lasx.c:584
mv
static const int8_t mv[256][2]
Definition: 4xm.c:79
step
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about which is also called distortion Distortion can be quantified by almost any quality measurement one chooses the sum of squared differences is used but more complex methods that consider psychovisual effects can be used as well It makes no difference in this discussion First step
Definition: rate_distortion.txt:58
ff_weight_h264_pixels8_8_lasx
void ff_weight_h264_pixels8_8_lasx(uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_src, int offset)
Definition: h264dsp_lasx.c:1903
ff_h264_idct8_add4_lasx
void ff_h264_idct8_add4_lasx(uint8_t *dst, const int32_t *blk_offset, int16_t *block, int32_t dst_stride, const uint8_t nzc[15 *8])
Definition: h264idct_lasx.c:327
ff_h264_v_lpf_luma_8_lasx
void ff_h264_v_lpf_luma_8_lasx(uint8_t *src, ptrdiff_t stride, int alpha, int beta, int8_t *tc0)
Definition: h264dsp_lasx.c:244
ff_h264_deq_idct_luma_dc_lasx
void ff_h264_deq_idct_luma_dc_lasx(int16_t *dst, int16_t *src, int32_t de_qval)
Definition: h264idct_lasx.c:447
ff_biweight_h264_pixels4_8_lasx
void ff_biweight_h264_pixels4_8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_dst, int weight_src, int offset)
Definition: h264dsp_lasx.c:1542
ff_h264_idct_add_lasx
void ff_h264_idct_add_lasx(uint8_t *dst, int16_t *src, int32_t dst_stride)
Definition: h264idct_lasx.c:44
ff_h264_idct8_addblk_lasx
void ff_h264_idct8_addblk_lasx(uint8_t *dst, int16_t *src, int32_t dst_stride)
Definition: h264idct_lasx.c:80
ff_h264_idct_add16_intra_lasx
void ff_h264_idct_add16_intra_lasx(uint8_t *dst, const int32_t *blk_offset, int16_t *block, int32_t dst_stride, const uint8_t nzc[15 *8])
Definition: h264idct_lasx.c:428
ff_h264_h_lpf_chroma_8_lasx
void ff_h264_h_lpf_chroma_8_lasx(uint8_t *src, ptrdiff_t stride, int alpha, int beta, int8_t *tc0)
Definition: h264dsp_lasx.c:366
field
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this field
Definition: writing_filters.txt:78
ff_h264_v_lpf_chroma_intra_8_lasx
void ff_h264_v_lpf_chroma_intra_8_lasx(uint8_t *src, ptrdiff_t stride, int alpha, int beta)
Definition: h264dsp_lasx.c:960
ff_h264_idct_add8_lasx
void ff_h264_idct_add8_lasx(uint8_t **dst, const int32_t *blk_offset, int16_t *block, int32_t dst_stride, const uint8_t nzc[15 *8])
Definition: h264idct_lasx.c:350
src
#define src
Definition: vp8dsp.c:255
ff_h264_add_pixels8_8_lasx
void ff_h264_add_pixels8_8_lasx(uint8_t *_dst, int16_t *_src, int stride)
Definition: h264dsp_lasx.c:2061
height
#define height
ff_biweight_h264_pixels16_8_lasx
void ff_biweight_h264_pixels16_8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_dst, int weight_src, int offset_in)
Definition: h264dsp_lasx.c:1004
ff_biweight_h264_pixels8_8_lasx
void ff_biweight_h264_pixels8_8_lasx(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_dst, int weight_src, int offset)
Definition: h264dsp_lasx.c:1391
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
ff_h264_h_lpf_luma_8_lasx
void ff_h264_h_lpf_luma_8_lasx(uint8_t *src, ptrdiff_t stride, int alpha, int beta, int8_t *tc0)
Definition: h264dsp_lasx.c:67
ff_h264_add_pixels4_8_lasx
void ff_h264_add_pixels4_8_lasx(uint8_t *_dst, int16_t *_src, int stride)
Definition: h264dsp_lasx.c:2034
h264dec.h
ff_h264_idct4x4_addblk_dc_lasx
void ff_h264_idct4x4_addblk_dc_lasx(uint8_t *dst, int16_t *src, int32_t dst_stride)
Definition: h264idct_lasx.c:234
ff_weight_h264_pixels4_8_lasx
void ff_weight_h264_pixels4_8_lasx(uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_src, int offset)
Definition: h264dsp_lasx.c:2021
ff_h264_v_lpf_chroma_8_lasx
void ff_h264_v_lpf_chroma_8_lasx(uint8_t *src, ptrdiff_t stride, int alpha, int beta, int8_t *tc0)
Definition: h264dsp_lasx.c:474
ff_h264_idct8_dc_addblk_lasx
void ff_h264_idct8_dc_addblk_lasx(uint8_t *dst, int16_t *src, int32_t dst_stride)
Definition: h264idct_lasx.c:259
ref
static int ref[MAX_W *MAX_W]
Definition: jpeg2000dwt.c:107
ff_h264_h_lpf_chroma_intra_8_lasx
void ff_h264_h_lpf_chroma_intra_8_lasx(uint8_t *src, ptrdiff_t stride, int alpha, int beta)
Definition: h264dsp_lasx.c:880
ff_h264_idct_add16_lasx
void ff_h264_idct_add16_lasx(uint8_t *dst, const int32_t *blk_offset, int16_t *block, int32_t dst_stride, const uint8_t nzc[15 *8])
Definition: h264idct_lasx.c:304
alpha
static const int16_t alpha[]
Definition: ilbcdata.h:55
int32_t
int32_t
Definition: audioconvert.c:56
block
The exact code depends on how similar the blocks are and how related they are to the block
Definition: filter_design.txt:207
ff_h264_idct_add8_422_lasx
void ff_h264_idct_add8_422_lasx(uint8_t **dst, const int32_t *blk_offset, int16_t *block, int32_t dst_stride, const uint8_t nzc[15 *8])
Definition: h264idct_lasx.c:379
ff_h264_v_lpf_luma_intra_8_lasx
void ff_h264_v_lpf_luma_intra_8_lasx(uint8_t *src, ptrdiff_t stride, int alpha, int beta)
Definition: h264dsp_lasx.c:760
ff_weight_h264_pixels16_8_lasx
void ff_weight_h264_pixels16_8_lasx(uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_src, int offset_in)
Definition: h264dsp_lasx.c:1559