Revision c249e665 libavcodec/x86/h264_intrapred.asm
libavcodec/x86/h264_intrapred.asm | ||
---|---|---|
1375 | 1375 |
%endif |
1376 | 1376 |
|
1377 | 1377 |
;----------------------------------------------------------------------------- |
1378 |
;void pred8x8l_down_left(uint8_t *src, int has_topleft, int has_topright, int stride) |
|
1379 |
;----------------------------------------------------------------------------- |
|
1380 |
%ifdef CONFIG_GPL |
|
1381 |
%macro PRED8x8L_DOWN_LEFT 1 |
|
1382 |
cglobal pred8x8l_down_left_%1, 4,4 |
|
1383 |
sub r0, r3 |
|
1384 |
movq mm0, [r0-8] |
|
1385 |
movq mm3, [r0] |
|
1386 |
movq mm1, [r0+8] |
|
1387 |
movq mm2, mm3 |
|
1388 |
movq mm4, mm3 |
|
1389 |
PALIGNR mm2, mm0, 7, mm0 |
|
1390 |
PALIGNR mm1, mm4, 1, mm4 |
|
1391 |
test r1, r1 ; top_left |
|
1392 |
jz .fix_lt_2 |
|
1393 |
test r2, r2 ; top_right |
|
1394 |
jz .fix_tr_1 |
|
1395 |
jmp .do_top |
|
1396 |
.fix_lt_2: |
|
1397 |
movq mm5, mm3 |
|
1398 |
pxor mm5, mm2 |
|
1399 |
psllq mm5, 56 |
|
1400 |
psrlq mm5, 56 |
|
1401 |
pxor mm2, mm5 |
|
1402 |
test r2, r2 ; top_right |
|
1403 |
jnz .do_top |
|
1404 |
.fix_tr_1: |
|
1405 |
movq mm5, mm3 |
|
1406 |
pxor mm5, mm1 |
|
1407 |
psrlq mm5, 56 |
|
1408 |
psllq mm5, 56 |
|
1409 |
pxor mm1, mm5 |
|
1410 |
jmp .do_top |
|
1411 |
.fix_tr_2: |
|
1412 |
punpckhbw mm3, mm3 |
|
1413 |
pshufw mm1, mm3, 0xFF |
|
1414 |
jmp .do_topright |
|
1415 |
.do_top: |
|
1416 |
PRED4x4_LOWPASS mm4, mm2, mm1, mm3, mm5 |
|
1417 |
movq2dq xmm3, mm4 |
|
1418 |
test r2, r2 ; top_right |
|
1419 |
jz .fix_tr_2 |
|
1420 |
movq mm0, [r0+8] |
|
1421 |
movq mm5, mm0 |
|
1422 |
movq mm2, mm0 |
|
1423 |
movq mm4, mm0 |
|
1424 |
psrlq mm5, 56 |
|
1425 |
PALIGNR mm2, mm3, 7, mm3 |
|
1426 |
PALIGNR mm5, mm4, 1, mm4 |
|
1427 |
PRED4x4_LOWPASS mm1, mm2, mm5, mm0, mm4 |
|
1428 |
.do_topright: |
|
1429 |
movq2dq xmm4, mm1 |
|
1430 |
psrlq mm1, 56 |
|
1431 |
movq2dq xmm5, mm1 |
|
1432 |
lea r1, [r0+r3*2] |
|
1433 |
pslldq xmm4, 8 |
|
1434 |
por xmm3, xmm4 |
|
1435 |
movdqa xmm2, xmm3 |
|
1436 |
psrldq xmm2, 1 |
|
1437 |
pslldq xmm5, 15 |
|
1438 |
por xmm2, xmm5 |
|
1439 |
lea r2, [r1+r3*2] |
|
1440 |
movdqa xmm1, xmm3 |
|
1441 |
pslldq xmm1, 1 |
|
1442 |
INIT_XMM |
|
1443 |
PRED4x4_LOWPASS xmm0, xmm1, xmm2, xmm3, xmm4 |
|
1444 |
psrldq xmm0, 1 |
|
1445 |
movq [r0+r3*1], xmm0 |
|
1446 |
psrldq xmm0, 1 |
|
1447 |
movq [r0+r3*2], xmm0 |
|
1448 |
psrldq xmm0, 1 |
|
1449 |
lea r0, [r2+r3*2] |
|
1450 |
movq [r1+r3*1], xmm0 |
|
1451 |
psrldq xmm0, 1 |
|
1452 |
movq [r1+r3*2], xmm0 |
|
1453 |
psrldq xmm0, 1 |
|
1454 |
movq [r2+r3*1], xmm0 |
|
1455 |
psrldq xmm0, 1 |
|
1456 |
movq [r2+r3*2], xmm0 |
|
1457 |
psrldq xmm0, 1 |
|
1458 |
movq [r0+r3*1], xmm0 |
|
1459 |
psrldq xmm0, 1 |
|
1460 |
movq [r0+r3*2], xmm0 |
|
1461 |
RET |
|
1462 |
%endmacro |
|
1463 |
|
|
1464 |
INIT_MMX |
|
1465 |
%define PALIGNR PALIGNR_MMX |
|
1466 |
PRED8x8L_DOWN_LEFT sse2 |
|
1467 |
INIT_MMX |
|
1468 |
%define PALIGNR PALIGNR_SSSE3 |
|
1469 |
PRED8x8L_DOWN_LEFT ssse3 |
|
1470 |
%endif |
|
1471 |
|
|
1472 |
;----------------------------------------------------------------------------- |
|
1378 | 1473 |
; void pred4x4_dc_mmxext(uint8_t *src, const uint8_t *topright, int stride) |
1379 | 1474 |
;----------------------------------------------------------------------------- |
1380 | 1475 |
|
Also available in: Unified diff