Revision 40d0e665 libavcodec/i386/h264dsp_mmx.c

View differences:

libavcodec/i386/h264dsp_mmx.c
86 86
        "add %1, %0             \n\t"
87 87
    STORE_DIFF_4P( %%mm4, %%mm1, %%mm7)
88 88
        : "+r"(dst)
89
        : "r" ((long)stride)
89
        : "r" ((x86_reg)stride)
90 90
    );
91 91
}
92 92

  
......
294 294
        STORE_DIFF_8P(%%xmm0, (%0,%2,2), %%xmm6, %%xmm7)
295 295
        STORE_DIFF_8P(%%xmm1, (%0,%3),   %%xmm6, %%xmm7)
296 296
        :"+r"(dst)
297
        :"r"(block), "r"((long)stride), "r"(3L*stride), "m"(ff_pw_32)
297
        :"r"(block), "r"((x86_reg)stride), "r"((x86_reg)3L*stride), "m"(ff_pw_32)
298 298
    );
299 299
}
300 300

  
......
503 503
        "movq      %%mm2, (%2)      \n\t"
504 504

  
505 505
        : "=m"(*tmp0)
506
        : "r"(pix-3*stride), "r"(pix), "r"((long)stride),
506
        : "r"(pix-3*stride), "r"(pix), "r"((x86_reg)stride),
507 507
          "m"(*tmp0/*unused*/), "m"(*(uint32_t*)tc0), "m"(alpha1), "m"(beta1),
508 508
          "m"(ff_bone)
509 509
    );
......
550 550
        "movq      %%mm1, (%0,%2)   \n\t"
551 551
        "movq      %%mm2, (%1)      \n\t"
552 552

  
553
        :: "r"(pix-2*stride), "r"(pix), "r"((long)stride),
553
        :: "r"(pix-2*stride), "r"(pix), "r"((x86_reg)stride),
554 554
           "r"(*(uint32_t*)tc0),
555 555
           "m"(alpha1), "m"(beta1), "m"(ff_bone), "m"(ff_pb_3F)
556 556
    );
......
601 601
        "paddb   %%mm6,   %%mm2     \n\t"
602 602
        "movq    %%mm1,   (%0,%2)   \n\t"
603 603
        "movq    %%mm2,   (%1)      \n\t"
604
        :: "r"(pix-2*stride), "r"(pix), "r"((long)stride),
604
        :: "r"(pix-2*stride), "r"(pix), "r"((x86_reg)stride),
605 605
           "m"(alpha1), "m"(beta1), "m"(ff_bone)
606 606
    );
607 607
}
......
797 797
        "decl %2                    \n\t"\
798 798
        " jnz 1b                    \n\t"\
799 799
        : "+a"(src), "+c"(dst), "+g"(h)\
800
        : "d"((long)srcStride), "S"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
800
        : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
801 801
        : "memory"\
802 802
    );\
803 803
}\
......
840 840
        "add %4, %1                 \n\t"\
841 841
        "add %3, %2                 \n\t"\
842 842
        : "+a"(src), "+c"(dst), "+d"(src2)\
843
        : "D"((long)src2Stride), "S"((long)dstStride)\
843
        : "D"((x86_reg)src2Stride), "S"((x86_reg)dstStride)\
844 844
        : "memory"\
845 845
    );\
846 846
    }while(--h);\
......
870 870
        QPEL_H264V(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, OP)\
871 871
         \
872 872
        : "+a"(src), "+c"(dst)\
873
        : "S"((long)srcStride), "D"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
873
        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
874 874
        : "memory"\
875 875
    );\
876 876
}\
......
902 902
            QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 3*8*3)\
903 903
             \
904 904
            : "+a"(src)\
905
            : "c"(tmp), "S"((long)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
905
            : "c"(tmp), "S"((x86_reg)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
906 906
            : "memory"\
907 907
        );\
908 908
        tmp += 4;\
......
931 931
        "decl %2                    \n\t"\
932 932
        " jnz 1b                    \n\t"\
933 933
        : "+a"(tmp), "+c"(dst), "+g"(h)\
934
        : "S"((long)dstStride)\
934
        : "S"((x86_reg)dstStride)\
935 935
        : "memory"\
936 936
    );\
