FFmpeg
h264_intrapred_init_loongarch.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 Loongson Technology Corporation Limited
3  * Contributed by Hao Chen <chenhao@loongson.cn>
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
23 #include "libavcodec/h264pred.h"
24 #include "h264_intrapred_lasx.h"
25 
27  const int bit_depth,
28  const int chroma_format_idc)
29 {
31 
32  if (bit_depth == 8) {
33  if (have_lasx(cpu_flags)) {
34  if (chroma_format_idc <= 1) {
35  }
37  } else {
38  if (chroma_format_idc <= 1) {
39  }
40  if (codec_id == AV_CODEC_ID_SVQ3) {
42  } else if (codec_id == AV_CODEC_ID_RV40) {
44  } else {
46  }
47  }
48  }
49  }
50 }
bit_depth
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
Definition: af_astats.c:226
ff_h264_pred16x16_plane_svq3_8_lasx
void ff_h264_pred16x16_plane_svq3_8_lasx(uint8_t *src, ptrdiff_t stride)
Definition: h264_intrapred_lasx.c:114
have_lasx
#define have_lasx(flags)
Definition: cpu.h:29
h264_intrapred_lasx.h
av_get_cpu_flags
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition: cpu.c:103
cpu_flags
static atomic_int cpu_flags
Definition: cpu.c:52
av_cold
#define av_cold
Definition: attributes.h:90
codec_id
enum AVCodecID codec_id
Definition: vaapi_decode.c:388
AV_CODEC_ID_SVQ3
@ AV_CODEC_ID_SVQ3
Definition: codec_id.h:75
PLANE_PRED8x8
#define PLANE_PRED8x8
Definition: h264pred.h:71
AV_CODEC_ID_VP7
@ AV_CODEC_ID_VP7
Definition: codec_id.h:233
AV_CODEC_ID_RV40
@ AV_CODEC_ID_RV40
Definition: codec_id.h:121
h264pred.h
ff_h264_pred16x16_plane_rv40_8_lasx
void ff_h264_pred16x16_plane_rv40_8_lasx(uint8_t *src, ptrdiff_t stride)
Definition: h264_intrapred_lasx.c:106
H264PredContext
Context for storing H.264 prediction functions.
Definition: h264pred.h:94
ff_h264_pred16x16_plane_h264_8_lasx
void ff_h264_pred16x16_plane_h264_8_lasx(uint8_t *src, ptrdiff_t stride)
Definition: h264_intrapred_lasx.c:98
AV_CODEC_ID_VP8
@ AV_CODEC_ID_VP8
Definition: codec_id.h:192
h
h
Definition: vp9dsp_template.c:2038
ff_h264_pred_init_loongarch
av_cold void ff_h264_pred_init_loongarch(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc)
Definition: h264_intrapred_init_loongarch.c:26
cpu.h