Revision d9e68f5c libavcodec/arm/dsputil_arm_s.S

View differences:

libavcodec/arm/dsputil_arm_s.S
221 221
        stmfd sp!, {r4-r10,lr} @ R14 is also called LR
222 222
        adr r5, 5f
223 223
        ands r4, r1, #3
224
        ldr r12, [r5]
224
        ldr r12, =0xfefefefe
225 225
        add r5, r5, r4, lsl #2
226 226
        bic r1, r1, #3
227 227
        ldrne pc, [r5]
......
275 275
        bne 4b
276 276
        ldmfd sp!, {r4-r10,pc} @@ update PC with LR content.
277 277
5:
278
        .word 0xFEFEFEFE
278
        .word 1b
279 279
        .word 2b
280 280
        .word 3b
281 281
        .word 4b
......
289 289
        stmfd sp!, {r4-r10,lr} @ R14 is also called LR
290 290
        adr r5, 5f
291 291
        ands r4, r1, #3
292
        ldr r12, [r5]
292
        ldr r12, =0xfefefefe
293 293
        add r5, r5, r4, lsl #2
294 294
        bic r1, r1, #3
295 295
        ldrne pc, [r5]
......
343 343
        bne 4b
344 344
        ldmfd sp!, {r4-r10,pc} @@ update PC with LR content.
345 345
5:
346
        .word 0xFEFEFEFE
346
        .word 1b
347 347
        .word 2b
348 348
        .word 3b
349 349
        .word 4b
......
360 360
        adr r5, 5f
361 361
        ands r4, r1, #3
362 362
        mov r3, r3, lsr #1
363
        ldr r12, [r5]
363
        ldr r12, =0xfefefefe
364 364
        add r5, r5, r4, lsl #2
365 365
        bic r1, r1, #3
366 366
        ldrne pc, [r5]
......
453 453
        ldmfd sp!, {r4-r11,pc}
454 454

  
455 455
5:
456
        .word 0xFEFEFEFE
456
        .word 1b
457 457
        .word 2b
458 458
        .word 3b
459 459
        .word 4b
......
468 468
        adr r5, 5f
469 469
        ands r4, r1, #3
470 470
        mov r3, r3, lsr #1
471
        ldr r12, [r5]
471
        ldr r12, =0xfefefefe
472 472
        add r5, r5, r4, lsl #2
473 473
        bic r1, r1, #3
474 474
        ldrne pc, [r5]
......
560 560
        bne 6b
561 561
        ldmfd sp!, {r4-r11,pc}
562 562
5:
563
        .word 0xFEFEFEFE
563
        .word 1b
564 564
        .word 2b
565 565
        .word 3b
566 566
        .word 4b
567 567
        .endfunc
568 568

  
569
        .ltorg
570

  
569 571
@ ----------------------------------------------------------------
570
.macro  RND_XY2_IT align
572
.macro  RND_XY2_IT align, rnd
571 573
        @ l1=  (a & 0x03030303) + (b & 0x03030303) ?(+ 0x02020202)
572 574
        @ h1= ((a & 0xFCFCFCFCUL) >> 2) + ((b & 0xFCFCFCFCUL) >> 2)
573 575
.if \align == 0
......
590 592
.elseif \align == 3
591 593
        ADJ_ALIGN_DOUBLEWORD_D 3, r4, r5, r5, r6, r7
592 594
.endif
593
        ldr r14, [r12, #0]      @ 0x03030303
595
        ldr r14, =0x03030303
594 596
        tst r3, #1
595 597
        and r8, r4, r14
596 598
        and r9, r5, r14
597 599
        and r10, r6, r14
598 600
        and r11, r7, r14
599
        ldreq r14, [r12, #16]   @ 0x02020202/0x01010101
601
        andeq r14, r14, r14, \rnd #1
600 602
        add r8, r8, r10
601 603
        add r9, r9, r11
602 604
        addeq r8, r8, r14
603 605
        addeq r9, r9, r14
604
        ldr r14, [r12, #20]     @ 0xFCFCFCFC >> 2
606
        ldr r14, =0xfcfcfcfc >> 2
605 607
        and r4, r14, r4, lsr #2
606 608
        and r5, r14, r5, lsr #2
607 609
        and r6, r14, r6, lsr #2
......
611 613
        subs r3, r3, #1
612 614
.endm
613 615

  
614
.macro RND_XY2_EXPAND align
615
        RND_XY2_IT \align
616
.macro RND_XY2_EXPAND align, rnd
617
        RND_XY2_IT \align, \rnd
616 618
6:      stmfd sp!, {r8-r11}
617
        RND_XY2_IT \align
619
        RND_XY2_IT \align, \rnd
618 620
        ldmfd sp!, {r4-r7}
619 621
        add r4, r4, r8
620 622
        add r5, r5, r9
621 623
        add r6, r6, r10
622 624
        add r7, r7, r11
623
        ldr r14, [r12, #24]     @ 0x0F0F0F0F
625
        ldr r14, =0x0f0f0f0f
624 626
        and r4, r14, r4, lsr #2
625 627
        and r5, r14, r5, lsr #2
626 628
        add r4, r4, r6
......
643 645
        bic r1, r1, #3
644 646
        ldrne pc, [r5]
645 647
1:
646
        RND_XY2_EXPAND 0
648
        RND_XY2_EXPAND 0, lsl
647 649

  
648 650
        .align 5
649 651
2:
650
        RND_XY2_EXPAND 1
652
        RND_XY2_EXPAND 1, lsl
651 653

  
652 654
        .align 5
653 655
3:
654
        RND_XY2_EXPAND 2
656
        RND_XY2_EXPAND 2, lsl
655 657

  
656 658
        .align 5
657 659
4:
658
        RND_XY2_EXPAND 3
659

  
660
        RND_XY2_EXPAND 3, lsl
660 661
5:
661
        .word 0x03030303
662
        .word 1b
662 663
        .word 2b
663 664
        .word 3b
664 665
        .word 4b
665
        .word 0x02020202
666
        .word 0xFCFCFCFC >> 2
667
        .word 0x0F0F0F0F
668 666
        .endfunc
669 667

  
670 668
        .align 5
......
679 677
        bic r1, r1, #3
680 678
        ldrne pc, [r5]
681 679
1:
682
        RND_XY2_EXPAND 0
680
        RND_XY2_EXPAND 0, lsr
683 681

  
684 682
        .align 5
685 683
2:
686
        RND_XY2_EXPAND 1
684
        RND_XY2_EXPAND 1, lsr
687 685

  
688 686
        .align 5
689 687
3:
690
        RND_XY2_EXPAND 2
688
        RND_XY2_EXPAND 2, lsr
691 689

  
692 690
        .align 5
693 691
4:
694
        RND_XY2_EXPAND 3
695

  
692
        RND_XY2_EXPAND 3, lsr
696 693
5:
697
        .word 0x03030303
694
        .word 1b
698 695
        .word 2b
699 696
        .word 3b
700 697
        .word 4b
701
        .word 0x01010101
702
        .word 0xFCFCFCFC >> 2
703
        .word 0x0F0F0F0F
704 698
        .endfunc
705 699

  
706 700
        .align 5

Also available in: Unified diff