Revision 86decad6 libavcodec/sparc/dsputil_vis.c

View differences:

libavcodec/sparc/dsputil_vis.c
120 120
#define TMP30           56
121 121
#define TMP32           58
122 122

  
123
static void MC_put_o_16_vis (uint8_t * dest, const uint8_t * _ref,
123
static void MC_put_o_16_vis (uint8_t * dest, const uint8_t * ref,
124 124
                             const int stride, int height)
125 125
{
126
        uint8_t *ref = (uint8_t *) _ref;
127

  
128 126
        ref = vis_alignaddr(ref);
129 127
        do {    /* 5 cycles */
130 128
                vis_ld64(ref[0], TMP0);
......
143 141
        } while (--height);
144 142
}
145 143

  
146
static void MC_put_o_8_vis (uint8_t * dest, const uint8_t * _ref,
144
static void MC_put_o_8_vis (uint8_t * dest, const uint8_t * ref,
147 145
                            const int stride, int height)
148 146
{
149
        uint8_t *ref = (uint8_t *) _ref;
150

  
151 147
        ref = vis_alignaddr(ref);
152 148
        do {    /* 4 cycles */
153 149
                vis_ld64(ref[0], TMP0);
......
164 160
}
165 161

  
166 162

  
167
static void MC_avg_o_16_vis (uint8_t * dest, const uint8_t * _ref,
163
static void MC_avg_o_16_vis (uint8_t * dest, const uint8_t * ref,
168 164
                             const int stride, int height)
169 165
{
170
        uint8_t *ref = (uint8_t *) _ref;
171 166
        int stride_8 = stride + 8;
172 167

  
173 168
        ref = vis_alignaddr(ref);
......
325 320
        vis_st64_2(TMP22, dest, 8);
326 321
}
327 322

  
328
static void MC_avg_o_8_vis (uint8_t * dest, const uint8_t * _ref,
323
static void MC_avg_o_8_vis (uint8_t * dest, const uint8_t * ref,
329 324
                            const int stride, int height)
330 325
{
331
        uint8_t *ref = (uint8_t *) _ref;
332

  
333 326
        ref = vis_alignaddr(ref);
334 327

  
335 328
        vis_ld64(ref[0], TMP0);
......
419 412
        vis_st64(TMP4, dest[0]);
420 413
}
421 414

  
422
static void MC_put_x_16_vis (uint8_t * dest, const uint8_t * _ref,
415
static void MC_put_x_16_vis (uint8_t * dest, const uint8_t * ref,
423 416
                             const int stride, int height)
424 417
{
425
        uint8_t *ref = (uint8_t *) _ref;
426 418
        unsigned long off = (unsigned long) ref & 0x7;
427 419
        unsigned long off_plus_1 = off + 1;
428 420

  
......
612 604
        vis_st64_2(TMP8, dest, 8);
613 605
}
614 606

  
615
static void MC_put_x_8_vis (uint8_t * dest, const uint8_t * _ref,
607
static void MC_put_x_8_vis (uint8_t * dest, const uint8_t * ref,
616 608
                            const int stride, int height)
617 609
{
618
        uint8_t *ref = (uint8_t *) _ref;
619 610
        unsigned long off = (unsigned long) ref & 0x7;
620 611
        unsigned long off_plus_1 = off + 1;
621 612

  
......
736 727
        dest += stride;
737 728
}
738 729

  
739
static void MC_avg_x_16_vis (uint8_t * dest, const uint8_t * _ref,
730
static void MC_avg_x_16_vis (uint8_t * dest, const uint8_t * ref,
740 731
                             const int stride, int height)
741 732
{
742
        uint8_t *ref = (uint8_t *) _ref;
743 733
        unsigned long off = (unsigned long) ref & 0x7;
744 734
        unsigned long off_plus_1 = off + 1;
745 735

  
......
827 817
        } while (--height);
828 818
}
829 819

  
830
static void MC_avg_x_8_vis (uint8_t * dest, const uint8_t * _ref,
820
static void MC_avg_x_8_vis (uint8_t * dest, const uint8_t * ref,
831 821
                            const int stride, int height)
832 822
{
833
        uint8_t *ref = (uint8_t *) _ref;
834 823
        unsigned long off = (unsigned long) ref & 0x7;
835 824
        unsigned long off_plus_1 = off + 1;
836 825
        int stride_times_2 = stride << 1;
......
993 982
        } while (--height);
994 983
}
995 984

  
996
static void MC_put_y_16_vis (uint8_t * dest, const uint8_t * _ref,
985
static void MC_put_y_16_vis (uint8_t * dest, const uint8_t * ref,
997 986
                             const int stride, int height)
998 987
{
999
        uint8_t *ref = (uint8_t *) _ref;
1000

  
1001 988
        ref = vis_alignaddr(ref);
1002 989
        vis_ld64(ref[0], TMP0);
1003 990

  
......
1149 1136
        vis_st64_2(TMP2, dest, 8);
1150 1137
}
1151 1138

  
1152
static void MC_put_y_8_vis (uint8_t * dest, const uint8_t * _ref,
1139
static void MC_put_y_8_vis (uint8_t * dest, const uint8_t * ref,
1153 1140
                            const int stride, int height)
1154 1141
{
1155
        uint8_t *ref = (uint8_t *) _ref;
1156

  
1157 1142
        ref = vis_alignaddr(ref);
1158 1143
        vis_ld64(ref[0], TMP0);
1159 1144

  
......
1241 1226
        vis_st64(DST_0, dest[0]);
1242 1227
}
1243 1228

  
1244
static void MC_avg_y_16_vis (uint8_t * dest, const uint8_t * _ref,
1229
static void MC_avg_y_16_vis (uint8_t * dest, const uint8_t * ref,
1245 1230
                             const int stride, int height)
1246 1231
{
1247
        uint8_t *ref = (uint8_t *) _ref;
1248 1232
        int stride_8 = stride + 8;
1249 1233
        int stride_16 = stride + 16;
1250 1234

  
......
1370 1354
        } while (--height);
1371 1355
}
1372 1356

  
1373
static void MC_avg_y_8_vis (uint8_t * dest, const uint8_t * _ref,
1357
static void MC_avg_y_8_vis (uint8_t * dest, const uint8_t * ref,
1374 1358
                            const int stride, int height)
1375 1359
{
1376
        uint8_t *ref = (uint8_t *) _ref;
1377 1360
        int stride_8 = stride + 8;
1378 1361

  
1379 1362
        vis_set_gsr(5 << VIS_GSR_SCALEFACT_SHIFT);
......
1450 1433
        } while (--height);
1451 1434
}
1452 1435

  
1453
static void MC_put_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
1436
static void MC_put_xy_16_vis (uint8_t * dest, const uint8_t * ref,
1454 1437
                              const int stride, int height)
1455 1438
{
1456
        uint8_t *ref = (uint8_t *) _ref;
1457 1439
        unsigned long off = (unsigned long) ref & 0x7;
1458 1440
        unsigned long off_plus_1 = off + 1;
1459 1441
        int stride_8 = stride + 8;
......
1615 1597
        } while (--height);
1616 1598
}
1617 1599

  
1618
static void MC_put_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
1600
static void MC_put_xy_8_vis (uint8_t * dest, const uint8_t * ref,
1619 1601
                             const int stride, int height)
1620 1602
{
1621
        uint8_t *ref = (uint8_t *) _ref;
1622 1603
        unsigned long off = (unsigned long) ref & 0x7;
1623 1604
        unsigned long off_plus_1 = off + 1;
1624 1605
        int stride_8 = stride + 8;
......
1720 1701
        } while (--height);
1721 1702
}
1722 1703

  
1723
static void MC_avg_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
1704
static void MC_avg_xy_16_vis (uint8_t * dest, const uint8_t * ref,
1724 1705
                              const int stride, int height)
1725 1706
{
1726
        uint8_t *ref = (uint8_t *) _ref;
1727 1707
        unsigned long off = (unsigned long) ref & 0x7;
1728 1708
        unsigned long off_plus_1 = off + 1;
1729 1709
        int stride_8 = stride + 8;
......
1917 1897
        } while (--height);
1918 1898
}
1919 1899

  
1920
static void MC_avg_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
1900
static void MC_avg_xy_8_vis (uint8_t * dest, const uint8_t * ref,
1921 1901
                             const int stride, int height)
1922 1902
{
1923
        uint8_t *ref = (uint8_t *) _ref;
1924 1903
        unsigned long off = (unsigned long) ref & 0x7;
1925 1904
        unsigned long off_plus_1 = off + 1;
1926 1905
        int stride_8 = stride + 8;
......
2061 2040
 *      fpadd16         f12, f10, f10
2062 2041
 */
2063 2042

  
2064
static void MC_put_no_round_o_16_vis (uint8_t * dest, const uint8_t * _ref,
2043
static void MC_put_no_round_o_16_vis (uint8_t * dest, const uint8_t * ref,
2065 2044
                                      const int stride, int height)
2066 2045
{
2067
        uint8_t *ref = (uint8_t *) _ref;
2068

  
2069 2046
        ref = vis_alignaddr(ref);
2070 2047
        do {    /* 5 cycles */
2071 2048
                vis_ld64(ref[0], TMP0);
......
2084 2061
        } while (--height);
2085 2062
}
2086 2063

  
2087
static void MC_put_no_round_o_8_vis (uint8_t * dest, const uint8_t * _ref,
2064
static void MC_put_no_round_o_8_vis (uint8_t * dest, const uint8_t * ref,
2088 2065
                            const int stride, int height)
2089 2066
{
2090
        uint8_t *ref = (uint8_t *) _ref;
2091

  
2092 2067
        ref = vis_alignaddr(ref);
2093 2068
        do {    /* 4 cycles */
2094 2069
                vis_ld64(ref[0], TMP0);
......
2105 2080
}
2106 2081

  
2107 2082

  
2108
static void MC_avg_no_round_o_16_vis (uint8_t * dest, const uint8_t * _ref,
2083
static void MC_avg_no_round_o_16_vis (uint8_t * dest, const uint8_t * ref,
2109 2084
                             const int stride, int height)
2110 2085
{
2111
        uint8_t *ref = (uint8_t *) _ref;
2112 2086
        int stride_8 = stride + 8;
2113 2087

  
2114 2088
        ref = vis_alignaddr(ref);
......
2266 2240
        vis_st64_2(TMP22, dest, 8);
2267 2241
}
2268 2242

  
2269
static void MC_avg_no_round_o_8_vis (uint8_t * dest, const uint8_t * _ref,
2243
static void MC_avg_no_round_o_8_vis (uint8_t * dest, const uint8_t * ref,
2270 2244
                            const int stride, int height)
2271 2245
{
2272
        uint8_t *ref = (uint8_t *) _ref;
2273

  
2274 2246
        ref = vis_alignaddr(ref);
2275 2247

  
2276 2248
        vis_ld64(ref[0], TMP0);
......
2360 2332
        vis_st64(TMP4, dest[0]);
2361 2333
}
2362 2334

  
2363
static void MC_put_no_round_x_16_vis (uint8_t * dest, const uint8_t * _ref,
2335
static void MC_put_no_round_x_16_vis (uint8_t * dest, const uint8_t * ref,
2364 2336
                             const int stride, int height)
2365 2337
{
2366
        uint8_t *ref = (uint8_t *) _ref;
2367 2338
        unsigned long off = (unsigned long) ref & 0x7;
2368 2339
        unsigned long off_plus_1 = off + 1;
2369 2340

  
......
2553 2524
        vis_st64_2(TMP8, dest, 8);
2554 2525
}
2555 2526

  
2556
static void MC_put_no_round_x_8_vis (uint8_t * dest, const uint8_t * _ref,
2527
static void MC_put_no_round_x_8_vis (uint8_t * dest, const uint8_t * ref,
2557 2528
                            const int stride, int height)
2558 2529
{
2559
        uint8_t *ref = (uint8_t *) _ref;
2560 2530
        unsigned long off = (unsigned long) ref & 0x7;
2561 2531
        unsigned long off_plus_1 = off + 1;
2562 2532

  
......
2677 2647
        dest += stride;
2678 2648
}
2679 2649

  
2680
static void MC_avg_no_round_x_16_vis (uint8_t * dest, const uint8_t * _ref,
2650
static void MC_avg_no_round_x_16_vis (uint8_t * dest, const uint8_t * ref,
2681 2651
                             const int stride, int height)
2682 2652
{
2683
        uint8_t *ref = (uint8_t *) _ref;
2684 2653
        unsigned long off = (unsigned long) ref & 0x7;
2685 2654
        unsigned long off_plus_1 = off + 1;
2686 2655

  
......
2768 2737
        } while (--height);
2769 2738
}
2770 2739

  
2771
static void MC_avg_no_round_x_8_vis (uint8_t * dest, const uint8_t * _ref,
2740
static void MC_avg_no_round_x_8_vis (uint8_t * dest, const uint8_t * ref,
2772 2741
                            const int stride, int height)
2773 2742
{
2774
        uint8_t *ref = (uint8_t *) _ref;
2775 2743
        unsigned long off = (unsigned long) ref & 0x7;
2776 2744
        unsigned long off_plus_1 = off + 1;
2777 2745
        int stride_times_2 = stride << 1;
......
2934 2902
        } while (--height);
2935 2903
}
2936 2904

  
2937
static void MC_put_no_round_y_16_vis (uint8_t * dest, const uint8_t * _ref,
2905
static void MC_put_no_round_y_16_vis (uint8_t * dest, const uint8_t * ref,
2938 2906
                             const int stride, int height)
2939 2907
{
2940
        uint8_t *ref = (uint8_t *) _ref;
2941

  
2942 2908
        ref = vis_alignaddr(ref);
2943 2909
        vis_ld64(ref[0], TMP0);
2944 2910

  
......
3090 3056
        vis_st64_2(TMP2, dest, 8);
3091 3057
}
3092 3058

  
3093
static void MC_put_no_round_y_8_vis (uint8_t * dest, const uint8_t * _ref,
3059
static void MC_put_no_round_y_8_vis (uint8_t * dest, const uint8_t * ref,
3094 3060
                            const int stride, int height)
3095 3061
{
3096
        uint8_t *ref = (uint8_t *) _ref;
3097

  
3098 3062
        ref = vis_alignaddr(ref);
3099 3063
        vis_ld64(ref[0], TMP0);
3100 3064

  
......
3182 3146
        vis_st64(DST_0, dest[0]);
3183 3147
}
3184 3148

  
3185
static void MC_avg_no_round_y_16_vis (uint8_t * dest, const uint8_t * _ref,
3149
static void MC_avg_no_round_y_16_vis (uint8_t * dest, const uint8_t * ref,
3186 3150
                             const int stride, int height)
3187 3151
{
3188
        uint8_t *ref = (uint8_t *) _ref;
3189 3152
        int stride_8 = stride + 8;
3190 3153
        int stride_16 = stride + 16;
3191 3154

  
......
3311 3274
        } while (--height);
3312 3275
}
3313 3276

  
3314
static void MC_avg_no_round_y_8_vis (uint8_t * dest, const uint8_t * _ref,
3277
static void MC_avg_no_round_y_8_vis (uint8_t * dest, const uint8_t * ref,
3315 3278
                            const int stride, int height)
3316 3279
{
3317
        uint8_t *ref = (uint8_t *) _ref;
3318 3280
        int stride_8 = stride + 8;
3319 3281

  
3320 3282
        vis_set_gsr(5 << VIS_GSR_SCALEFACT_SHIFT);
......
3391 3353
        } while (--height);
3392 3354
}
3393 3355

  
3394
static void MC_put_no_round_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
3356
static void MC_put_no_round_xy_16_vis (uint8_t * dest, const uint8_t * ref,
3395 3357
                                       const int stride, int height)
3396 3358
{
3397
        uint8_t *ref = (uint8_t *) _ref;
3398 3359
        unsigned long off = (unsigned long) ref & 0x7;
3399 3360
        unsigned long off_plus_1 = off + 1;
3400 3361
        int stride_8 = stride + 8;
......
3556 3517
        } while (--height);
3557 3518
}
3558 3519

  
3559
static void MC_put_no_round_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
3520
static void MC_put_no_round_xy_8_vis (uint8_t * dest, const uint8_t * ref,
3560 3521
                                      const int stride, int height)
3561 3522
{
3562
        uint8_t *ref = (uint8_t *) _ref;
3563 3523
        unsigned long off = (unsigned long) ref & 0x7;
3564 3524
        unsigned long off_plus_1 = off + 1;
3565 3525
        int stride_8 = stride + 8;
......
3661 3621
        } while (--height);
3662 3622
}
3663 3623

  
3664
static void MC_avg_no_round_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
3624
static void MC_avg_no_round_xy_16_vis (uint8_t * dest, const uint8_t * ref,
3665 3625
                                       const int stride, int height)
3666 3626
{
3667
        uint8_t *ref = (uint8_t *) _ref;
3668 3627
        unsigned long off = (unsigned long) ref & 0x7;
3669 3628
        unsigned long off_plus_1 = off + 1;
3670 3629
        int stride_8 = stride + 8;
......
3858 3817
        } while (--height);
3859 3818
}
3860 3819

  
3861
static void MC_avg_no_round_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
3820
static void MC_avg_no_round_xy_8_vis (uint8_t * dest, const uint8_t * ref,
3862 3821
                                      const int stride, int height)
3863 3822
{
3864
        uint8_t *ref = (uint8_t *) _ref;
3865 3823
        unsigned long off = (unsigned long) ref & 0x7;
3866 3824
        unsigned long off_plus_1 = off + 1;
3867 3825
        int stride_8 = stride + 8;

Also available in: Unified diff