937 937
}\
......
988 988
        "decl %2                    \n\t"\
989 989
        " jnz 1b                    \n\t"\
990 990
        : "+a"(src), "+c"(dst), "+g"(h)\
991
        : "d"((long)srcStride), "S"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
991
        : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
992 992
        : "memory"\
993 993
    );\
994 994
}\
......
1049 1049
        "add %4, %1                 \n\t"\
1050 1050
        "add %3, %2                 \n\t"\
1051 1051
        : "+a"(src), "+c"(dst), "+d"(src2)\
1052
        : "D"((long)src2Stride), "S"((long)dstStride),\
1052
        : "D"((x86_reg)src2Stride), "S"((x86_reg)dstStride),\
1053 1053
          "m"(ff_pw_16)\
1054 1054
        : "memory"\
1055 1055
    );\
......
1088 1088
        QPEL_H264V(%%mm1, %%mm2, %%mm3, %%mm4, %%mm5, %%mm0, OP)\
1089 1089
         \
1090 1090
        : "+a"(src), "+c"(dst)\
1091
        : "S"((long)srcStride), "D"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1091
        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1092 1092
        : "memory"\
1093 1093
     );\
1094 1094
     if(h==16){\
......
1103 1103
            QPEL_H264V(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, OP)\
1104 1104
            \
1105 1105
           : "+a"(src), "+c"(dst)\
1106
           : "S"((long)srcStride), "D"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1106
           : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1107 1107
           : "memory"\
1108 1108
        );\
1109 1109
     }\
......
1141 1141
            QPEL_H264HV(%%mm0, %%mm1, %%mm2, %%mm3, %%mm4, %%mm5, 6*48)\
1142 1142
            QPEL_H264HV(%%mm1, %%mm2, %%mm3, %%mm4, %%mm5, %%mm0, 7*48)\
1143 1143
            : "+a"(src)\
1144
            : "c"(tmp), "S"((long)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1144
            : "c"(tmp), "S"((x86_reg)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1145 1145
            : "memory"\
1146 1146
        );\
1147 1147
        if(size==16){\
......
1155 1155
                QPEL_H264HV(%%mm2, %%mm3, %%mm4, %%mm5, %%mm0, %%mm1, 14*48)\
1156 1156
                QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\
1157 1157
                : "+a"(src)\
1158
                : "c"(tmp), "S"((long)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1158
                : "c"(tmp), "S"((x86_reg)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1159 1159
                : "memory"\
1160 1160
            );\
1161 1161
        }\
......
1202 1202
        "decl %2                    \n\t"\
1203 1203
        " jnz 1b                    \n\t"\
1204 1204
        : "+a"(tmp), "+c"(dst), "+g"(h)\
1205
        : "S"((long)dstStride)\
1205
        : "S"((x86_reg)dstStride)\
1206 1206
        : "memory"\
1207 1207
    );\
1208 1208
    tmp += 8 - size*24;\
......
1275 1275
        OP(%%mm0, (%2),    %%mm4, d)\
1276 1276
        OP(%%mm1, (%2,%4), %%mm5, d)\
1277 1277
        :"+a"(src8), "+c"(src16), "+d"(dst)\
1278
        :"S"((long)src8Stride), "D"((long)dstStride)\
1278
        :"S"((x86_reg)src8Stride), "D"((x86_reg)dstStride)\
1279 1279
        :"memory");\
1280 1280
}\
1281 1281
static av_noinline void OPNAME ## pixels8_l2_shift5_ ## MMX(uint8_t *dst, int16_t *src16, uint8_t *src8, int dstStride, int src8Stride, int h)\
......
1297 1297
        OP(%%mm0, (%2), %%mm5, q)\
1298 1298
        OP(%%mm2, (%2,%4), %%mm5, q)\
1299 1299
        ::"a"(src8), "c"(src16), "d"(dst),\
1300
          "r"((long)src8Stride), "r"((long)dstStride)\
1300
          "r"((x86_reg)src8Stride), "r"((x86_reg)dstStride)\
1301 1301
        :"memory");\
1302 1302
        src8 += 2L*src8Stride;\
