FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
h264pred_init_mips.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Shivraj Patil (Shivraj.Patil@imgtec.com)
3  * Zhou Xiaoyong <zhouxiaoyong@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 
22 #include "config.h"
23 #include "h264dsp_mips.h"
24 #include "h264pred_mips.h"
25 
26 #if HAVE_MSA
27 static av_cold void h264_pred_init_msa(H264PredContext *h, int codec_id,
28  const int bit_depth,
29  const int chroma_format_idc)
30 {
31  if (8 == bit_depth) {
32  if (chroma_format_idc == 1) {
35  }
36 
37  if (codec_id != AV_CODEC_ID_VP7 && codec_id != AV_CODEC_ID_VP8) {
38  if (chroma_format_idc == 1) {
40  }
41  }
42  if (codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP7
43  && codec_id != AV_CODEC_ID_VP8) {
44  if (chroma_format_idc == 1) {
58  }
59  } else {
60  if (codec_id == AV_CODEC_ID_VP7 || codec_id == AV_CODEC_ID_VP8) {
63  }
64  }
65 
66  if (chroma_format_idc == 1) {
68  }
69 
73 
74  switch (codec_id) {
75  case AV_CODEC_ID_SVQ3:
76  ;
77  break;
78  case AV_CODEC_ID_RV40:
79  ;
80  break;
81  case AV_CODEC_ID_VP7:
82  case AV_CODEC_ID_VP8:
85  break;
86  default:
89  break;
90  }
91 
95  }
96 }
97 #endif // #if HAVE_MSA
98 
99 #if HAVE_MMI
100 static av_cold void h264_pred_init_mmi(H264PredContext *h, int codec_id,
101  const int bit_depth, const int chroma_format_idc)
102 {
103  if (bit_depth == 8) {
104  if (chroma_format_idc == 1) {
107  } else {
110  }
111 
117 
118 #if ARCH_MIPS64
119  switch (codec_id) {
120  case AV_CODEC_ID_SVQ3:
122  break;
123  case AV_CODEC_ID_RV40:
125  break;
126  case AV_CODEC_ID_VP7:
127  case AV_CODEC_ID_VP8:
128  break;
129  default:
131  break;
132  }
133 #endif
134 
135  if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) {
136  if (chroma_format_idc == 1) {
139  }
140  }
141  }
142 }
143 #endif /* HAVE_MMI */
144 
146  int bit_depth,
147  const int chroma_format_idc)
148 {
149 #if HAVE_MSA
150  h264_pred_init_msa(h, codec_id, bit_depth, chroma_format_idc);
151 #endif // #if HAVE_MSA
152 #if HAVE_MMI
153  h264_pred_init_mmi(h, codec_id, bit_depth, chroma_format_idc);
154 #endif /* HAVE_MMI */
155 }
#define VERT_PRED8x8
Definition: h264pred.h:70
void ff_pred16x16_plane_rv40_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:989
enum AVCodecID codec_id
Definition: ffmpeg_vaapi.c:149
#define DC_128_PRED8x8
Definition: h264pred.h:76
void ff_pred16x16_plane_svq3_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:984
void ff_pred8x8_vertical_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:456
void ff_pred16x16_dc_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:99
void ff_vp8_pred8x8_127_dc_8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:705
void ff_pred8x8l_top_dc_8_mmi(uint8_t *src, int has_topleft, int has_topright, ptrdiff_t stride)
Definition: h264pred_mmi.c:157
#define HOR_PRED8x8
Definition: h264pred.h:69
void ff_pred8x8l_dc_8_mmi(uint8_t *src, int has_topleft, int has_topright, ptrdiff_t stride)
Definition: h264pred_mmi.c:244
#define PLANE_PRED8x8
Definition: h264pred.h:71
void ff_h264_intra_predict_dc_4blk_8x8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:588
void ff_h264_intra_predict_vert_dc_8x8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:598
#define av_cold
Definition: attributes.h:82
#define DC_PRED8x8
Definition: h264pred.h:68
#define TOP_DC_PRED8x8
Definition: h264pred.h:75
void ff_pred8x8_dc_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:575
void ff_h264_intra_pred_vert_8x8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:632
void ff_h264_intra_pred_horiz_16x16_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:662
void ff_h264_intra_predict_plane_16x16_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:627
void ff_pred16x16_vertical_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:30
Context for storing H.264 prediction functions.
Definition: h264pred.h:92
void(* pred8x8[4+3+4])(uint8_t *src, ptrdiff_t stride)
Definition: h264pred.h:97
void ff_pred16x16_horizontal_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:62
#define ALZHEIMER_DC_0LT_PRED8x8
Definition: h264pred.h:80
void ff_h264_intra_pred_dc_16x16_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:646
void ff_pred8x8_top_dc_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:516
void ff_h264_intra_pred_dc_left_16x16_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:669
#define ALZHEIMER_DC_L0T_PRED8x8
Definition: h264pred.h:79
void ff_pred8x8_horizontal_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:483
void ff_pred8x16_vertical_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:681
void ff_h264_intra_pred_dc_top_16x16_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:678
void ff_pred8x16_horizontal_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:713
void ff_h264_intra_pred_dc_128_8x8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:687
#define LEFT_DC_PRED8x8
Definition: h264pred.h:74
void ff_h264_intra_pred_dc_128_16x16_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:696
void ff_vp8_pred16x16_129_dc_8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:720
void ff_h264_intra_pred_horiz_8x8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:639
av_cold void ff_h264_pred_init_mips(H264PredContext *h, int codec_id, int bit_depth, const int chroma_format_idc)
void ff_h264_intra_pred_vert_16x16_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:655
void ff_pred16x16_plane_h264_8_mmi(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_mmi.c:979
#define ALZHEIMER_DC_0L0_PRED8x8
Definition: h264pred.h:82
void(* pred16x16[4+3+2])(uint8_t *src, ptrdiff_t stride)
Definition: h264pred.h:98
void ff_h264_intra_predict_mad_cow_dc_l0t_8x8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:603
Definition: vp9.h:84
void ff_h264_intra_predict_mad_cow_dc_0lt_8x8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:609
void ff_h264_intra_predict_plane_8x8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:583
static unsigned bit_depth(uint64_t mask)
Definition: af_astats.c:142
void ff_h264_intra_predict_mad_cow_dc_0l0_8x8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:621
#define ALZHEIMER_DC_L00_PRED8x8
Definition: h264pred.h:81
void ff_h264_intra_predict_hor_dc_8x8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:593
void ff_vp8_pred16x16_127_dc_8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:715
void ff_h264_intra_predict_mad_cow_dc_l00_8x8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:615
void(* pred8x8l[9+3])(uint8_t *src, int topleft, int topright, ptrdiff_t stride)
Definition: h264pred.h:95
void ff_vp8_pred8x8_129_dc_8_msa(uint8_t *src, ptrdiff_t stride)
Definition: h264pred_msa.c:710