00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00028 #include "h264pred.h"
00029
00030 #define BIT_DEPTH 8
00031 #include "h264pred_template.c"
00032 #undef BIT_DEPTH
00033
00034 #define BIT_DEPTH 9
00035 #include "h264pred_template.c"
00036 #undef BIT_DEPTH
00037
00038 #define BIT_DEPTH 10
00039 #include "h264pred_template.c"
00040 #undef BIT_DEPTH
00041
00042 static void pred4x4_vertical_vp8_c(uint8_t *src, const uint8_t *topright, int stride){
00043 const unsigned lt = src[-1-1*stride];
00044 LOAD_TOP_EDGE
00045 LOAD_TOP_RIGHT_EDGE
00046 uint32_t v = PACK_4U8((lt + 2*t0 + t1 + 2) >> 2,
00047 (t0 + 2*t1 + t2 + 2) >> 2,
00048 (t1 + 2*t2 + t3 + 2) >> 2,
00049 (t2 + 2*t3 + t4 + 2) >> 2);
00050
00051 AV_WN32A(src+0*stride, v);
00052 AV_WN32A(src+1*stride, v);
00053 AV_WN32A(src+2*stride, v);
00054 AV_WN32A(src+3*stride, v);
00055 }
00056
00057 static void pred4x4_horizontal_vp8_c(uint8_t *src, const uint8_t *topright, int stride){
00058 const unsigned lt = src[-1-1*stride];
00059 LOAD_LEFT_EDGE
00060
00061 AV_WN32A(src+0*stride, ((lt + 2*l0 + l1 + 2) >> 2)*0x01010101);
00062 AV_WN32A(src+1*stride, ((l0 + 2*l1 + l2 + 2) >> 2)*0x01010101);
00063 AV_WN32A(src+2*stride, ((l1 + 2*l2 + l3 + 2) >> 2)*0x01010101);
00064 AV_WN32A(src+3*stride, ((l2 + 2*l3 + l3 + 2) >> 2)*0x01010101);
00065 }
00066
00067 static void pred4x4_down_left_svq3_c(uint8_t *src, const uint8_t *topright, int stride){
00068 LOAD_TOP_EDGE
00069 LOAD_LEFT_EDGE
00070 const av_unused int unu0= t0;
00071 const av_unused int unu1= l0;
00072
00073 src[0+0*stride]=(l1 + t1)>>1;
00074 src[1+0*stride]=
00075 src[0+1*stride]=(l2 + t2)>>1;
00076 src[2+0*stride]=
00077 src[1+1*stride]=
00078 src[0+2*stride]=
00079 src[3+0*stride]=
00080 src[2+1*stride]=
00081 src[1+2*stride]=
00082 src[0+3*stride]=
00083 src[3+1*stride]=
00084 src[2+2*stride]=
00085 src[1+3*stride]=
00086 src[3+2*stride]=
00087 src[2+3*stride]=
00088 src[3+3*stride]=(l3 + t3)>>1;
00089 }
00090
00091 static void pred4x4_down_left_rv40_c(uint8_t *src, const uint8_t *topright, int stride){
00092 LOAD_TOP_EDGE
00093 LOAD_TOP_RIGHT_EDGE
00094 LOAD_LEFT_EDGE
00095 LOAD_DOWN_LEFT_EDGE
00096
00097 src[0+0*stride]=(t0 + t2 + 2*t1 + 2 + l0 + l2 + 2*l1 + 2)>>3;
00098 src[1+0*stride]=
00099 src[0+1*stride]=(t1 + t3 + 2*t2 + 2 + l1 + l3 + 2*l2 + 2)>>3;
00100 src[2+0*stride]=
00101 src[1+1*stride]=
00102 src[0+2*stride]=(t2 + t4 + 2*t3 + 2 + l2 + l4 + 2*l3 + 2)>>3;
00103 src[3+0*stride]=
00104 src[2+1*stride]=
00105 src[1+2*stride]=
00106 src[0+3*stride]=(t3 + t5 + 2*t4 + 2 + l3 + l5 + 2*l4 + 2)>>3;
00107 src[3+1*stride]=
00108 src[2+2*stride]=
00109 src[1+3*stride]=(t4 + t6 + 2*t5 + 2 + l4 + l6 + 2*l5 + 2)>>3;
00110 src[3+2*stride]=
00111 src[2+3*stride]=(t5 + t7 + 2*t6 + 2 + l5 + l7 + 2*l6 + 2)>>3;
00112 src[3+3*stride]=(t6 + t7 + 1 + l6 + l7 + 1)>>2;
00113 }
00114
00115 static void pred4x4_down_left_rv40_nodown_c(uint8_t *src, const uint8_t *topright, int stride){
00116 LOAD_TOP_EDGE
00117 LOAD_TOP_RIGHT_EDGE
00118 LOAD_LEFT_EDGE
00119
00120 src[0+0*stride]=(t0 + t2 + 2*t1 + 2 + l0 + l2 + 2*l1 + 2)>>3;
00121 src[1+0*stride]=
00122 src[0+1*stride]=(t1 + t3 + 2*t2 + 2 + l1 + l3 + 2*l2 + 2)>>3;
00123 src[2+0*stride]=
00124 src[1+1*stride]=
00125 src[0+2*stride]=(t2 + t4 + 2*t3 + 2 + l2 + 3*l3 + 2)>>3;
00126 src[3+0*stride]=
00127 src[2+1*stride]=
00128 src[1+2*stride]=
00129 src[0+3*stride]=(t3 + t5 + 2*t4 + 2 + l3*4 + 2)>>3;
00130 src[3+1*stride]=
00131 src[2+2*stride]=
00132 src[1+3*stride]=(t4 + t6 + 2*t5 + 2 + l3*4 + 2)>>3;
00133 src[3+2*stride]=
00134 src[2+3*stride]=(t5 + t7 + 2*t6 + 2 + l3*4 + 2)>>3;
00135 src[3+3*stride]=(t6 + t7 + 1 + 2*l3 + 1)>>2;
00136 }
00137
00138 static void pred4x4_vertical_left_rv40(uint8_t *src, const uint8_t *topright, int stride,
00139 const int l0, const int l1, const int l2, const int l3, const int l4){
00140 LOAD_TOP_EDGE
00141 LOAD_TOP_RIGHT_EDGE
00142
00143 src[0+0*stride]=(2*t0 + 2*t1 + l1 + 2*l2 + l3 + 4)>>3;
00144 src[1+0*stride]=
00145 src[0+2*stride]=(t1 + t2 + 1)>>1;
00146 src[2+0*stride]=
00147 src[1+2*stride]=(t2 + t3 + 1)>>1;
00148 src[3+0*stride]=
00149 src[2+2*stride]=(t3 + t4+ 1)>>1;
00150 src[3+2*stride]=(t4 + t5+ 1)>>1;
00151 src[0+1*stride]=(t0 + 2*t1 + t2 + l2 + 2*l3 + l4 + 4)>>3;
00152 src[1+1*stride]=
00153 src[0+3*stride]=(t1 + 2*t2 + t3 + 2)>>2;
00154 src[2+1*stride]=
00155 src[1+3*stride]=(t2 + 2*t3 + t4 + 2)>>2;
00156 src[3+1*stride]=
00157 src[2+3*stride]=(t3 + 2*t4 + t5 + 2)>>2;
00158 src[3+3*stride]=(t4 + 2*t5 + t6 + 2)>>2;
00159 }
00160
00161 static void pred4x4_vertical_left_rv40_c(uint8_t *src, const uint8_t *topright, int stride){
00162 LOAD_LEFT_EDGE
00163 LOAD_DOWN_LEFT_EDGE
00164
00165 pred4x4_vertical_left_rv40(src, topright, stride, l0, l1, l2, l3, l4);
00166 }
00167
00168 static void pred4x4_vertical_left_rv40_nodown_c(uint8_t *src, const uint8_t *topright, int stride){
00169 LOAD_LEFT_EDGE
00170
00171 pred4x4_vertical_left_rv40(src, topright, stride, l0, l1, l2, l3, l3);
00172 }
00173
00174 static void pred4x4_vertical_left_vp8_c(uint8_t *src, const uint8_t *topright, int stride){
00175 LOAD_TOP_EDGE
00176 LOAD_TOP_RIGHT_EDGE
00177
00178 src[0+0*stride]=(t0 + t1 + 1)>>1;
00179 src[1+0*stride]=
00180 src[0+2*stride]=(t1 + t2 + 1)>>1;
00181 src[2+0*stride]=
00182 src[1+2*stride]=(t2 + t3 + 1)>>1;
00183 src[3+0*stride]=
00184 src[2+2*stride]=(t3 + t4 + 1)>>1;
00185 src[0+1*stride]=(t0 + 2*t1 + t2 + 2)>>2;
00186 src[1+1*stride]=
00187 src[0+3*stride]=(t1 + 2*t2 + t3 + 2)>>2;
00188 src[2+1*stride]=
00189 src[1+3*stride]=(t2 + 2*t3 + t4 + 2)>>2;
00190 src[3+1*stride]=
00191 src[2+3*stride]=(t3 + 2*t4 + t5 + 2)>>2;
00192 src[3+2*stride]=(t4 + 2*t5 + t6 + 2)>>2;
00193 src[3+3*stride]=(t5 + 2*t6 + t7 + 2)>>2;
00194 }
00195
00196 static void pred4x4_horizontal_up_rv40_c(uint8_t *src, const uint8_t *topright, int stride){
00197 LOAD_LEFT_EDGE
00198 LOAD_DOWN_LEFT_EDGE
00199 LOAD_TOP_EDGE
00200 LOAD_TOP_RIGHT_EDGE
00201
00202 src[0+0*stride]=(t1 + 2*t2 + t3 + 2*l0 + 2*l1 + 4)>>3;
00203 src[1+0*stride]=(t2 + 2*t3 + t4 + l0 + 2*l1 + l2 + 4)>>3;
00204 src[2+0*stride]=
00205 src[0+1*stride]=(t3 + 2*t4 + t5 + 2*l1 + 2*l2 + 4)>>3;
00206 src[3+0*stride]=
00207 src[1+1*stride]=(t4 + 2*t5 + t6 + l1 + 2*l2 + l3 + 4)>>3;
00208 src[2+1*stride]=
00209 src[0+2*stride]=(t5 + 2*t6 + t7 + 2*l2 + 2*l3 + 4)>>3;
00210 src[3+1*stride]=
00211 src[1+2*stride]=(t6 + 3*t7 + l2 + 3*l3 + 4)>>3;
00212 src[3+2*stride]=
00213 src[1+3*stride]=(l3 + 2*l4 + l5 + 2)>>2;
00214 src[0+3*stride]=
00215 src[2+2*stride]=(t6 + t7 + l3 + l4 + 2)>>2;
00216 src[2+3*stride]=(l4 + l5 + 1)>>1;
00217 src[3+3*stride]=(l4 + 2*l5 + l6 + 2)>>2;
00218 }
00219
00220 static void pred4x4_horizontal_up_rv40_nodown_c(uint8_t *src, const uint8_t *topright, int stride){
00221 LOAD_LEFT_EDGE
00222 LOAD_TOP_EDGE
00223 LOAD_TOP_RIGHT_EDGE
00224
00225 src[0+0*stride]=(t1 + 2*t2 + t3 + 2*l0 + 2*l1 + 4)>>3;
00226 src[1+0*stride]=(t2 + 2*t3 + t4 + l0 + 2*l1 + l2 + 4)>>3;
00227 src[2+0*stride]=
00228 src[0+1*stride]=(t3 + 2*t4 + t5 + 2*l1 + 2*l2 + 4)>>3;
00229 src[3+0*stride]=
00230 src[1+1*stride]=(t4 + 2*t5 + t6 + l1 + 2*l2 + l3 + 4)>>3;
00231 src[2+1*stride]=
00232 src[0+2*stride]=(t5 + 2*t6 + t7 + 2*l2 + 2*l3 + 4)>>3;
00233 src[3+1*stride]=
00234 src[1+2*stride]=(t6 + 3*t7 + l2 + 3*l3 + 4)>>3;
00235 src[3+2*stride]=
00236 src[1+3*stride]=l3;
00237 src[0+3*stride]=
00238 src[2+2*stride]=(t6 + t7 + 2*l3 + 2)>>2;
00239 src[2+3*stride]=
00240 src[3+3*stride]=l3;
00241 }
00242
00243 static void pred4x4_tm_vp8_c(uint8_t *src, const uint8_t *topright, int stride){
00244 uint8_t *cm = ff_cropTbl + MAX_NEG_CROP - src[-1-stride];
00245 uint8_t *top = src-stride;
00246 int y;
00247
00248 for (y = 0; y < 4; y++) {
00249 uint8_t *cm_in = cm + src[-1];
00250 src[0] = cm_in[top[0]];
00251 src[1] = cm_in[top[1]];
00252 src[2] = cm_in[top[2]];
00253 src[3] = cm_in[top[3]];
00254 src += stride;
00255 }
00256 }
00257
00258 static void pred16x16_plane_svq3_c(uint8_t *src, int stride){
00259 pred16x16_plane_compat_8_c(src, stride, 1, 0);
00260 }
00261
00262 static void pred16x16_plane_rv40_c(uint8_t *src, int stride){
00263 pred16x16_plane_compat_8_c(src, stride, 0, 1);
00264 }
00265
00266 static void pred16x16_tm_vp8_c(uint8_t *src, int stride){
00267 uint8_t *cm = ff_cropTbl + MAX_NEG_CROP - src[-1-stride];
00268 uint8_t *top = src-stride;
00269 int y;
00270
00271 for (y = 0; y < 16; y++) {
00272 uint8_t *cm_in = cm + src[-1];
00273 src[0] = cm_in[top[0]];
00274 src[1] = cm_in[top[1]];
00275 src[2] = cm_in[top[2]];
00276 src[3] = cm_in[top[3]];
00277 src[4] = cm_in[top[4]];
00278 src[5] = cm_in[top[5]];
00279 src[6] = cm_in[top[6]];
00280 src[7] = cm_in[top[7]];
00281 src[8] = cm_in[top[8]];
00282 src[9] = cm_in[top[9]];
00283 src[10] = cm_in[top[10]];
00284 src[11] = cm_in[top[11]];
00285 src[12] = cm_in[top[12]];
00286 src[13] = cm_in[top[13]];
00287 src[14] = cm_in[top[14]];
00288 src[15] = cm_in[top[15]];
00289 src += stride;
00290 }
00291 }
00292
00293 static void pred8x8_left_dc_rv40_c(uint8_t *src, int stride){
00294 int i;
00295 unsigned dc0;
00296
00297 dc0=0;
00298 for(i=0;i<8; i++)
00299 dc0+= src[-1+i*stride];
00300 dc0= 0x01010101*((dc0 + 4)>>3);
00301
00302 for(i=0; i<8; i++){
00303 ((uint32_t*)(src+i*stride))[0]=
00304 ((uint32_t*)(src+i*stride))[1]= dc0;
00305 }
00306 }
00307
00308 static void pred8x8_top_dc_rv40_c(uint8_t *src, int stride){
00309 int i;
00310 unsigned dc0;
00311
00312 dc0=0;
00313 for(i=0;i<8; i++)
00314 dc0+= src[i-stride];
00315 dc0= 0x01010101*((dc0 + 4)>>3);
00316
00317 for(i=0; i<8; i++){
00318 ((uint32_t*)(src+i*stride))[0]=
00319 ((uint32_t*)(src+i*stride))[1]= dc0;
00320 }
00321 }
00322
00323 static void pred8x8_dc_rv40_c(uint8_t *src, int stride){
00324 int i;
00325 unsigned dc0 = 0;
00326
00327 for(i=0;i<4; i++){
00328 dc0+= src[-1+i*stride] + src[i-stride];
00329 dc0+= src[4+i-stride];
00330 dc0+= src[-1+(i+4)*stride];
00331 }
00332 dc0= 0x01010101*((dc0 + 8)>>4);
00333
00334 for(i=0; i<4; i++){
00335 ((uint32_t*)(src+i*stride))[0]= dc0;
00336 ((uint32_t*)(src+i*stride))[1]= dc0;
00337 }
00338 for(i=4; i<8; i++){
00339 ((uint32_t*)(src+i*stride))[0]= dc0;
00340 ((uint32_t*)(src+i*stride))[1]= dc0;
00341 }
00342 }
00343
00344 static void pred8x8_tm_vp8_c(uint8_t *src, int stride){
00345 uint8_t *cm = ff_cropTbl + MAX_NEG_CROP - src[-1-stride];
00346 uint8_t *top = src-stride;
00347 int y;
00348
00349 for (y = 0; y < 8; y++) {
00350 uint8_t *cm_in = cm + src[-1];
00351 src[0] = cm_in[top[0]];
00352 src[1] = cm_in[top[1]];
00353 src[2] = cm_in[top[2]];
00354 src[3] = cm_in[top[3]];
00355 src[4] = cm_in[top[4]];
00356 src[5] = cm_in[top[5]];
00357 src[6] = cm_in[top[6]];
00358 src[7] = cm_in[top[7]];
00359 src += stride;
00360 }
00361 }
00362
00366 void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth){
00367
00368
00369 #undef FUNC
00370 #undef FUNCC
00371 #define FUNC(a, depth) a ## _ ## depth
00372 #define FUNCC(a, depth) a ## _ ## depth ## _c
00373 #define FUNCD(a) a ## _c
00374
00375 #define H264_PRED(depth) \
00376 if(codec_id != CODEC_ID_RV40){\
00377 if(codec_id == CODEC_ID_VP8) {\
00378 h->pred4x4[VERT_PRED ]= FUNCD(pred4x4_vertical_vp8);\
00379 h->pred4x4[HOR_PRED ]= FUNCD(pred4x4_horizontal_vp8);\
00380 } else {\
00381 h->pred4x4[VERT_PRED ]= FUNCC(pred4x4_vertical , depth);\
00382 h->pred4x4[HOR_PRED ]= FUNCC(pred4x4_horizontal , depth);\
00383 }\
00384 h->pred4x4[DC_PRED ]= FUNCC(pred4x4_dc , depth);\
00385 if(codec_id == CODEC_ID_SVQ3)\
00386 h->pred4x4[DIAG_DOWN_LEFT_PRED ]= FUNCD(pred4x4_down_left_svq3);\
00387 else\
00388 h->pred4x4[DIAG_DOWN_LEFT_PRED ]= FUNCC(pred4x4_down_left , depth);\
00389 h->pred4x4[DIAG_DOWN_RIGHT_PRED]= FUNCC(pred4x4_down_right , depth);\
00390 h->pred4x4[VERT_RIGHT_PRED ]= FUNCC(pred4x4_vertical_right , depth);\
00391 h->pred4x4[HOR_DOWN_PRED ]= FUNCC(pred4x4_horizontal_down , depth);\
00392 if (codec_id == CODEC_ID_VP8) {\
00393 h->pred4x4[VERT_LEFT_PRED ]= FUNCD(pred4x4_vertical_left_vp8);\
00394 } else\
00395 h->pred4x4[VERT_LEFT_PRED ]= FUNCC(pred4x4_vertical_left , depth);\
00396 h->pred4x4[HOR_UP_PRED ]= FUNCC(pred4x4_horizontal_up , depth);\
00397 if(codec_id != CODEC_ID_VP8) {\
00398 h->pred4x4[LEFT_DC_PRED ]= FUNCC(pred4x4_left_dc , depth);\
00399 h->pred4x4[TOP_DC_PRED ]= FUNCC(pred4x4_top_dc , depth);\
00400 h->pred4x4[DC_128_PRED ]= FUNCC(pred4x4_128_dc , depth);\
00401 } else {\
00402 h->pred4x4[TM_VP8_PRED ]= FUNCD(pred4x4_tm_vp8);\
00403 h->pred4x4[DC_127_PRED ]= FUNCC(pred4x4_127_dc , depth);\
00404 h->pred4x4[DC_129_PRED ]= FUNCC(pred4x4_129_dc , depth);\
00405 h->pred4x4[VERT_VP8_PRED ]= FUNCC(pred4x4_vertical , depth);\
00406 h->pred4x4[HOR_VP8_PRED ]= FUNCC(pred4x4_horizontal , depth);\
00407 }\
00408 }else{\
00409 h->pred4x4[VERT_PRED ]= FUNCC(pred4x4_vertical , depth);\
00410 h->pred4x4[HOR_PRED ]= FUNCC(pred4x4_horizontal , depth);\
00411 h->pred4x4[DC_PRED ]= FUNCC(pred4x4_dc , depth);\
00412 h->pred4x4[DIAG_DOWN_LEFT_PRED ]= FUNCD(pred4x4_down_left_rv40);\
00413 h->pred4x4[DIAG_DOWN_RIGHT_PRED]= FUNCC(pred4x4_down_right , depth);\
00414 h->pred4x4[VERT_RIGHT_PRED ]= FUNCC(pred4x4_vertical_right , depth);\
00415 h->pred4x4[HOR_DOWN_PRED ]= FUNCC(pred4x4_horizontal_down , depth);\
00416 h->pred4x4[VERT_LEFT_PRED ]= FUNCD(pred4x4_vertical_left_rv40);\
00417 h->pred4x4[HOR_UP_PRED ]= FUNCD(pred4x4_horizontal_up_rv40);\
00418 h->pred4x4[LEFT_DC_PRED ]= FUNCC(pred4x4_left_dc , depth);\
00419 h->pred4x4[TOP_DC_PRED ]= FUNCC(pred4x4_top_dc , depth);\
00420 h->pred4x4[DC_128_PRED ]= FUNCC(pred4x4_128_dc , depth);\
00421 h->pred4x4[DIAG_DOWN_LEFT_PRED_RV40_NODOWN]= FUNCD(pred4x4_down_left_rv40_nodown);\
00422 h->pred4x4[HOR_UP_PRED_RV40_NODOWN]= FUNCD(pred4x4_horizontal_up_rv40_nodown);\
00423 h->pred4x4[VERT_LEFT_PRED_RV40_NODOWN]= FUNCD(pred4x4_vertical_left_rv40_nodown);\
00424 }\
00425 \
00426 h->pred8x8l[VERT_PRED ]= FUNCC(pred8x8l_vertical , depth);\
00427 h->pred8x8l[HOR_PRED ]= FUNCC(pred8x8l_horizontal , depth);\
00428 h->pred8x8l[DC_PRED ]= FUNCC(pred8x8l_dc , depth);\
00429 h->pred8x8l[DIAG_DOWN_LEFT_PRED ]= FUNCC(pred8x8l_down_left , depth);\
00430 h->pred8x8l[DIAG_DOWN_RIGHT_PRED]= FUNCC(pred8x8l_down_right , depth);\
00431 h->pred8x8l[VERT_RIGHT_PRED ]= FUNCC(pred8x8l_vertical_right , depth);\
00432 h->pred8x8l[HOR_DOWN_PRED ]= FUNCC(pred8x8l_horizontal_down , depth);\
00433 h->pred8x8l[VERT_LEFT_PRED ]= FUNCC(pred8x8l_vertical_left , depth);\
00434 h->pred8x8l[HOR_UP_PRED ]= FUNCC(pred8x8l_horizontal_up , depth);\
00435 h->pred8x8l[LEFT_DC_PRED ]= FUNCC(pred8x8l_left_dc , depth);\
00436 h->pred8x8l[TOP_DC_PRED ]= FUNCC(pred8x8l_top_dc , depth);\
00437 h->pred8x8l[DC_128_PRED ]= FUNCC(pred8x8l_128_dc , depth);\
00438 \
00439 h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x8_vertical , depth);\
00440 h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x8_horizontal , depth);\
00441 if (codec_id != CODEC_ID_VP8) {\
00442 h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x8_plane , depth);\
00443 } else\
00444 h->pred8x8[PLANE_PRED8x8]= FUNCD(pred8x8_tm_vp8);\
00445 if(codec_id != CODEC_ID_RV40 && codec_id != CODEC_ID_VP8){\
00446 h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\
00447 h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\
00448 h->pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc , depth);\
00449 h->pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_l0t, depth);\
00450 h->pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_0lt, depth);\
00451 h->pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_l00, depth);\
00452 h->pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_0l0, depth);\
00453 }else{\
00454 h->pred8x8[DC_PRED8x8 ]= FUNCD(pred8x8_dc_rv40);\
00455 h->pred8x8[LEFT_DC_PRED8x8]= FUNCD(pred8x8_left_dc_rv40);\
00456 h->pred8x8[TOP_DC_PRED8x8 ]= FUNCD(pred8x8_top_dc_rv40);\
00457 if (codec_id == CODEC_ID_VP8) {\
00458 h->pred8x8[DC_127_PRED8x8]= FUNCC(pred8x8_127_dc , depth);\
00459 h->pred8x8[DC_129_PRED8x8]= FUNCC(pred8x8_129_dc , depth);\
00460 }\
00461 }\
00462 h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x8_128_dc , depth);\
00463 \
00464 h->pred16x16[DC_PRED8x8 ]= FUNCC(pred16x16_dc , depth);\
00465 h->pred16x16[VERT_PRED8x8 ]= FUNCC(pred16x16_vertical , depth);\
00466 h->pred16x16[HOR_PRED8x8 ]= FUNCC(pred16x16_horizontal , depth);\
00467 switch(codec_id){\
00468 case CODEC_ID_SVQ3:\
00469 h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_plane_svq3);\
00470 break;\
00471 case CODEC_ID_RV40:\
00472 h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_plane_rv40);\
00473 break;\
00474 case CODEC_ID_VP8:\
00475 h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_tm_vp8);\
00476 h->pred16x16[DC_127_PRED8x8]= FUNCC(pred16x16_127_dc , depth);\
00477 h->pred16x16[DC_129_PRED8x8]= FUNCC(pred16x16_129_dc , depth);\
00478 break;\
00479 default:\
00480 h->pred16x16[PLANE_PRED8x8 ]= FUNCC(pred16x16_plane , depth);\
00481 break;\
00482 }\
00483 h->pred16x16[LEFT_DC_PRED8x8]= FUNCC(pred16x16_left_dc , depth);\
00484 h->pred16x16[TOP_DC_PRED8x8 ]= FUNCC(pred16x16_top_dc , depth);\
00485 h->pred16x16[DC_128_PRED8x8 ]= FUNCC(pred16x16_128_dc , depth);\
00486 \
00487 \
00488 h->pred4x4_add [VERT_PRED ]= FUNCC(pred4x4_vertical_add , depth);\
00489 h->pred4x4_add [ HOR_PRED ]= FUNCC(pred4x4_horizontal_add , depth);\
00490 h->pred8x8l_add [VERT_PRED ]= FUNCC(pred8x8l_vertical_add , depth);\
00491 h->pred8x8l_add [ HOR_PRED ]= FUNCC(pred8x8l_horizontal_add , depth);\
00492 h->pred8x8_add [VERT_PRED8x8]= FUNCC(pred8x8_vertical_add , depth);\
00493 h->pred8x8_add [ HOR_PRED8x8]= FUNCC(pred8x8_horizontal_add , depth);\
00494 h->pred16x16_add[VERT_PRED8x8]= FUNCC(pred16x16_vertical_add , depth);\
00495 h->pred16x16_add[ HOR_PRED8x8]= FUNCC(pred16x16_horizontal_add , depth);\
00496
00497 switch (bit_depth) {
00498 case 9:
00499 H264_PRED(9)
00500 break;
00501 case 10:
00502 H264_PRED(10)
00503 break;
00504 default:
00505 H264_PRED(8)
00506 break;
00507 }
00508
00509 if (ARCH_ARM) ff_h264_pred_init_arm(h, codec_id, bit_depth);
00510 if (HAVE_MMX) ff_h264_pred_init_x86(h, codec_id, bit_depth);
00511 }