Revision 2f770701

View differences:

libpostproc/postprocess_altivec_template.c
354 354
                                                                            0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F);
355 355

  
356 356
#define PACK_AND_STORE(i)                                       \
357
{    const vector unsigned char perms##i =                       \
357
{   const vector unsigned char perms##i =                       \
358 358
        vec_lvsr(i * stride, src2);                             \
359 359
    const vector unsigned char vf##i =                          \
360 360
        vec_packsu(vr##i, (vector signed short)zero);           \
......
372 372
    vec_st(svB##i, i * stride + 16, src2);}
373 373

  
374 374
#define PACK_AND_STORE_ALIGNED(i)                               \
375
{    const vector unsigned char vf##i =                          \
375
{   const vector unsigned char vf##i =                          \
376 376
        vec_packsu(vr##i, (vector signed short)zero);           \
377 377
    const vector unsigned char vg##i =                          \
378 378
        vec_perm(vf##i, vbT##i, permHH);                        \
......
509 509
                                                                         0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F);
510 510

  
511 511
#define STORE(i)                                                \
512
{     const vector unsigned char perms##i =                      \
512
{    const vector unsigned char perms##i =                      \
513 513
         vec_lvsr(i * stride, src2);                            \
514 514
     const vector unsigned char vg##i =                         \
515 515
         vec_perm(st##i, vbT##i, permHH);                       \
......
544 544
    dt[0] = deringThreshold;
545 545
    v_dt = vec_splat(vec_ld(0, dt), 0);
546 546

  
547
#define LOAD_LINE(i)                                                    \
548
    const vector unsigned char perm##i =                               \
549
        vec_lvsl(i * stride, srcCopy);                                 \
550
    vector unsigned char sA##i = vec_ld(i * stride, srcCopy);          \
551
    vector unsigned char sB##i = vec_ld(i * stride + 16, srcCopy);     \
547
#define LOAD_LINE(i)                                                  \
548
    const vector unsigned char perm##i =                              \
549
        vec_lvsl(i * stride, srcCopy);                                \
550
    vector unsigned char sA##i = vec_ld(i * stride, srcCopy);         \
551
    vector unsigned char sB##i = vec_ld(i * stride + 16, srcCopy);    \
552 552
    vector unsigned char src##i = vec_perm(sA##i, sB##i, perm##i)
553 553

  
554 554
    LOAD_LINE(0);
......
872 872
#undef LOAD_LINE
873 873

  
874 874
#define ACCUMULATE_DIFFS(i)                                     \
875
    vector signed short v_d##i = vec_sub(v_tempBlurredAss##i,    \
875
    vector signed short v_d##i = vec_sub(v_tempBlurredAss##i,   \
876 876
                                         v_srcAss##i);          \
877 877
    v_dp = vec_msums(v_d##i, v_d##i, v_dp);                     \
878 878
    v_sysdp = vec_msums(v_d##i, vsint16_1, v_sysdp)
......
939 939

  
940 940
#define OP(i)                                                   \
941 941
            const vector signed short v_temp##i =               \
942
                vec_mladd(v_tempBlurredAss##i,                   \
942
                vec_mladd(v_tempBlurredAss##i,                  \
943 943
                          vsint16_7, v_srcAss##i);              \
944 944
            const vector signed short v_temp2##i =              \
945 945
                vec_add(v_temp##i, vsint16_4);                  \
......
960 960

  
961 961
#define OP(i)                                                   \
962 962
            const vector signed short v_temp##i =               \
963
                vec_mladd(v_tempBlurredAss##i,                   \
963
                vec_mladd(v_tempBlurredAss##i,                  \
964 964
                          vsint16_3, v_srcAss##i);              \
965 965
            const vector signed short v_temp2##i =              \
966 966
                vec_add(v_temp##i, vsint16_2);                  \
......
1055 1055
    vector unsigned char tempO = vec_mergeh(src7, zero);
1056 1056
    vector unsigned char tempP = vec_mergel(src7, zero);
1057 1057

  
1058
    vector unsigned char temp0 = vec_mergeh(tempA, tempI);
1059
    vector unsigned char temp1 = vec_mergel(tempA, tempI);
1060
    vector unsigned char temp2 = vec_mergeh(tempB, tempJ);
1061
    vector unsigned char temp3 = vec_mergel(tempB, tempJ);
1062
    vector unsigned char temp4 = vec_mergeh(tempC, tempK);
1063
    vector unsigned char temp5 = vec_mergel(tempC, tempK);
1064
    vector unsigned char temp6 = vec_mergeh(tempD, tempL);
1065
    vector unsigned char temp7 = vec_mergel(tempD, tempL);
1066
    vector unsigned char temp8 = vec_mergeh(tempE, tempM);
1067
    vector unsigned char temp9 = vec_mergel(tempE, tempM);
1058
    vector unsigned char temp0  = vec_mergeh(tempA, tempI);
1059
    vector unsigned char temp1  = vec_mergel(tempA, tempI);
1060
    vector unsigned char temp2  = vec_mergeh(tempB, tempJ);
1061
    vector unsigned char temp3  = vec_mergel(tempB, tempJ);
1062
    vector unsigned char temp4  = vec_mergeh(tempC, tempK);
1063
    vector unsigned char temp5  = vec_mergel(tempC, tempK);
1064
    vector unsigned char temp6  = vec_mergeh(tempD, tempL);
1065
    vector unsigned char temp7  = vec_mergel(tempD, tempL);
1066
    vector unsigned char temp8  = vec_mergeh(tempE, tempM);
1067
    vector unsigned char temp9  = vec_mergel(tempE, tempM);
1068 1068
    vector unsigned char temp10 = vec_mergeh(tempF, tempN);
1069 1069
    vector unsigned char temp11 = vec_mergel(tempF, tempN);
1070 1070
    vector unsigned char temp12 = vec_mergeh(tempG, tempO);
......
1089 1089
    tempO = vec_mergeh(temp7, temp15);
1090 1090
    tempP = vec_mergel(temp7, temp15);
1091 1091

  
1092
    temp0 = vec_mergeh(tempA, tempI);
1093
    temp1 = vec_mergel(tempA, tempI);
1094
    temp2 = vec_mergeh(tempB, tempJ);
1095
    temp3 = vec_mergel(tempB, tempJ);
1096
    temp4 = vec_mergeh(tempC, tempK);
1097
    temp5 = vec_mergel(tempC, tempK);
1098
    temp6 = vec_mergeh(tempD, tempL);
1099
    temp7 = vec_mergel(tempD, tempL);
1100
    temp8 = vec_mergeh(tempE, tempM);
1101
    temp9 = vec_mergel(tempE, tempM);
1092
    temp0  = vec_mergeh(tempA, tempI);
1093
    temp1  = vec_mergel(tempA, tempI);
1094
    temp2  = vec_mergeh(tempB, tempJ);
1095
    temp3  = vec_mergel(tempB, tempJ);
1096
    temp4  = vec_mergeh(tempC, tempK);
1097
    temp5  = vec_mergel(tempC, tempK);
1098
    temp6  = vec_mergeh(tempD, tempL);
1099
    temp7  = vec_mergel(tempD, tempL);
1100
    temp8  = vec_mergeh(tempE, tempM);
1101
    temp9  = vec_mergel(tempE, tempM);
1102 1102
    temp10 = vec_mergeh(tempF, tempN);
1103 1103
    temp11 = vec_mergel(tempF, tempN);
1104 1104
    temp12 = vec_mergeh(tempG, tempO);
......
1106 1106
    temp14 = vec_mergeh(tempH, tempP);
1107 1107
    temp15 = vec_mergel(tempH, tempP);
1108 1108

  
1109
    vec_st(temp0, 0, dst);
1110
    vec_st(temp1, 16, dst);
1111
    vec_st(temp2, 32, dst);
1112
    vec_st(temp3, 48, dst);
1113
    vec_st(temp4, 64, dst);
1114
    vec_st(temp5, 80, dst);
1115
    vec_st(temp6, 96, dst);
1116
    vec_st(temp7, 112, dst);
1117
    vec_st(temp8, 128, dst);
1118
    vec_st(temp9, 144, dst);
1109
    vec_st(temp0,    0, dst);
1110
    vec_st(temp1,   16, dst);
1111
    vec_st(temp2,   32, dst);
1112
    vec_st(temp3,   48, dst);
1113
    vec_st(temp4,   64, dst);
1114
    vec_st(temp5,   80, dst);
1115
    vec_st(temp6,   96, dst);
1116
    vec_st(temp7,  112, dst);
1117
    vec_st(temp8,  128, dst);
1118
    vec_st(temp9,  144, dst);
1119 1119
    vec_st(temp10, 160, dst);
1120 1120
    vec_st(temp11, 176, dst);
1121 1121
    vec_st(temp12, 192, dst);

Also available in: Unified diff