1303 1303
        src16 += 48;\
......
1372 1372
        "decl %3                    \n\t"\
1373 1373
        "jg 1b                      \n\t"\
1374 1374
        : "+a"(src), "+c"(dst), "+d"(src2), "+g"(h)\
1375
        : "D"((long)src2Stride), "S"((long)dstStride),\
1375
        : "D"((x86_reg)src2Stride), "S"((x86_reg)dstStride),\
1376 1376
          "m"(ff_pw_5), "m"(ff_pw_16)\
1377 1377
        : "memory"\
1378 1378
    );\
......
1430 1430
        "add %4, %1                 \n\t"\
1431 1431
        "add %3, %2                 \n\t"\
1432 1432
        : "+a"(src), "+c"(dst), "+d"(src2)\
1433
        : "D"((long)src2Stride), "S"((long)dstStride),\
1433
        : "D"((x86_reg)src2Stride), "S"((x86_reg)dstStride),\
1434 1434
          "m"(ff_pw_16)\
1435 1435
        : "memory"\
1436 1436
    );\
......
1473 1473
        "decl %2                    \n\t"\
1474 1474
        " jnz 1b                    \n\t"\
1475 1475
        : "+a"(src), "+c"(dst), "+g"(h)\
1476
        : "D"((long)srcStride), "S"((long)dstStride),\
1476
        : "D"((x86_reg)srcStride), "S"((x86_reg)dstStride),\
1477 1477
          "m"(ff_pw_5), "m"(ff_pw_16)\
1478 1478
        : "memory"\
1479 1479
    );\
......
1518 1518
        QPEL_H264V_XMM(%%xmm1, %%xmm2, %%xmm3, %%xmm4, %%xmm5, %%xmm0, OP)\
1519 1519
         \
1520 1520
        : "+a"(src), "+c"(dst)\
1521
        : "S"((long)srcStride), "D"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1521
        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1522 1522
        : "memory"\
1523 1523
    );\
1524 1524
    if(h==16){\
......
1533 1533
            QPEL_H264V_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, OP)\
1534 1534
            \
1535 1535
            : "+a"(src), "+c"(dst)\
1536
            : "S"((long)srcStride), "D"((long)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1536
            : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
1537 1537
            : "memory"\
1538 1538
        );\
1539 1539
    }\
......
1576 1576
            QPEL_H264HV_XMM(%%xmm0, %%xmm1, %%xmm2, %%xmm3, %%xmm4, %%xmm5, 6*48)
1577 1577
            QPEL_H264HV_XMM(%%xmm1, %%xmm2, %%xmm3, %%xmm4, %%xmm5, %%xmm0, 7*48)
1578 1578
            : "+a"(src)
1579
            : "c"(tmp), "S"((long)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)
1579
            : "c"(tmp), "S"((x86_reg)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)
1580 1580
            : "memory"
1581 1581
        );
1582 1582
        if(size==16){
......
1590 1590
                QPEL_H264HV_XMM(%%xmm2, %%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, 14*48)
1591 1591
                QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48)
1592 1592
                : "+a"(src)
1593
                : "c"(tmp), "S"((long)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)
1593
                : "c"(tmp), "S"((x86_reg)srcStride), "m"(ff_pw_5), "m"(ff_pw_16)
1594 1594
                : "memory"
1595 1595
            );
1596 1596
        }
......
1654 1654
            "decl %2                    \n\t"\
1655 1655
            " jnz 1b                    \n\t"\
1656 1656
            : "+a"(tmp), "+c"(dst), "+g"(h)\
1657
            : "S"((long)dstStride)\
1657
            : "S"((x86_reg)dstStride)\
1658 1658
            : "memory"\
1659 1659
        );\
1660 1660
    }else{\
......
1688 1688
            "decl %2                    \n\t"\
1689 1689
            " jnz 1b                    \n\t"\
1690 1690
            : "+a"(tmp), "+c"(dst), "+g"(h)\
1691
            : "S"((long)dstStride)\
1691
            : "S"((x86_reg)dstStride)\
1692 1692
            : "memory"\
1693 1693
        );\
1694 1694
    }\

Also available in: Unified diff