Mercurial > libavcodec.hg
comparison i386/dsputil_mmx.c @ 6327:5b3e72f4bd4e libavcodec
reduce code duplication
author | lorenm |
---|---|
date | Mon, 04 Feb 2008 16:20:46 +0000 |
parents | ec49b2361300 |
children | 5969caa9190d |
comparison
equal
deleted
inserted
replaced
6326:0e5d68320488 | 6327:5b3e72f4bd4e |
---|---|
201 #include "dsputil_mmx_avg.h" | 201 #include "dsputil_mmx_avg.h" |
202 | 202 |
203 #undef DEF | 203 #undef DEF |
204 #undef PAVGB | 204 #undef PAVGB |
205 | 205 |
206 #define put_no_rnd_pixels16_mmx put_pixels16_mmx | |
207 #define put_no_rnd_pixels8_mmx put_pixels8_mmx | |
206 #define put_pixels16_mmx2 put_pixels16_mmx | 208 #define put_pixels16_mmx2 put_pixels16_mmx |
207 #define put_pixels8_mmx2 put_pixels8_mmx | 209 #define put_pixels8_mmx2 put_pixels8_mmx |
208 #define put_pixels4_mmx2 put_pixels4_mmx | 210 #define put_pixels4_mmx2 put_pixels4_mmx |
209 #define put_no_rnd_pixels16_mmx2 put_no_rnd_pixels16_mmx | 211 #define put_no_rnd_pixels16_mmx2 put_no_rnd_pixels16_mmx |
210 #define put_no_rnd_pixels8_mmx2 put_no_rnd_pixels8_mmx | 212 #define put_no_rnd_pixels8_mmx2 put_no_rnd_pixels8_mmx |
1872 ); | 1874 ); |
1873 return sum; | 1875 return sum; |
1874 } | 1876 } |
1875 | 1877 |
1876 #endif //CONFIG_ENCODERS | 1878 #endif //CONFIG_ENCODERS |
1877 | |
1878 #define put_no_rnd_pixels8_mmx(a,b,c,d) put_pixels8_mmx(a,b,c,d) | |
1879 #define put_no_rnd_pixels16_mmx(a,b,c,d) put_pixels16_mmx(a,b,c,d) | |
1880 | 1879 |
1881 #define QPEL_V_LOW(m3,m4,m5,m6, pw_20, pw_3, rnd, in0, in1, in2, in7, out, OP)\ | 1880 #define QPEL_V_LOW(m3,m4,m5,m6, pw_20, pw_3, rnd, in0, in1, in2, in7, out, OP)\ |
1882 "paddw " #m4 ", " #m3 " \n\t" /* x1 */\ | 1881 "paddw " #m4 ", " #m3 " \n\t" /* x1 */\ |
1883 "movq "MANGLE(ff_pw_20)", %%mm4 \n\t" /* 20 */\ | 1882 "movq "MANGLE(ff_pw_20)", %%mm4 \n\t" /* 20 */\ |
1884 "pmullw " #m3 ", %%mm4 \n\t" /* 20x1 */\ | 1883 "pmullw " #m3 ", %%mm4 \n\t" /* 20x1 */\ |
2596 | 2595 |
2597 #if 0 | 2596 #if 0 |
2598 static void just_return() { return; } | 2597 static void just_return() { return; } |
2599 #endif | 2598 #endif |
2600 | 2599 |
2601 #define SET_QPEL_FUNC(postfix1, postfix2) \ | |
2602 c->put_ ## postfix1 = put_ ## postfix2;\ | |
2603 c->put_no_rnd_ ## postfix1 = put_no_rnd_ ## postfix2;\ | |
2604 c->avg_ ## postfix1 = avg_ ## postfix2; | |
2605 | |
2606 static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, | 2600 static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, |
2607 int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height){ | 2601 int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height){ |
2608 const int w = 8; | 2602 const int w = 8; |
2609 const int ix = ox>>(16+shift); | 2603 const int ix = ox>>(16+shift); |
2610 const int iy = oy>>(16+shift); | 2604 const int iy = oy>>(16+shift); |
3255 c->clear_blocks = clear_blocks_mmx; | 3249 c->clear_blocks = clear_blocks_mmx; |
3256 #ifdef CONFIG_ENCODERS | 3250 #ifdef CONFIG_ENCODERS |
3257 c->pix_sum = pix_sum16_mmx; | 3251 c->pix_sum = pix_sum16_mmx; |
3258 #endif //CONFIG_ENCODERS | 3252 #endif //CONFIG_ENCODERS |
3259 | 3253 |
3260 c->put_pixels_tab[0][0] = put_pixels16_mmx; | 3254 #define SET_HPEL_FUNCS(PFX, IDX, SIZE, CPU) \ |
3261 c->put_pixels_tab[0][1] = put_pixels16_x2_mmx; | 3255 c->PFX ## _pixels_tab[IDX][0] = PFX ## _pixels ## SIZE ## _ ## CPU; \ |
3262 c->put_pixels_tab[0][2] = put_pixels16_y2_mmx; | 3256 c->PFX ## _pixels_tab[IDX][1] = PFX ## _pixels ## SIZE ## _x2_ ## CPU; \ |
3263 c->put_pixels_tab[0][3] = put_pixels16_xy2_mmx; | 3257 c->PFX ## _pixels_tab[IDX][2] = PFX ## _pixels ## SIZE ## _y2_ ## CPU; \ |
3264 | 3258 c->PFX ## _pixels_tab[IDX][3] = PFX ## _pixels ## SIZE ## _xy2_ ## CPU |
3265 c->put_no_rnd_pixels_tab[0][0] = put_pixels16_mmx; | 3259 |
3266 c->put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_mmx; | 3260 SET_HPEL_FUNCS(put, 0, 16, mmx); |
3267 c->put_no_rnd_pixels_tab[0][2] = put_no_rnd_pixels16_y2_mmx; | 3261 SET_HPEL_FUNCS(put_no_rnd, 0, 16, mmx); |
3268 c->put_no_rnd_pixels_tab[0][3] = put_no_rnd_pixels16_xy2_mmx; | 3262 SET_HPEL_FUNCS(avg, 0, 16, mmx); |
3269 | 3263 SET_HPEL_FUNCS(avg_no_rnd, 0, 16, mmx); |
3270 c->avg_pixels_tab[0][0] = avg_pixels16_mmx; | 3264 SET_HPEL_FUNCS(put, 1, 8, mmx); |
3271 c->avg_pixels_tab[0][1] = avg_pixels16_x2_mmx; | 3265 SET_HPEL_FUNCS(put_no_rnd, 1, 8, mmx); |
3272 c->avg_pixels_tab[0][2] = avg_pixels16_y2_mmx; | 3266 SET_HPEL_FUNCS(avg, 1, 8, mmx); |
3273 c->avg_pixels_tab[0][3] = avg_pixels16_xy2_mmx; | 3267 SET_HPEL_FUNCS(avg_no_rnd, 1, 8, mmx); |
3274 | |
3275 c->avg_no_rnd_pixels_tab[0][0] = avg_no_rnd_pixels16_mmx; | |
3276 c->avg_no_rnd_pixels_tab[0][1] = avg_no_rnd_pixels16_x2_mmx; | |
3277 c->avg_no_rnd_pixels_tab[0][2] = avg_no_rnd_pixels16_y2_mmx; | |
3278 c->avg_no_rnd_pixels_tab[0][3] = avg_no_rnd_pixels16_xy2_mmx; | |
3279 | |
3280 c->put_pixels_tab[1][0] = put_pixels8_mmx; | |
3281 c->put_pixels_tab[1][1] = put_pixels8_x2_mmx; | |
3282 c->put_pixels_tab[1][2] = put_pixels8_y2_mmx; | |
3283 c->put_pixels_tab[1][3] = put_pixels8_xy2_mmx; | |
3284 | |
3285 c->put_no_rnd_pixels_tab[1][0] = put_pixels8_mmx; | |
3286 c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_mmx; | |
3287 c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_mmx; | |
3288 c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_mmx; | |
3289 | |
3290 c->avg_pixels_tab[1][0] = avg_pixels8_mmx; | |
3291 c->avg_pixels_tab[1][1] = avg_pixels8_x2_mmx; | |
3292 c->avg_pixels_tab[1][2] = avg_pixels8_y2_mmx; | |
3293 c->avg_pixels_tab[1][3] = avg_pixels8_xy2_mmx; | |
3294 | |
3295 c->avg_no_rnd_pixels_tab[1][0] = avg_no_rnd_pixels8_mmx; | |
3296 c->avg_no_rnd_pixels_tab[1][1] = avg_no_rnd_pixels8_x2_mmx; | |
3297 c->avg_no_rnd_pixels_tab[1][2] = avg_no_rnd_pixels8_y2_mmx; | |
3298 c->avg_no_rnd_pixels_tab[1][3] = avg_no_rnd_pixels8_xy2_mmx; | |
3299 | 3268 |
3300 c->gmc= gmc_mmx; | 3269 c->gmc= gmc_mmx; |
3301 | 3270 |
3302 c->add_bytes= add_bytes_mmx; | 3271 c->add_bytes= add_bytes_mmx; |
3303 #ifdef CONFIG_ENCODERS | 3272 #ifdef CONFIG_ENCODERS |
3379 #ifdef CONFIG_ENCODERS | 3348 #ifdef CONFIG_ENCODERS |
3380 c->vsad[0] = vsad16_mmx2; | 3349 c->vsad[0] = vsad16_mmx2; |
3381 #endif //CONFIG_ENCODERS | 3350 #endif //CONFIG_ENCODERS |
3382 } | 3351 } |
3383 | 3352 |
3384 #if 1 | 3353 #define SET_QPEL_FUNCS(PFX, IDX, SIZE, CPU) \ |
3385 SET_QPEL_FUNC(qpel_pixels_tab[0][ 0], qpel16_mc00_mmx2) | 3354 c->PFX ## _pixels_tab[IDX][ 0] = PFX ## SIZE ## _mc00_ ## CPU; \ |
3386 SET_QPEL_FUNC(qpel_pixels_tab[0][ 1], qpel16_mc10_mmx2) | 3355 c->PFX ## _pixels_tab[IDX][ 1] = PFX ## SIZE ## _mc10_ ## CPU; \ |
3387 SET_QPEL_FUNC(qpel_pixels_tab[0][ 2], qpel16_mc20_mmx2) | 3356 c->PFX ## _pixels_tab[IDX][ 2] = PFX ## SIZE ## _mc20_ ## CPU; \ |
3388 SET_QPEL_FUNC(qpel_pixels_tab[0][ 3], qpel16_mc30_mmx2) | 3357 c->PFX ## _pixels_tab[IDX][ 3] = PFX ## SIZE ## _mc30_ ## CPU; \ |
3389 SET_QPEL_FUNC(qpel_pixels_tab[0][ 4], qpel16_mc01_mmx2) | 3358 c->PFX ## _pixels_tab[IDX][ 4] = PFX ## SIZE ## _mc01_ ## CPU; \ |
3390 SET_QPEL_FUNC(qpel_pixels_tab[0][ 5], qpel16_mc11_mmx2) | 3359 c->PFX ## _pixels_tab[IDX][ 5] = PFX ## SIZE ## _mc11_ ## CPU; \ |
3391 SET_QPEL_FUNC(qpel_pixels_tab[0][ 6], qpel16_mc21_mmx2) | 3360 c->PFX ## _pixels_tab[IDX][ 6] = PFX ## SIZE ## _mc21_ ## CPU; \ |
3392 SET_QPEL_FUNC(qpel_pixels_tab[0][ 7], qpel16_mc31_mmx2) | 3361 c->PFX ## _pixels_tab[IDX][ 7] = PFX ## SIZE ## _mc31_ ## CPU; \ |
3393 SET_QPEL_FUNC(qpel_pixels_tab[0][ 8], qpel16_mc02_mmx2) | 3362 c->PFX ## _pixels_tab[IDX][ 8] = PFX ## SIZE ## _mc02_ ## CPU; \ |
3394 SET_QPEL_FUNC(qpel_pixels_tab[0][ 9], qpel16_mc12_mmx2) | 3363 c->PFX ## _pixels_tab[IDX][ 9] = PFX ## SIZE ## _mc12_ ## CPU; \ |
3395 SET_QPEL_FUNC(qpel_pixels_tab[0][10], qpel16_mc22_mmx2) | 3364 c->PFX ## _pixels_tab[IDX][10] = PFX ## SIZE ## _mc22_ ## CPU; \ |
3396 SET_QPEL_FUNC(qpel_pixels_tab[0][11], qpel16_mc32_mmx2) | 3365 c->PFX ## _pixels_tab[IDX][11] = PFX ## SIZE ## _mc32_ ## CPU; \ |
3397 SET_QPEL_FUNC(qpel_pixels_tab[0][12], qpel16_mc03_mmx2) | 3366 c->PFX ## _pixels_tab[IDX][12] = PFX ## SIZE ## _mc03_ ## CPU; \ |
3398 SET_QPEL_FUNC(qpel_pixels_tab[0][13], qpel16_mc13_mmx2) | 3367 c->PFX ## _pixels_tab[IDX][13] = PFX ## SIZE ## _mc13_ ## CPU; \ |
3399 SET_QPEL_FUNC(qpel_pixels_tab[0][14], qpel16_mc23_mmx2) | 3368 c->PFX ## _pixels_tab[IDX][14] = PFX ## SIZE ## _mc23_ ## CPU; \ |
3400 SET_QPEL_FUNC(qpel_pixels_tab[0][15], qpel16_mc33_mmx2) | 3369 c->PFX ## _pixels_tab[IDX][15] = PFX ## SIZE ## _mc33_ ## CPU |
3401 SET_QPEL_FUNC(qpel_pixels_tab[1][ 0], qpel8_mc00_mmx2) | 3370 |
3402 SET_QPEL_FUNC(qpel_pixels_tab[1][ 1], qpel8_mc10_mmx2) | 3371 SET_QPEL_FUNCS(put_qpel, 0, 16, mmx2); |
3403 SET_QPEL_FUNC(qpel_pixels_tab[1][ 2], qpel8_mc20_mmx2) | 3372 SET_QPEL_FUNCS(put_qpel, 1, 8, mmx2); |
3404 SET_QPEL_FUNC(qpel_pixels_tab[1][ 3], qpel8_mc30_mmx2) | 3373 SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, mmx2); |
3405 SET_QPEL_FUNC(qpel_pixels_tab[1][ 4], qpel8_mc01_mmx2) | 3374 SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, mmx2); |
3406 SET_QPEL_FUNC(qpel_pixels_tab[1][ 5], qpel8_mc11_mmx2) | 3375 SET_QPEL_FUNCS(avg_qpel, 0, 16, mmx2); |
3407 SET_QPEL_FUNC(qpel_pixels_tab[1][ 6], qpel8_mc21_mmx2) | 3376 SET_QPEL_FUNCS(avg_qpel, 1, 8, mmx2); |
3408 SET_QPEL_FUNC(qpel_pixels_tab[1][ 7], qpel8_mc31_mmx2) | 3377 |
3409 SET_QPEL_FUNC(qpel_pixels_tab[1][ 8], qpel8_mc02_mmx2) | 3378 SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmx2); |
3410 SET_QPEL_FUNC(qpel_pixels_tab[1][ 9], qpel8_mc12_mmx2) | 3379 SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmx2); |
3411 SET_QPEL_FUNC(qpel_pixels_tab[1][10], qpel8_mc22_mmx2) | 3380 SET_QPEL_FUNCS(put_h264_qpel, 2, 4, mmx2); |
3412 SET_QPEL_FUNC(qpel_pixels_tab[1][11], qpel8_mc32_mmx2) | 3381 SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, mmx2); |
3413 SET_QPEL_FUNC(qpel_pixels_tab[1][12], qpel8_mc03_mmx2) | 3382 SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, mmx2); |
3414 SET_QPEL_FUNC(qpel_pixels_tab[1][13], qpel8_mc13_mmx2) | 3383 SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, mmx2); |
3415 SET_QPEL_FUNC(qpel_pixels_tab[1][14], qpel8_mc23_mmx2) | 3384 |
3416 SET_QPEL_FUNC(qpel_pixels_tab[1][15], qpel8_mc33_mmx2) | 3385 SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, mmx2); |
3417 #endif | 3386 SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, mmx2); |
3418 | 3387 SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, mmx2); |
3419 //FIXME 3dnow too | 3388 SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, mmx2); |
3420 #define dspfunc(PFX, IDX, NUM) \ | |
3421 c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_mmx2; \ | |
3422 c->PFX ## _pixels_tab[IDX][ 1] = PFX ## NUM ## _mc10_mmx2; \ | |
3423 c->PFX ## _pixels_tab[IDX][ 2] = PFX ## NUM ## _mc20_mmx2; \ | |
3424 c->PFX ## _pixels_tab[IDX][ 3] = PFX ## NUM ## _mc30_mmx2; \ | |
3425 c->PFX ## _pixels_tab[IDX][ 4] = PFX ## NUM ## _mc01_mmx2; \ | |
3426 c->PFX ## _pixels_tab[IDX][ 5] = PFX ## NUM ## _mc11_mmx2; \ | |
3427 c->PFX ## _pixels_tab[IDX][ 6] = PFX ## NUM ## _mc21_mmx2; \ | |
3428 c->PFX ## _pixels_tab[IDX][ 7] = PFX ## NUM ## _mc31_mmx2; \ | |
3429 c->PFX ## _pixels_tab[IDX][ 8] = PFX ## NUM ## _mc02_mmx2; \ | |
3430 c->PFX ## _pixels_tab[IDX][ 9] = PFX ## NUM ## _mc12_mmx2; \ | |
3431 c->PFX ## _pixels_tab[IDX][10] = PFX ## NUM ## _mc22_mmx2; \ | |
3432 c->PFX ## _pixels_tab[IDX][11] = PFX ## NUM ## _mc32_mmx2; \ | |
3433 c->PFX ## _pixels_tab[IDX][12] = PFX ## NUM ## _mc03_mmx2; \ | |
3434 c->PFX ## _pixels_tab[IDX][13] = PFX ## NUM ## _mc13_mmx2; \ | |
3435 c->PFX ## _pixels_tab[IDX][14] = PFX ## NUM ## _mc23_mmx2; \ | |
3436 c->PFX ## _pixels_tab[IDX][15] = PFX ## NUM ## _mc33_mmx2 | |
3437 | |
3438 dspfunc(put_h264_qpel, 0, 16); | |
3439 dspfunc(put_h264_qpel, 1, 8); | |
3440 dspfunc(put_h264_qpel, 2, 4); | |
3441 dspfunc(avg_h264_qpel, 0, 16); | |
3442 dspfunc(avg_h264_qpel, 1, 8); | |
3443 dspfunc(avg_h264_qpel, 2, 4); | |
3444 | |
3445 dspfunc(put_2tap_qpel, 0, 16); | |
3446 dspfunc(put_2tap_qpel, 1, 8); | |
3447 dspfunc(avg_2tap_qpel, 0, 16); | |
3448 dspfunc(avg_2tap_qpel, 1, 8); | |
3449 #undef dspfunc | |
3450 | 3389 |
3451 c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_mmx2_rnd; | 3390 c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_mmx2_rnd; |
3452 c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_mmx2; | 3391 c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_mmx2; |
3453 c->avg_h264_chroma_pixels_tab[2]= avg_h264_chroma_mc2_mmx2; | 3392 c->avg_h264_chroma_pixels_tab[2]= avg_h264_chroma_mc2_mmx2; |
3454 c->put_h264_chroma_pixels_tab[2]= put_h264_chroma_mc2_mmx2; | 3393 c->put_h264_chroma_pixels_tab[2]= put_h264_chroma_mc2_mmx2; |
3511 c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_3dnow; | 3450 c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_3dnow; |
3512 c->avg_pixels_tab[0][3] = avg_pixels16_xy2_3dnow; | 3451 c->avg_pixels_tab[0][3] = avg_pixels16_xy2_3dnow; |
3513 c->avg_pixels_tab[1][3] = avg_pixels8_xy2_3dnow; | 3452 c->avg_pixels_tab[1][3] = avg_pixels8_xy2_3dnow; |
3514 } | 3453 } |
3515 | 3454 |
3516 SET_QPEL_FUNC(qpel_pixels_tab[0][ 0], qpel16_mc00_3dnow) | 3455 SET_QPEL_FUNCS(put_qpel, 0, 16, 3dnow); |
3517 SET_QPEL_FUNC(qpel_pixels_tab[0][ 1], qpel16_mc10_3dnow) | 3456 SET_QPEL_FUNCS(put_qpel, 1, 8, 3dnow); |
3518 SET_QPEL_FUNC(qpel_pixels_tab[0][ 2], qpel16_mc20_3dnow) | 3457 SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, 3dnow); |
3519 SET_QPEL_FUNC(qpel_pixels_tab[0][ 3], qpel16_mc30_3dnow) | 3458 SET_QPEL_FUNCS(put_no_rnd_qpel, 1, 8, 3dnow); |
3520 SET_QPEL_FUNC(qpel_pixels_tab[0][ 4], qpel16_mc01_3dnow) | 3459 SET_QPEL_FUNCS(avg_qpel, 0, 16, 3dnow); |
3521 SET_QPEL_FUNC(qpel_pixels_tab[0][ 5], qpel16_mc11_3dnow) | 3460 SET_QPEL_FUNCS(avg_qpel, 1, 8, 3dnow); |
3522 SET_QPEL_FUNC(qpel_pixels_tab[0][ 6], qpel16_mc21_3dnow) | 3461 |
3523 SET_QPEL_FUNC(qpel_pixels_tab[0][ 7], qpel16_mc31_3dnow) | 3462 SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 3dnow); |
3524 SET_QPEL_FUNC(qpel_pixels_tab[0][ 8], qpel16_mc02_3dnow) | 3463 SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 3dnow); |
3525 SET_QPEL_FUNC(qpel_pixels_tab[0][ 9], qpel16_mc12_3dnow) | 3464 SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 3dnow); |
3526 SET_QPEL_FUNC(qpel_pixels_tab[0][10], qpel16_mc22_3dnow) | 3465 SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 3dnow); |
3527 SET_QPEL_FUNC(qpel_pixels_tab[0][11], qpel16_mc32_3dnow) | 3466 SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 3dnow); |
3528 SET_QPEL_FUNC(qpel_pixels_tab[0][12], qpel16_mc03_3dnow) | 3467 SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 3dnow); |
3529 SET_QPEL_FUNC(qpel_pixels_tab[0][13], qpel16_mc13_3dnow) | 3468 |
3530 SET_QPEL_FUNC(qpel_pixels_tab[0][14], qpel16_mc23_3dnow) | 3469 SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, 3dnow); |
3531 SET_QPEL_FUNC(qpel_pixels_tab[0][15], qpel16_mc33_3dnow) | 3470 SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, 3dnow); |
3532 SET_QPEL_FUNC(qpel_pixels_tab[1][ 0], qpel8_mc00_3dnow) | 3471 SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, 3dnow); |
3533 SET_QPEL_FUNC(qpel_pixels_tab[1][ 1], qpel8_mc10_3dnow) | 3472 SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, 3dnow); |
3534 SET_QPEL_FUNC(qpel_pixels_tab[1][ 2], qpel8_mc20_3dnow) | |
3535 SET_QPEL_FUNC(qpel_pixels_tab[1][ 3], qpel8_mc30_3dnow) | |
3536 SET_QPEL_FUNC(qpel_pixels_tab[1][ 4], qpel8_mc01_3dnow) | |
3537 SET_QPEL_FUNC(qpel_pixels_tab[1][ 5], qpel8_mc11_3dnow) | |
3538 SET_QPEL_FUNC(qpel_pixels_tab[1][ 6], qpel8_mc21_3dnow) | |
3539 SET_QPEL_FUNC(qpel_pixels_tab[1][ 7], qpel8_mc31_3dnow) | |
3540 SET_QPEL_FUNC(qpel_pixels_tab[1][ 8], qpel8_mc02_3dnow) | |
3541 SET_QPEL_FUNC(qpel_pixels_tab[1][ 9], qpel8_mc12_3dnow) | |
3542 SET_QPEL_FUNC(qpel_pixels_tab[1][10], qpel8_mc22_3dnow) | |
3543 SET_QPEL_FUNC(qpel_pixels_tab[1][11], qpel8_mc32_3dnow) | |
3544 SET_QPEL_FUNC(qpel_pixels_tab[1][12], qpel8_mc03_3dnow) | |
3545 SET_QPEL_FUNC(qpel_pixels_tab[1][13], qpel8_mc13_3dnow) | |
3546 SET_QPEL_FUNC(qpel_pixels_tab[1][14], qpel8_mc23_3dnow) | |
3547 SET_QPEL_FUNC(qpel_pixels_tab[1][15], qpel8_mc33_3dnow) | |
3548 | |
3549 #define dspfunc(PFX, IDX, NUM) \ | |
3550 c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_3dnow; \ | |
3551 c->PFX ## _pixels_tab[IDX][ 1] = PFX ## NUM ## _mc10_3dnow; \ | |
3552 c->PFX ## _pixels_tab[IDX][ 2] = PFX ## NUM ## _mc20_3dnow; \ | |
3553 c->PFX ## _pixels_tab[IDX][ 3] = PFX ## NUM ## _mc30_3dnow; \ | |
3554 c->PFX ## _pixels_tab[IDX][ 4] = PFX ## NUM ## _mc01_3dnow; \ | |
3555 c->PFX ## _pixels_tab[IDX][ 5] = PFX ## NUM ## _mc11_3dnow; \ | |
3556 c->PFX ## _pixels_tab[IDX][ 6] = PFX ## NUM ## _mc21_3dnow; \ | |
3557 c->PFX ## _pixels_tab[IDX][ 7] = PFX ## NUM ## _mc31_3dnow; \ | |
3558 c->PFX ## _pixels_tab[IDX][ 8] = PFX ## NUM ## _mc02_3dnow; \ | |
3559 c->PFX ## _pixels_tab[IDX][ 9] = PFX ## NUM ## _mc12_3dnow; \ | |
3560 c->PFX ## _pixels_tab[IDX][10] = PFX ## NUM ## _mc22_3dnow; \ | |
3561 c->PFX ## _pixels_tab[IDX][11] = PFX ## NUM ## _mc32_3dnow; \ | |
3562 c->PFX ## _pixels_tab[IDX][12] = PFX ## NUM ## _mc03_3dnow; \ | |
3563 c->PFX ## _pixels_tab[IDX][13] = PFX ## NUM ## _mc13_3dnow; \ | |
3564 c->PFX ## _pixels_tab[IDX][14] = PFX ## NUM ## _mc23_3dnow; \ | |
3565 c->PFX ## _pixels_tab[IDX][15] = PFX ## NUM ## _mc33_3dnow | |
3566 | |
3567 dspfunc(put_h264_qpel, 0, 16); | |
3568 dspfunc(put_h264_qpel, 1, 8); | |
3569 dspfunc(put_h264_qpel, 2, 4); | |
3570 dspfunc(avg_h264_qpel, 0, 16); | |
3571 dspfunc(avg_h264_qpel, 1, 8); | |
3572 dspfunc(avg_h264_qpel, 2, 4); | |
3573 | |
3574 dspfunc(put_2tap_qpel, 0, 16); | |
3575 dspfunc(put_2tap_qpel, 1, 8); | |
3576 dspfunc(avg_2tap_qpel, 0, 16); | |
3577 dspfunc(avg_2tap_qpel, 1, 8); | |
3578 | 3473 |
3579 c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_3dnow_rnd; | 3474 c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_3dnow_rnd; |
3580 c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_3dnow; | 3475 c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_3dnow; |
3581 } | 3476 } |
3582 | 3477 |