FFmpeg
Loading...
Searching...
No Matches
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"
25
27 const int bit_depth,
28 const int chroma_format_idc)
29{
31
32 if (bit_depth == 8) {
33 if (have_lsx(cpu_flags)) {
34 if (chroma_format_idc <= 1) {
35 }
37 } else {
38 if (chroma_format_idc <= 1) {
39 }
42 } else if (codec_id == AV_CODEC_ID_RV40) {
44 } else {
46 }
47 }
48 }
49 if (have_lasx(cpu_flags)) {
50 if (chroma_format_idc <= 1) {
51 }
53 } else {
54 if (chroma_format_idc <= 1) {
55 }
58 } else if (codec_id == AV_CODEC_ID_RV40) {
60 } else {
62 }
63 }
64 }
65 }
66}
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition af_astats.c:246
@ AV_CODEC_ID_SVQ3
Definition codec_id.h:73
@ AV_CODEC_ID_VP7
Definition codec_id.h:230
@ AV_CODEC_ID_VP8
Definition codec_id.h:190
@ AV_CODEC_ID_RV40
Definition codec_id.h:119
av_cold void ff_h264_pred_init_loongarch(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc)
void ff_h264_pred16x16_plane_svq3_8_lsx(uint8_t *src, ptrdiff_t stride)
void ff_h264_pred16x16_plane_rv40_8_lsx(uint8_t *src, ptrdiff_t stride)
void ff_h264_pred16x16_plane_h264_8_lasx(uint8_t *src, ptrdiff_t stride)
void ff_h264_pred16x16_plane_h264_8_lsx(uint8_t *src, ptrdiff_t stride)
void ff_h264_pred16x16_plane_rv40_8_lasx(uint8_t *src, ptrdiff_t stride)
void ff_h264_pred16x16_plane_svq3_8_lasx(uint8_t *src, ptrdiff_t stride)
H.264 / AVC / MPEG-4 prediction functions.
#define PLANE_PRED8x8
Definition h264pred.h:71
#define av_cold
Definition attributes.h:117
static atomic_int cpu_flags
Definition cpu.c:56
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition cpu.c:109
#define have_lsx(flags)
Definition cpu.h:28
#define have_lasx(flags)
Definition cpu.h:29
Context for storing H.264 prediction functions.
Definition h264pred.h:94
enum AVCodecID codec_id