src/audio/SDL_audiotypecvt.c
changeset 6211 b0b81f18bf35
parent 6196 f1a312da2669
child 6885 700f1b25f77f
     1.1 --- a/src/audio/SDL_audiotypecvt.c	Thu Jan 12 21:42:35 2012 -0500
     1.2 +++ b/src/audio/SDL_audiotypecvt.c	Thu Jan 12 22:54:09 2012 -0500
     1.3 @@ -7163,10 +7163,10 @@
     1.4      while (dst >= target) {
     1.5          const Sint16 sample0 = (Sint16) src[0];
     1.6          src--;
     1.7 -        dst[3] = (Uint8) sample0;
     1.8 -        dst[2] = (Uint8) (((3 * sample0) + last_sample0) >> 2);
     1.9 -        dst[1] = (Uint8) ((sample0 + last_sample0) >> 1);
    1.10 -        dst[0] = (Uint8) ((sample0 + (3 * last_sample0)) >> 2);
    1.11 +        dst[3] = (Uint8) ((sample0 + (3 * last_sample0)) >> 2);
    1.12 +        dst[2] = (Uint8) ((sample0 + last_sample0) >> 1);
    1.13 +        dst[1] = (Uint8) (((3 * sample0) + last_sample0) >> 2);
    1.14 +        dst[0] = (Uint8) sample0;
    1.15          last_sample0 = sample0;
    1.16          dst -= 4;
    1.17      }
    1.18 @@ -7282,14 +7282,14 @@
    1.19          const Sint16 sample1 = (Sint16) src[1];
    1.20          const Sint16 sample0 = (Sint16) src[0];
    1.21          src -= 2;
    1.22 -        dst[7] = (Uint8) sample1;
    1.23 -        dst[6] = (Uint8) sample0;
    1.24 -        dst[5] = (Uint8) (((3 * sample1) + last_sample1) >> 2);
    1.25 -        dst[4] = (Uint8) (((3 * sample0) + last_sample0) >> 2);
    1.26 -        dst[3] = (Uint8) ((sample1 + last_sample1) >> 1);
    1.27 -        dst[2] = (Uint8) ((sample0 + last_sample0) >> 1);
    1.28 -        dst[1] = (Uint8) ((sample1 + (3 * last_sample1)) >> 2);
    1.29 -        dst[0] = (Uint8) ((sample0 + (3 * last_sample0)) >> 2);
    1.30 +        dst[7] = (Uint8) ((sample1 + (3 * last_sample1)) >> 2);
    1.31 +        dst[6] = (Uint8) ((sample0 + (3 * last_sample0)) >> 2);
    1.32 +        dst[5] = (Uint8) ((sample1 + last_sample1) >> 1);
    1.33 +        dst[4] = (Uint8) ((sample0 + last_sample0) >> 1);
    1.34 +        dst[3] = (Uint8) (((3 * sample1) + last_sample1) >> 2);
    1.35 +        dst[2] = (Uint8) (((3 * sample0) + last_sample0) >> 2);
    1.36 +        dst[1] = (Uint8) sample1;
    1.37 +        dst[0] = (Uint8) sample0;
    1.38          last_sample1 = sample1;
    1.39          last_sample0 = sample0;
    1.40          dst -= 8;
    1.41 @@ -7432,22 +7432,22 @@
    1.42          const Sint16 sample1 = (Sint16) src[1];
    1.43          const Sint16 sample0 = (Sint16) src[0];
    1.44          src -= 4;
    1.45 -        dst[15] = (Uint8) sample3;
    1.46 -        dst[14] = (Uint8) sample2;
    1.47 -        dst[13] = (Uint8) sample1;
    1.48 -        dst[12] = (Uint8) sample0;
    1.49 -        dst[11] = (Uint8) (((3 * sample3) + last_sample3) >> 2);
    1.50 -        dst[10] = (Uint8) (((3 * sample2) + last_sample2) >> 2);
    1.51 -        dst[9] = (Uint8) (((3 * sample1) + last_sample1) >> 2);
    1.52 -        dst[8] = (Uint8) (((3 * sample0) + last_sample0) >> 2);
    1.53 -        dst[7] = (Uint8) ((sample3 + last_sample3) >> 1);
    1.54 -        dst[6] = (Uint8) ((sample2 + last_sample2) >> 1);
    1.55 -        dst[5] = (Uint8) ((sample1 + last_sample1) >> 1);
    1.56 -        dst[4] = (Uint8) ((sample0 + last_sample0) >> 1);
    1.57 -        dst[3] = (Uint8) ((sample3 + (3 * last_sample3)) >> 2);
    1.58 -        dst[2] = (Uint8) ((sample2 + (3 * last_sample2)) >> 2);
    1.59 -        dst[1] = (Uint8) ((sample1 + (3 * last_sample1)) >> 2);
    1.60 -        dst[0] = (Uint8) ((sample0 + (3 * last_sample0)) >> 2);
    1.61 +        dst[15] = (Uint8) ((sample3 + (3 * last_sample3)) >> 2);
    1.62 +        dst[14] = (Uint8) ((sample2 + (3 * last_sample2)) >> 2);
    1.63 +        dst[13] = (Uint8) ((sample1 + (3 * last_sample1)) >> 2);
    1.64 +        dst[12] = (Uint8) ((sample0 + (3 * last_sample0)) >> 2);
    1.65 +        dst[11] = (Uint8) ((sample3 + last_sample3) >> 1);
    1.66 +        dst[10] = (Uint8) ((sample2 + last_sample2) >> 1);
    1.67 +        dst[9] = (Uint8) ((sample1 + last_sample1) >> 1);
    1.68 +        dst[8] = (Uint8) ((sample0 + last_sample0) >> 1);
    1.69 +        dst[7] = (Uint8) (((3 * sample3) + last_sample3) >> 2);
    1.70 +        dst[6] = (Uint8) (((3 * sample2) + last_sample2) >> 2);
    1.71 +        dst[5] = (Uint8) (((3 * sample1) + last_sample1) >> 2);
    1.72 +        dst[4] = (Uint8) (((3 * sample0) + last_sample0) >> 2);
    1.73 +        dst[3] = (Uint8) sample3;
    1.74 +        dst[2] = (Uint8) sample2;
    1.75 +        dst[1] = (Uint8) sample1;
    1.76 +        dst[0] = (Uint8) sample0;
    1.77          last_sample3 = sample3;
    1.78          last_sample2 = sample2;
    1.79          last_sample1 = sample1;
    1.80 @@ -7622,30 +7622,30 @@
    1.81          const Sint16 sample1 = (Sint16) src[1];
    1.82          const Sint16 sample0 = (Sint16) src[0];
    1.83          src -= 6;
    1.84 -        dst[23] = (Uint8) sample5;
    1.85 -        dst[22] = (Uint8) sample4;
    1.86 -        dst[21] = (Uint8) sample3;
    1.87 -        dst[20] = (Uint8) sample2;
    1.88 -        dst[19] = (Uint8) sample1;
    1.89 -        dst[18] = (Uint8) sample0;
    1.90 -        dst[17] = (Uint8) (((3 * sample5) + last_sample5) >> 2);
    1.91 -        dst[16] = (Uint8) (((3 * sample4) + last_sample4) >> 2);
    1.92 -        dst[15] = (Uint8) (((3 * sample3) + last_sample3) >> 2);
    1.93 -        dst[14] = (Uint8) (((3 * sample2) + last_sample2) >> 2);
    1.94 -        dst[13] = (Uint8) (((3 * sample1) + last_sample1) >> 2);
    1.95 -        dst[12] = (Uint8) (((3 * sample0) + last_sample0) >> 2);
    1.96 -        dst[11] = (Uint8) ((sample5 + last_sample5) >> 1);
    1.97 -        dst[10] = (Uint8) ((sample4 + last_sample4) >> 1);
    1.98 -        dst[9] = (Uint8) ((sample3 + last_sample3) >> 1);
    1.99 -        dst[8] = (Uint8) ((sample2 + last_sample2) >> 1);
   1.100 -        dst[7] = (Uint8) ((sample1 + last_sample1) >> 1);
   1.101 -        dst[6] = (Uint8) ((sample0 + last_sample0) >> 1);
   1.102 -        dst[5] = (Uint8) ((sample5 + (3 * last_sample5)) >> 2);
   1.103 -        dst[4] = (Uint8) ((sample4 + (3 * last_sample4)) >> 2);
   1.104 -        dst[3] = (Uint8) ((sample3 + (3 * last_sample3)) >> 2);
   1.105 -        dst[2] = (Uint8) ((sample2 + (3 * last_sample2)) >> 2);
   1.106 -        dst[1] = (Uint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.107 -        dst[0] = (Uint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.108 +        dst[23] = (Uint8) ((sample5 + (3 * last_sample5)) >> 2);
   1.109 +        dst[22] = (Uint8) ((sample4 + (3 * last_sample4)) >> 2);
   1.110 +        dst[21] = (Uint8) ((sample3 + (3 * last_sample3)) >> 2);
   1.111 +        dst[20] = (Uint8) ((sample2 + (3 * last_sample2)) >> 2);
   1.112 +        dst[19] = (Uint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.113 +        dst[18] = (Uint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.114 +        dst[17] = (Uint8) ((sample5 + last_sample5) >> 1);
   1.115 +        dst[16] = (Uint8) ((sample4 + last_sample4) >> 1);
   1.116 +        dst[15] = (Uint8) ((sample3 + last_sample3) >> 1);
   1.117 +        dst[14] = (Uint8) ((sample2 + last_sample2) >> 1);
   1.118 +        dst[13] = (Uint8) ((sample1 + last_sample1) >> 1);
   1.119 +        dst[12] = (Uint8) ((sample0 + last_sample0) >> 1);
   1.120 +        dst[11] = (Uint8) (((3 * sample5) + last_sample5) >> 2);
   1.121 +        dst[10] = (Uint8) (((3 * sample4) + last_sample4) >> 2);
   1.122 +        dst[9] = (Uint8) (((3 * sample3) + last_sample3) >> 2);
   1.123 +        dst[8] = (Uint8) (((3 * sample2) + last_sample2) >> 2);
   1.124 +        dst[7] = (Uint8) (((3 * sample1) + last_sample1) >> 2);
   1.125 +        dst[6] = (Uint8) (((3 * sample0) + last_sample0) >> 2);
   1.126 +        dst[5] = (Uint8) sample5;
   1.127 +        dst[4] = (Uint8) sample4;
   1.128 +        dst[3] = (Uint8) sample3;
   1.129 +        dst[2] = (Uint8) sample2;
   1.130 +        dst[1] = (Uint8) sample1;
   1.131 +        dst[0] = (Uint8) sample0;
   1.132          last_sample5 = sample5;
   1.133          last_sample4 = sample4;
   1.134          last_sample3 = sample3;
   1.135 @@ -7852,38 +7852,38 @@
   1.136          const Sint16 sample1 = (Sint16) src[1];
   1.137          const Sint16 sample0 = (Sint16) src[0];
   1.138          src -= 8;
   1.139 -        dst[31] = (Uint8) sample7;
   1.140 -        dst[30] = (Uint8) sample6;
   1.141 -        dst[29] = (Uint8) sample5;
   1.142 -        dst[28] = (Uint8) sample4;
   1.143 -        dst[27] = (Uint8) sample3;
   1.144 -        dst[26] = (Uint8) sample2;
   1.145 -        dst[25] = (Uint8) sample1;
   1.146 -        dst[24] = (Uint8) sample0;
   1.147 -        dst[23] = (Uint8) (((3 * sample7) + last_sample7) >> 2);
   1.148 -        dst[22] = (Uint8) (((3 * sample6) + last_sample6) >> 2);
   1.149 -        dst[21] = (Uint8) (((3 * sample5) + last_sample5) >> 2);
   1.150 -        dst[20] = (Uint8) (((3 * sample4) + last_sample4) >> 2);
   1.151 -        dst[19] = (Uint8) (((3 * sample3) + last_sample3) >> 2);
   1.152 -        dst[18] = (Uint8) (((3 * sample2) + last_sample2) >> 2);
   1.153 -        dst[17] = (Uint8) (((3 * sample1) + last_sample1) >> 2);
   1.154 -        dst[16] = (Uint8) (((3 * sample0) + last_sample0) >> 2);
   1.155 -        dst[15] = (Uint8) ((sample7 + last_sample7) >> 1);
   1.156 -        dst[14] = (Uint8) ((sample6 + last_sample6) >> 1);
   1.157 -        dst[13] = (Uint8) ((sample5 + last_sample5) >> 1);
   1.158 -        dst[12] = (Uint8) ((sample4 + last_sample4) >> 1);
   1.159 -        dst[11] = (Uint8) ((sample3 + last_sample3) >> 1);
   1.160 -        dst[10] = (Uint8) ((sample2 + last_sample2) >> 1);
   1.161 -        dst[9] = (Uint8) ((sample1 + last_sample1) >> 1);
   1.162 -        dst[8] = (Uint8) ((sample0 + last_sample0) >> 1);
   1.163 -        dst[7] = (Uint8) ((sample7 + (3 * last_sample7)) >> 2);
   1.164 -        dst[6] = (Uint8) ((sample6 + (3 * last_sample6)) >> 2);
   1.165 -        dst[5] = (Uint8) ((sample5 + (3 * last_sample5)) >> 2);
   1.166 -        dst[4] = (Uint8) ((sample4 + (3 * last_sample4)) >> 2);
   1.167 -        dst[3] = (Uint8) ((sample3 + (3 * last_sample3)) >> 2);
   1.168 -        dst[2] = (Uint8) ((sample2 + (3 * last_sample2)) >> 2);
   1.169 -        dst[1] = (Uint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.170 -        dst[0] = (Uint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.171 +        dst[31] = (Uint8) ((sample7 + (3 * last_sample7)) >> 2);
   1.172 +        dst[30] = (Uint8) ((sample6 + (3 * last_sample6)) >> 2);
   1.173 +        dst[29] = (Uint8) ((sample5 + (3 * last_sample5)) >> 2);
   1.174 +        dst[28] = (Uint8) ((sample4 + (3 * last_sample4)) >> 2);
   1.175 +        dst[27] = (Uint8) ((sample3 + (3 * last_sample3)) >> 2);
   1.176 +        dst[26] = (Uint8) ((sample2 + (3 * last_sample2)) >> 2);
   1.177 +        dst[25] = (Uint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.178 +        dst[24] = (Uint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.179 +        dst[23] = (Uint8) ((sample7 + last_sample7) >> 1);
   1.180 +        dst[22] = (Uint8) ((sample6 + last_sample6) >> 1);
   1.181 +        dst[21] = (Uint8) ((sample5 + last_sample5) >> 1);
   1.182 +        dst[20] = (Uint8) ((sample4 + last_sample4) >> 1);
   1.183 +        dst[19] = (Uint8) ((sample3 + last_sample3) >> 1);
   1.184 +        dst[18] = (Uint8) ((sample2 + last_sample2) >> 1);
   1.185 +        dst[17] = (Uint8) ((sample1 + last_sample1) >> 1);
   1.186 +        dst[16] = (Uint8) ((sample0 + last_sample0) >> 1);
   1.187 +        dst[15] = (Uint8) (((3 * sample7) + last_sample7) >> 2);
   1.188 +        dst[14] = (Uint8) (((3 * sample6) + last_sample6) >> 2);
   1.189 +        dst[13] = (Uint8) (((3 * sample5) + last_sample5) >> 2);
   1.190 +        dst[12] = (Uint8) (((3 * sample4) + last_sample4) >> 2);
   1.191 +        dst[11] = (Uint8) (((3 * sample3) + last_sample3) >> 2);
   1.192 +        dst[10] = (Uint8) (((3 * sample2) + last_sample2) >> 2);
   1.193 +        dst[9] = (Uint8) (((3 * sample1) + last_sample1) >> 2);
   1.194 +        dst[8] = (Uint8) (((3 * sample0) + last_sample0) >> 2);
   1.195 +        dst[7] = (Uint8) sample7;
   1.196 +        dst[6] = (Uint8) sample6;
   1.197 +        dst[5] = (Uint8) sample5;
   1.198 +        dst[4] = (Uint8) sample4;
   1.199 +        dst[3] = (Uint8) sample3;
   1.200 +        dst[2] = (Uint8) sample2;
   1.201 +        dst[1] = (Uint8) sample1;
   1.202 +        dst[0] = (Uint8) sample0;
   1.203          last_sample7 = sample7;
   1.204          last_sample6 = sample6;
   1.205          last_sample5 = sample5;
   1.206 @@ -8023,10 +8023,10 @@
   1.207      while (dst >= target) {
   1.208          const Sint16 sample0 = (Sint16) ((Sint8) src[0]);
   1.209          src--;
   1.210 -        dst[3] = (Sint8) sample0;
   1.211 -        dst[2] = (Sint8) (((3 * sample0) + last_sample0) >> 2);
   1.212 -        dst[1] = (Sint8) ((sample0 + last_sample0) >> 1);
   1.213 -        dst[0] = (Sint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.214 +        dst[3] = (Sint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.215 +        dst[2] = (Sint8) ((sample0 + last_sample0) >> 1);
   1.216 +        dst[1] = (Sint8) (((3 * sample0) + last_sample0) >> 2);
   1.217 +        dst[0] = (Sint8) sample0;
   1.218          last_sample0 = sample0;
   1.219          dst -= 4;
   1.220      }
   1.221 @@ -8142,14 +8142,14 @@
   1.222          const Sint16 sample1 = (Sint16) ((Sint8) src[1]);
   1.223          const Sint16 sample0 = (Sint16) ((Sint8) src[0]);
   1.224          src -= 2;
   1.225 -        dst[7] = (Sint8) sample1;
   1.226 -        dst[6] = (Sint8) sample0;
   1.227 -        dst[5] = (Sint8) (((3 * sample1) + last_sample1) >> 2);
   1.228 -        dst[4] = (Sint8) (((3 * sample0) + last_sample0) >> 2);
   1.229 -        dst[3] = (Sint8) ((sample1 + last_sample1) >> 1);
   1.230 -        dst[2] = (Sint8) ((sample0 + last_sample0) >> 1);
   1.231 -        dst[1] = (Sint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.232 -        dst[0] = (Sint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.233 +        dst[7] = (Sint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.234 +        dst[6] = (Sint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.235 +        dst[5] = (Sint8) ((sample1 + last_sample1) >> 1);
   1.236 +        dst[4] = (Sint8) ((sample0 + last_sample0) >> 1);
   1.237 +        dst[3] = (Sint8) (((3 * sample1) + last_sample1) >> 2);
   1.238 +        dst[2] = (Sint8) (((3 * sample0) + last_sample0) >> 2);
   1.239 +        dst[1] = (Sint8) sample1;
   1.240 +        dst[0] = (Sint8) sample0;
   1.241          last_sample1 = sample1;
   1.242          last_sample0 = sample0;
   1.243          dst -= 8;
   1.244 @@ -8292,22 +8292,22 @@
   1.245          const Sint16 sample1 = (Sint16) ((Sint8) src[1]);
   1.246          const Sint16 sample0 = (Sint16) ((Sint8) src[0]);
   1.247          src -= 4;
   1.248 -        dst[15] = (Sint8) sample3;
   1.249 -        dst[14] = (Sint8) sample2;
   1.250 -        dst[13] = (Sint8) sample1;
   1.251 -        dst[12] = (Sint8) sample0;
   1.252 -        dst[11] = (Sint8) (((3 * sample3) + last_sample3) >> 2);
   1.253 -        dst[10] = (Sint8) (((3 * sample2) + last_sample2) >> 2);
   1.254 -        dst[9] = (Sint8) (((3 * sample1) + last_sample1) >> 2);
   1.255 -        dst[8] = (Sint8) (((3 * sample0) + last_sample0) >> 2);
   1.256 -        dst[7] = (Sint8) ((sample3 + last_sample3) >> 1);
   1.257 -        dst[6] = (Sint8) ((sample2 + last_sample2) >> 1);
   1.258 -        dst[5] = (Sint8) ((sample1 + last_sample1) >> 1);
   1.259 -        dst[4] = (Sint8) ((sample0 + last_sample0) >> 1);
   1.260 -        dst[3] = (Sint8) ((sample3 + (3 * last_sample3)) >> 2);
   1.261 -        dst[2] = (Sint8) ((sample2 + (3 * last_sample2)) >> 2);
   1.262 -        dst[1] = (Sint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.263 -        dst[0] = (Sint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.264 +        dst[15] = (Sint8) ((sample3 + (3 * last_sample3)) >> 2);
   1.265 +        dst[14] = (Sint8) ((sample2 + (3 * last_sample2)) >> 2);
   1.266 +        dst[13] = (Sint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.267 +        dst[12] = (Sint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.268 +        dst[11] = (Sint8) ((sample3 + last_sample3) >> 1);
   1.269 +        dst[10] = (Sint8) ((sample2 + last_sample2) >> 1);
   1.270 +        dst[9] = (Sint8) ((sample1 + last_sample1) >> 1);
   1.271 +        dst[8] = (Sint8) ((sample0 + last_sample0) >> 1);
   1.272 +        dst[7] = (Sint8) (((3 * sample3) + last_sample3) >> 2);
   1.273 +        dst[6] = (Sint8) (((3 * sample2) + last_sample2) >> 2);
   1.274 +        dst[5] = (Sint8) (((3 * sample1) + last_sample1) >> 2);
   1.275 +        dst[4] = (Sint8) (((3 * sample0) + last_sample0) >> 2);
   1.276 +        dst[3] = (Sint8) sample3;
   1.277 +        dst[2] = (Sint8) sample2;
   1.278 +        dst[1] = (Sint8) sample1;
   1.279 +        dst[0] = (Sint8) sample0;
   1.280          last_sample3 = sample3;
   1.281          last_sample2 = sample2;
   1.282          last_sample1 = sample1;
   1.283 @@ -8482,30 +8482,30 @@
   1.284          const Sint16 sample1 = (Sint16) ((Sint8) src[1]);
   1.285          const Sint16 sample0 = (Sint16) ((Sint8) src[0]);
   1.286          src -= 6;
   1.287 -        dst[23] = (Sint8) sample5;
   1.288 -        dst[22] = (Sint8) sample4;
   1.289 -        dst[21] = (Sint8) sample3;
   1.290 -        dst[20] = (Sint8) sample2;
   1.291 -        dst[19] = (Sint8) sample1;
   1.292 -        dst[18] = (Sint8) sample0;
   1.293 -        dst[17] = (Sint8) (((3 * sample5) + last_sample5) >> 2);
   1.294 -        dst[16] = (Sint8) (((3 * sample4) + last_sample4) >> 2);
   1.295 -        dst[15] = (Sint8) (((3 * sample3) + last_sample3) >> 2);
   1.296 -        dst[14] = (Sint8) (((3 * sample2) + last_sample2) >> 2);
   1.297 -        dst[13] = (Sint8) (((3 * sample1) + last_sample1) >> 2);
   1.298 -        dst[12] = (Sint8) (((3 * sample0) + last_sample0) >> 2);
   1.299 -        dst[11] = (Sint8) ((sample5 + last_sample5) >> 1);
   1.300 -        dst[10] = (Sint8) ((sample4 + last_sample4) >> 1);
   1.301 -        dst[9] = (Sint8) ((sample3 + last_sample3) >> 1);
   1.302 -        dst[8] = (Sint8) ((sample2 + last_sample2) >> 1);
   1.303 -        dst[7] = (Sint8) ((sample1 + last_sample1) >> 1);
   1.304 -        dst[6] = (Sint8) ((sample0 + last_sample0) >> 1);
   1.305 -        dst[5] = (Sint8) ((sample5 + (3 * last_sample5)) >> 2);
   1.306 -        dst[4] = (Sint8) ((sample4 + (3 * last_sample4)) >> 2);
   1.307 -        dst[3] = (Sint8) ((sample3 + (3 * last_sample3)) >> 2);
   1.308 -        dst[2] = (Sint8) ((sample2 + (3 * last_sample2)) >> 2);
   1.309 -        dst[1] = (Sint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.310 -        dst[0] = (Sint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.311 +        dst[23] = (Sint8) ((sample5 + (3 * last_sample5)) >> 2);
   1.312 +        dst[22] = (Sint8) ((sample4 + (3 * last_sample4)) >> 2);
   1.313 +        dst[21] = (Sint8) ((sample3 + (3 * last_sample3)) >> 2);
   1.314 +        dst[20] = (Sint8) ((sample2 + (3 * last_sample2)) >> 2);
   1.315 +        dst[19] = (Sint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.316 +        dst[18] = (Sint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.317 +        dst[17] = (Sint8) ((sample5 + last_sample5) >> 1);
   1.318 +        dst[16] = (Sint8) ((sample4 + last_sample4) >> 1);
   1.319 +        dst[15] = (Sint8) ((sample3 + last_sample3) >> 1);
   1.320 +        dst[14] = (Sint8) ((sample2 + last_sample2) >> 1);
   1.321 +        dst[13] = (Sint8) ((sample1 + last_sample1) >> 1);
   1.322 +        dst[12] = (Sint8) ((sample0 + last_sample0) >> 1);
   1.323 +        dst[11] = (Sint8) (((3 * sample5) + last_sample5) >> 2);
   1.324 +        dst[10] = (Sint8) (((3 * sample4) + last_sample4) >> 2);
   1.325 +        dst[9] = (Sint8) (((3 * sample3) + last_sample3) >> 2);
   1.326 +        dst[8] = (Sint8) (((3 * sample2) + last_sample2) >> 2);
   1.327 +        dst[7] = (Sint8) (((3 * sample1) + last_sample1) >> 2);
   1.328 +        dst[6] = (Sint8) (((3 * sample0) + last_sample0) >> 2);
   1.329 +        dst[5] = (Sint8) sample5;
   1.330 +        dst[4] = (Sint8) sample4;
   1.331 +        dst[3] = (Sint8) sample3;
   1.332 +        dst[2] = (Sint8) sample2;
   1.333 +        dst[1] = (Sint8) sample1;
   1.334 +        dst[0] = (Sint8) sample0;
   1.335          last_sample5 = sample5;
   1.336          last_sample4 = sample4;
   1.337          last_sample3 = sample3;
   1.338 @@ -8712,38 +8712,38 @@
   1.339          const Sint16 sample1 = (Sint16) ((Sint8) src[1]);
   1.340          const Sint16 sample0 = (Sint16) ((Sint8) src[0]);
   1.341          src -= 8;
   1.342 -        dst[31] = (Sint8) sample7;
   1.343 -        dst[30] = (Sint8) sample6;
   1.344 -        dst[29] = (Sint8) sample5;
   1.345 -        dst[28] = (Sint8) sample4;
   1.346 -        dst[27] = (Sint8) sample3;
   1.347 -        dst[26] = (Sint8) sample2;
   1.348 -        dst[25] = (Sint8) sample1;
   1.349 -        dst[24] = (Sint8) sample0;
   1.350 -        dst[23] = (Sint8) (((3 * sample7) + last_sample7) >> 2);
   1.351 -        dst[22] = (Sint8) (((3 * sample6) + last_sample6) >> 2);
   1.352 -        dst[21] = (Sint8) (((3 * sample5) + last_sample5) >> 2);
   1.353 -        dst[20] = (Sint8) (((3 * sample4) + last_sample4) >> 2);
   1.354 -        dst[19] = (Sint8) (((3 * sample3) + last_sample3) >> 2);
   1.355 -        dst[18] = (Sint8) (((3 * sample2) + last_sample2) >> 2);
   1.356 -        dst[17] = (Sint8) (((3 * sample1) + last_sample1) >> 2);
   1.357 -        dst[16] = (Sint8) (((3 * sample0) + last_sample0) >> 2);
   1.358 -        dst[15] = (Sint8) ((sample7 + last_sample7) >> 1);
   1.359 -        dst[14] = (Sint8) ((sample6 + last_sample6) >> 1);
   1.360 -        dst[13] = (Sint8) ((sample5 + last_sample5) >> 1);
   1.361 -        dst[12] = (Sint8) ((sample4 + last_sample4) >> 1);
   1.362 -        dst[11] = (Sint8) ((sample3 + last_sample3) >> 1);
   1.363 -        dst[10] = (Sint8) ((sample2 + last_sample2) >> 1);
   1.364 -        dst[9] = (Sint8) ((sample1 + last_sample1) >> 1);
   1.365 -        dst[8] = (Sint8) ((sample0 + last_sample0) >> 1);
   1.366 -        dst[7] = (Sint8) ((sample7 + (3 * last_sample7)) >> 2);
   1.367 -        dst[6] = (Sint8) ((sample6 + (3 * last_sample6)) >> 2);
   1.368 -        dst[5] = (Sint8) ((sample5 + (3 * last_sample5)) >> 2);
   1.369 -        dst[4] = (Sint8) ((sample4 + (3 * last_sample4)) >> 2);
   1.370 -        dst[3] = (Sint8) ((sample3 + (3 * last_sample3)) >> 2);
   1.371 -        dst[2] = (Sint8) ((sample2 + (3 * last_sample2)) >> 2);
   1.372 -        dst[1] = (Sint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.373 -        dst[0] = (Sint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.374 +        dst[31] = (Sint8) ((sample7 + (3 * last_sample7)) >> 2);
   1.375 +        dst[30] = (Sint8) ((sample6 + (3 * last_sample6)) >> 2);
   1.376 +        dst[29] = (Sint8) ((sample5 + (3 * last_sample5)) >> 2);
   1.377 +        dst[28] = (Sint8) ((sample4 + (3 * last_sample4)) >> 2);
   1.378 +        dst[27] = (Sint8) ((sample3 + (3 * last_sample3)) >> 2);
   1.379 +        dst[26] = (Sint8) ((sample2 + (3 * last_sample2)) >> 2);
   1.380 +        dst[25] = (Sint8) ((sample1 + (3 * last_sample1)) >> 2);
   1.381 +        dst[24] = (Sint8) ((sample0 + (3 * last_sample0)) >> 2);
   1.382 +        dst[23] = (Sint8) ((sample7 + last_sample7) >> 1);
   1.383 +        dst[22] = (Sint8) ((sample6 + last_sample6) >> 1);
   1.384 +        dst[21] = (Sint8) ((sample5 + last_sample5) >> 1);
   1.385 +        dst[20] = (Sint8) ((sample4 + last_sample4) >> 1);
   1.386 +        dst[19] = (Sint8) ((sample3 + last_sample3) >> 1);
   1.387 +        dst[18] = (Sint8) ((sample2 + last_sample2) >> 1);
   1.388 +        dst[17] = (Sint8) ((sample1 + last_sample1) >> 1);
   1.389 +        dst[16] = (Sint8) ((sample0 + last_sample0) >> 1);
   1.390 +        dst[15] = (Sint8) (((3 * sample7) + last_sample7) >> 2);
   1.391 +        dst[14] = (Sint8) (((3 * sample6) + last_sample6) >> 2);
   1.392 +        dst[13] = (Sint8) (((3 * sample5) + last_sample5) >> 2);
   1.393 +        dst[12] = (Sint8) (((3 * sample4) + last_sample4) >> 2);
   1.394 +        dst[11] = (Sint8) (((3 * sample3) + last_sample3) >> 2);
   1.395 +        dst[10] = (Sint8) (((3 * sample2) + last_sample2) >> 2);
   1.396 +        dst[9] = (Sint8) (((3 * sample1) + last_sample1) >> 2);
   1.397 +        dst[8] = (Sint8) (((3 * sample0) + last_sample0) >> 2);
   1.398 +        dst[7] = (Sint8) sample7;
   1.399 +        dst[6] = (Sint8) sample6;
   1.400 +        dst[5] = (Sint8) sample5;
   1.401 +        dst[4] = (Sint8) sample4;
   1.402 +        dst[3] = (Sint8) sample3;
   1.403 +        dst[2] = (Sint8) sample2;
   1.404 +        dst[1] = (Sint8) sample1;
   1.405 +        dst[0] = (Sint8) sample0;
   1.406          last_sample7 = sample7;
   1.407          last_sample6 = sample6;
   1.408          last_sample5 = sample5;
   1.409 @@ -8883,10 +8883,10 @@
   1.410      while (dst >= target) {
   1.411          const Sint32 sample0 = (Sint32) SDL_SwapLE16(src[0]);
   1.412          src--;
   1.413 -        dst[3] = (Uint16) sample0;
   1.414 -        dst[2] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.415 -        dst[1] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.416 -        dst[0] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.417 +        dst[3] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.418 +        dst[2] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.419 +        dst[1] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.420 +        dst[0] = (Uint16) sample0;
   1.421          last_sample0 = sample0;
   1.422          dst -= 4;
   1.423      }
   1.424 @@ -9002,14 +9002,14 @@
   1.425          const Sint32 sample1 = (Sint32) SDL_SwapLE16(src[1]);
   1.426          const Sint32 sample0 = (Sint32) SDL_SwapLE16(src[0]);
   1.427          src -= 2;
   1.428 -        dst[7] = (Uint16) sample1;
   1.429 -        dst[6] = (Uint16) sample0;
   1.430 -        dst[5] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.431 -        dst[4] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.432 -        dst[3] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.433 -        dst[2] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.434 -        dst[1] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.435 -        dst[0] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.436 +        dst[7] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.437 +        dst[6] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.438 +        dst[5] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.439 +        dst[4] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.440 +        dst[3] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.441 +        dst[2] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.442 +        dst[1] = (Uint16) sample1;
   1.443 +        dst[0] = (Uint16) sample0;
   1.444          last_sample1 = sample1;
   1.445          last_sample0 = sample0;
   1.446          dst -= 8;
   1.447 @@ -9152,22 +9152,22 @@
   1.448          const Sint32 sample1 = (Sint32) SDL_SwapLE16(src[1]);
   1.449          const Sint32 sample0 = (Sint32) SDL_SwapLE16(src[0]);
   1.450          src -= 4;
   1.451 -        dst[15] = (Uint16) sample3;
   1.452 -        dst[14] = (Uint16) sample2;
   1.453 -        dst[13] = (Uint16) sample1;
   1.454 -        dst[12] = (Uint16) sample0;
   1.455 -        dst[11] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
   1.456 -        dst[10] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
   1.457 -        dst[9] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.458 -        dst[8] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.459 -        dst[7] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.460 -        dst[6] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.461 -        dst[5] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.462 -        dst[4] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.463 -        dst[3] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.464 -        dst[2] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.465 -        dst[1] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.466 -        dst[0] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.467 +        dst[15] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.468 +        dst[14] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.469 +        dst[13] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.470 +        dst[12] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.471 +        dst[11] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.472 +        dst[10] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.473 +        dst[9] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.474 +        dst[8] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.475 +        dst[7] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
   1.476 +        dst[6] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
   1.477 +        dst[5] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.478 +        dst[4] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.479 +        dst[3] = (Uint16) sample3;
   1.480 +        dst[2] = (Uint16) sample2;
   1.481 +        dst[1] = (Uint16) sample1;
   1.482 +        dst[0] = (Uint16) sample0;
   1.483          last_sample3 = sample3;
   1.484          last_sample2 = sample2;
   1.485          last_sample1 = sample1;
   1.486 @@ -9342,30 +9342,30 @@
   1.487          const Sint32 sample1 = (Sint32) SDL_SwapLE16(src[1]);
   1.488          const Sint32 sample0 = (Sint32) SDL_SwapLE16(src[0]);
   1.489          src -= 6;
   1.490 -        dst[23] = (Uint16) sample5;
   1.491 -        dst[22] = (Uint16) sample4;
   1.492 -        dst[21] = (Uint16) sample3;
   1.493 -        dst[20] = (Uint16) sample2;
   1.494 -        dst[19] = (Uint16) sample1;
   1.495 -        dst[18] = (Uint16) sample0;
   1.496 -        dst[17] = (Uint16) (((3 * sample5) + last_sample5) >> 2);
   1.497 -        dst[16] = (Uint16) (((3 * sample4) + last_sample4) >> 2);
   1.498 -        dst[15] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
   1.499 -        dst[14] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
   1.500 -        dst[13] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.501 -        dst[12] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.502 -        dst[11] = (Uint16) ((sample5 + last_sample5) >> 1);
   1.503 -        dst[10] = (Uint16) ((sample4 + last_sample4) >> 1);
   1.504 -        dst[9] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.505 -        dst[8] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.506 -        dst[7] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.507 -        dst[6] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.508 -        dst[5] = (Uint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.509 -        dst[4] = (Uint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.510 -        dst[3] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.511 -        dst[2] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.512 -        dst[1] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.513 -        dst[0] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.514 +        dst[23] = (Uint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.515 +        dst[22] = (Uint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.516 +        dst[21] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.517 +        dst[20] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.518 +        dst[19] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.519 +        dst[18] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.520 +        dst[17] = (Uint16) ((sample5 + last_sample5) >> 1);
   1.521 +        dst[16] = (Uint16) ((sample4 + last_sample4) >> 1);
   1.522 +        dst[15] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.523 +        dst[14] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.524 +        dst[13] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.525 +        dst[12] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.526 +        dst[11] = (Uint16) (((3 * sample5) + last_sample5) >> 2);
   1.527 +        dst[10] = (Uint16) (((3 * sample4) + last_sample4) >> 2);
   1.528 +        dst[9] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
   1.529 +        dst[8] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
   1.530 +        dst[7] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.531 +        dst[6] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.532 +        dst[5] = (Uint16) sample5;
   1.533 +        dst[4] = (Uint16) sample4;
   1.534 +        dst[3] = (Uint16) sample3;
   1.535 +        dst[2] = (Uint16) sample2;
   1.536 +        dst[1] = (Uint16) sample1;
   1.537 +        dst[0] = (Uint16) sample0;
   1.538          last_sample5 = sample5;
   1.539          last_sample4 = sample4;
   1.540          last_sample3 = sample3;
   1.541 @@ -9572,38 +9572,38 @@
   1.542          const Sint32 sample1 = (Sint32) SDL_SwapLE16(src[1]);
   1.543          const Sint32 sample0 = (Sint32) SDL_SwapLE16(src[0]);
   1.544          src -= 8;
   1.545 -        dst[31] = (Uint16) sample7;
   1.546 -        dst[30] = (Uint16) sample6;
   1.547 -        dst[29] = (Uint16) sample5;
   1.548 -        dst[28] = (Uint16) sample4;
   1.549 -        dst[27] = (Uint16) sample3;
   1.550 -        dst[26] = (Uint16) sample2;
   1.551 -        dst[25] = (Uint16) sample1;
   1.552 -        dst[24] = (Uint16) sample0;
   1.553 -        dst[23] = (Uint16) (((3 * sample7) + last_sample7) >> 2);
   1.554 -        dst[22] = (Uint16) (((3 * sample6) + last_sample6) >> 2);
   1.555 -        dst[21] = (Uint16) (((3 * sample5) + last_sample5) >> 2);
   1.556 -        dst[20] = (Uint16) (((3 * sample4) + last_sample4) >> 2);
   1.557 -        dst[19] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
   1.558 -        dst[18] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
   1.559 -        dst[17] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.560 -        dst[16] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.561 -        dst[15] = (Uint16) ((sample7 + last_sample7) >> 1);
   1.562 -        dst[14] = (Uint16) ((sample6 + last_sample6) >> 1);
   1.563 -        dst[13] = (Uint16) ((sample5 + last_sample5) >> 1);
   1.564 -        dst[12] = (Uint16) ((sample4 + last_sample4) >> 1);
   1.565 -        dst[11] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.566 -        dst[10] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.567 -        dst[9] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.568 -        dst[8] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.569 -        dst[7] = (Uint16) ((sample7 + (3 * last_sample7)) >> 2);
   1.570 -        dst[6] = (Uint16) ((sample6 + (3 * last_sample6)) >> 2);
   1.571 -        dst[5] = (Uint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.572 -        dst[4] = (Uint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.573 -        dst[3] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.574 -        dst[2] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.575 -        dst[1] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.576 -        dst[0] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.577 +        dst[31] = (Uint16) ((sample7 + (3 * last_sample7)) >> 2);
   1.578 +        dst[30] = (Uint16) ((sample6 + (3 * last_sample6)) >> 2);
   1.579 +        dst[29] = (Uint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.580 +        dst[28] = (Uint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.581 +        dst[27] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.582 +        dst[26] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.583 +        dst[25] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.584 +        dst[24] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.585 +        dst[23] = (Uint16) ((sample7 + last_sample7) >> 1);
   1.586 +        dst[22] = (Uint16) ((sample6 + last_sample6) >> 1);
   1.587 +        dst[21] = (Uint16) ((sample5 + last_sample5) >> 1);
   1.588 +        dst[20] = (Uint16) ((sample4 + last_sample4) >> 1);
   1.589 +        dst[19] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.590 +        dst[18] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.591 +        dst[17] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.592 +        dst[16] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.593 +        dst[15] = (Uint16) (((3 * sample7) + last_sample7) >> 2);
   1.594 +        dst[14] = (Uint16) (((3 * sample6) + last_sample6) >> 2);
   1.595 +        dst[13] = (Uint16) (((3 * sample5) + last_sample5) >> 2);
   1.596 +        dst[12] = (Uint16) (((3 * sample4) + last_sample4) >> 2);
   1.597 +        dst[11] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
   1.598 +        dst[10] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
   1.599 +        dst[9] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.600 +        dst[8] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.601 +        dst[7] = (Uint16) sample7;
   1.602 +        dst[6] = (Uint16) sample6;
   1.603 +        dst[5] = (Uint16) sample5;
   1.604 +        dst[4] = (Uint16) sample4;
   1.605 +        dst[3] = (Uint16) sample3;
   1.606 +        dst[2] = (Uint16) sample2;
   1.607 +        dst[1] = (Uint16) sample1;
   1.608 +        dst[0] = (Uint16) sample0;
   1.609          last_sample7 = sample7;
   1.610          last_sample6 = sample6;
   1.611          last_sample5 = sample5;
   1.612 @@ -9743,10 +9743,10 @@
   1.613      while (dst >= target) {
   1.614          const Sint32 sample0 = (Sint32) ((Sint16) SDL_SwapLE16(src[0]));
   1.615          src--;
   1.616 -        dst[3] = (Sint16) sample0;
   1.617 -        dst[2] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
   1.618 -        dst[1] = (Sint16) ((sample0 + last_sample0) >> 1);
   1.619 -        dst[0] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.620 +        dst[3] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.621 +        dst[2] = (Sint16) ((sample0 + last_sample0) >> 1);
   1.622 +        dst[1] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
   1.623 +        dst[0] = (Sint16) sample0;
   1.624          last_sample0 = sample0;
   1.625          dst -= 4;
   1.626      }
   1.627 @@ -9862,14 +9862,14 @@
   1.628          const Sint32 sample1 = (Sint32) ((Sint16) SDL_SwapLE16(src[1]));
   1.629          const Sint32 sample0 = (Sint32) ((Sint16) SDL_SwapLE16(src[0]));
   1.630          src -= 2;
   1.631 -        dst[7] = (Sint16) sample1;
   1.632 -        dst[6] = (Sint16) sample0;
   1.633 -        dst[5] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
   1.634 -        dst[4] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
   1.635 -        dst[3] = (Sint16) ((sample1 + last_sample1) >> 1);
   1.636 -        dst[2] = (Sint16) ((sample0 + last_sample0) >> 1);
   1.637 -        dst[1] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.638 -        dst[0] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.639 +        dst[7] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.640 +        dst[6] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.641 +        dst[5] = (Sint16) ((sample1 + last_sample1) >> 1);
   1.642 +        dst[4] = (Sint16) ((sample0 + last_sample0) >> 1);
   1.643 +        dst[3] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
   1.644 +        dst[2] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
   1.645 +        dst[1] = (Sint16) sample1;
   1.646 +        dst[0] = (Sint16) sample0;
   1.647          last_sample1 = sample1;
   1.648          last_sample0 = sample0;
   1.649          dst -= 8;
   1.650 @@ -10012,22 +10012,22 @@
   1.651          const Sint32 sample1 = (Sint32) ((Sint16) SDL_SwapLE16(src[1]));
   1.652          const Sint32 sample0 = (Sint32) ((Sint16) SDL_SwapLE16(src[0]));
   1.653          src -= 4;
   1.654 -        dst[15] = (Sint16) sample3;
   1.655 -        dst[14] = (Sint16) sample2;
   1.656 -        dst[13] = (Sint16) sample1;
   1.657 -        dst[12] = (Sint16) sample0;
   1.658 -        dst[11] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
   1.659 -        dst[10] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
   1.660 -        dst[9] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
   1.661 -        dst[8] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
   1.662 -        dst[7] = (Sint16) ((sample3 + last_sample3) >> 1);
   1.663 -        dst[6] = (Sint16) ((sample2 + last_sample2) >> 1);
   1.664 -        dst[5] = (Sint16) ((sample1 + last_sample1) >> 1);
   1.665 -        dst[4] = (Sint16) ((sample0 + last_sample0) >> 1);
   1.666 -        dst[3] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.667 -        dst[2] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.668 -        dst[1] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.669 -        dst[0] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.670 +        dst[15] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.671 +        dst[14] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.672 +        dst[13] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.673 +        dst[12] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.674 +        dst[11] = (Sint16) ((sample3 + last_sample3) >> 1);
   1.675 +        dst[10] = (Sint16) ((sample2 + last_sample2) >> 1);
   1.676 +        dst[9] = (Sint16) ((sample1 + last_sample1) >> 1);
   1.677 +        dst[8] = (Sint16) ((sample0 + last_sample0) >> 1);
   1.678 +        dst[7] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
   1.679 +        dst[6] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
   1.680 +        dst[5] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
   1.681 +        dst[4] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
   1.682 +        dst[3] = (Sint16) sample3;
   1.683 +        dst[2] = (Sint16) sample2;
   1.684 +        dst[1] = (Sint16) sample1;
   1.685 +        dst[0] = (Sint16) sample0;
   1.686          last_sample3 = sample3;
   1.687          last_sample2 = sample2;
   1.688          last_sample1 = sample1;
   1.689 @@ -10202,30 +10202,30 @@
   1.690          const Sint32 sample1 = (Sint32) ((Sint16) SDL_SwapLE16(src[1]));
   1.691          const Sint32 sample0 = (Sint32) ((Sint16) SDL_SwapLE16(src[0]));
   1.692          src -= 6;
   1.693 -        dst[23] = (Sint16) sample5;
   1.694 -        dst[22] = (Sint16) sample4;
   1.695 -        dst[21] = (Sint16) sample3;
   1.696 -        dst[20] = (Sint16) sample2;
   1.697 -        dst[19] = (Sint16) sample1;
   1.698 -        dst[18] = (Sint16) sample0;
   1.699 -        dst[17] = (Sint16) (((3 * sample5) + last_sample5) >> 2);
   1.700 -        dst[16] = (Sint16) (((3 * sample4) + last_sample4) >> 2);
   1.701 -        dst[15] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
   1.702 -        dst[14] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
   1.703 -        dst[13] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
   1.704 -        dst[12] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
   1.705 -        dst[11] = (Sint16) ((sample5 + last_sample5) >> 1);
   1.706 -        dst[10] = (Sint16) ((sample4 + last_sample4) >> 1);
   1.707 -        dst[9] = (Sint16) ((sample3 + last_sample3) >> 1);
   1.708 -        dst[8] = (Sint16) ((sample2 + last_sample2) >> 1);
   1.709 -        dst[7] = (Sint16) ((sample1 + last_sample1) >> 1);
   1.710 -        dst[6] = (Sint16) ((sample0 + last_sample0) >> 1);
   1.711 -        dst[5] = (Sint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.712 -        dst[4] = (Sint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.713 -        dst[3] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.714 -        dst[2] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.715 -        dst[1] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.716 -        dst[0] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.717 +        dst[23] = (Sint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.718 +        dst[22] = (Sint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.719 +        dst[21] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.720 +        dst[20] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.721 +        dst[19] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.722 +        dst[18] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.723 +        dst[17] = (Sint16) ((sample5 + last_sample5) >> 1);
   1.724 +        dst[16] = (Sint16) ((sample4 + last_sample4) >> 1);
   1.725 +        dst[15] = (Sint16) ((sample3 + last_sample3) >> 1);
   1.726 +        dst[14] = (Sint16) ((sample2 + last_sample2) >> 1);
   1.727 +        dst[13] = (Sint16) ((sample1 + last_sample1) >> 1);
   1.728 +        dst[12] = (Sint16) ((sample0 + last_sample0) >> 1);
   1.729 +        dst[11] = (Sint16) (((3 * sample5) + last_sample5) >> 2);
   1.730 +        dst[10] = (Sint16) (((3 * sample4) + last_sample4) >> 2);
   1.731 +        dst[9] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
   1.732 +        dst[8] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
   1.733 +        dst[7] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
   1.734 +        dst[6] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
   1.735 +        dst[5] = (Sint16) sample5;
   1.736 +        dst[4] = (Sint16) sample4;
   1.737 +        dst[3] = (Sint16) sample3;
   1.738 +        dst[2] = (Sint16) sample2;
   1.739 +        dst[1] = (Sint16) sample1;
   1.740 +        dst[0] = (Sint16) sample0;
   1.741          last_sample5 = sample5;
   1.742          last_sample4 = sample4;
   1.743          last_sample3 = sample3;
   1.744 @@ -10432,38 +10432,38 @@
   1.745          const Sint32 sample1 = (Sint32) ((Sint16) SDL_SwapLE16(src[1]));
   1.746          const Sint32 sample0 = (Sint32) ((Sint16) SDL_SwapLE16(src[0]));
   1.747          src -= 8;
   1.748 -        dst[31] = (Sint16) sample7;
   1.749 -        dst[30] = (Sint16) sample6;
   1.750 -        dst[29] = (Sint16) sample5;
   1.751 -        dst[28] = (Sint16) sample4;
   1.752 -        dst[27] = (Sint16) sample3;
   1.753 -        dst[26] = (Sint16) sample2;
   1.754 -        dst[25] = (Sint16) sample1;
   1.755 -        dst[24] = (Sint16) sample0;
   1.756 -        dst[23] = (Sint16) (((3 * sample7) + last_sample7) >> 2);
   1.757 -        dst[22] = (Sint16) (((3 * sample6) + last_sample6) >> 2);
   1.758 -        dst[21] = (Sint16) (((3 * sample5) + last_sample5) >> 2);
   1.759 -        dst[20] = (Sint16) (((3 * sample4) + last_sample4) >> 2);
   1.760 -        dst[19] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
   1.761 -        dst[18] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
   1.762 -        dst[17] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
   1.763 -        dst[16] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
   1.764 -        dst[15] = (Sint16) ((sample7 + last_sample7) >> 1);
   1.765 -        dst[14] = (Sint16) ((sample6 + last_sample6) >> 1);
   1.766 -        dst[13] = (Sint16) ((sample5 + last_sample5) >> 1);
   1.767 -        dst[12] = (Sint16) ((sample4 + last_sample4) >> 1);
   1.768 -        dst[11] = (Sint16) ((sample3 + last_sample3) >> 1);
   1.769 -        dst[10] = (Sint16) ((sample2 + last_sample2) >> 1);
   1.770 -        dst[9] = (Sint16) ((sample1 + last_sample1) >> 1);
   1.771 -        dst[8] = (Sint16) ((sample0 + last_sample0) >> 1);
   1.772 -        dst[7] = (Sint16) ((sample7 + (3 * last_sample7)) >> 2);
   1.773 -        dst[6] = (Sint16) ((sample6 + (3 * last_sample6)) >> 2);
   1.774 -        dst[5] = (Sint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.775 -        dst[4] = (Sint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.776 -        dst[3] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.777 -        dst[2] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.778 -        dst[1] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.779 -        dst[0] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.780 +        dst[31] = (Sint16) ((sample7 + (3 * last_sample7)) >> 2);
   1.781 +        dst[30] = (Sint16) ((sample6 + (3 * last_sample6)) >> 2);
   1.782 +        dst[29] = (Sint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.783 +        dst[28] = (Sint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.784 +        dst[27] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.785 +        dst[26] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.786 +        dst[25] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.787 +        dst[24] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.788 +        dst[23] = (Sint16) ((sample7 + last_sample7) >> 1);
   1.789 +        dst[22] = (Sint16) ((sample6 + last_sample6) >> 1);
   1.790 +        dst[21] = (Sint16) ((sample5 + last_sample5) >> 1);
   1.791 +        dst[20] = (Sint16) ((sample4 + last_sample4) >> 1);
   1.792 +        dst[19] = (Sint16) ((sample3 + last_sample3) >> 1);
   1.793 +        dst[18] = (Sint16) ((sample2 + last_sample2) >> 1);
   1.794 +        dst[17] = (Sint16) ((sample1 + last_sample1) >> 1);
   1.795 +        dst[16] = (Sint16) ((sample0 + last_sample0) >> 1);
   1.796 +        dst[15] = (Sint16) (((3 * sample7) + last_sample7) >> 2);
   1.797 +        dst[14] = (Sint16) (((3 * sample6) + last_sample6) >> 2);
   1.798 +        dst[13] = (Sint16) (((3 * sample5) + last_sample5) >> 2);
   1.799 +        dst[12] = (Sint16) (((3 * sample4) + last_sample4) >> 2);
   1.800 +        dst[11] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
   1.801 +        dst[10] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
   1.802 +        dst[9] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
   1.803 +        dst[8] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
   1.804 +        dst[7] = (Sint16) sample7;
   1.805 +        dst[6] = (Sint16) sample6;
   1.806 +        dst[5] = (Sint16) sample5;
   1.807 +        dst[4] = (Sint16) sample4;
   1.808 +        dst[3] = (Sint16) sample3;
   1.809 +        dst[2] = (Sint16) sample2;
   1.810 +        dst[1] = (Sint16) sample1;
   1.811 +        dst[0] = (Sint16) sample0;
   1.812          last_sample7 = sample7;
   1.813          last_sample6 = sample6;
   1.814          last_sample5 = sample5;
   1.815 @@ -10603,10 +10603,10 @@
   1.816      while (dst >= target) {
   1.817          const Sint32 sample0 = (Sint32) SDL_SwapBE16(src[0]);
   1.818          src--;
   1.819 -        dst[3] = (Uint16) sample0;
   1.820 -        dst[2] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.821 -        dst[1] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.822 -        dst[0] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.823 +        dst[3] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.824 +        dst[2] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.825 +        dst[1] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.826 +        dst[0] = (Uint16) sample0;
   1.827          last_sample0 = sample0;
   1.828          dst -= 4;
   1.829      }
   1.830 @@ -10722,14 +10722,14 @@
   1.831          const Sint32 sample1 = (Sint32) SDL_SwapBE16(src[1]);
   1.832          const Sint32 sample0 = (Sint32) SDL_SwapBE16(src[0]);
   1.833          src -= 2;
   1.834 -        dst[7] = (Uint16) sample1;
   1.835 -        dst[6] = (Uint16) sample0;
   1.836 -        dst[5] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.837 -        dst[4] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.838 -        dst[3] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.839 -        dst[2] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.840 -        dst[1] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.841 -        dst[0] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.842 +        dst[7] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.843 +        dst[6] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.844 +        dst[5] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.845 +        dst[4] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.846 +        dst[3] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.847 +        dst[2] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.848 +        dst[1] = (Uint16) sample1;
   1.849 +        dst[0] = (Uint16) sample0;
   1.850          last_sample1 = sample1;
   1.851          last_sample0 = sample0;
   1.852          dst -= 8;
   1.853 @@ -10872,22 +10872,22 @@
   1.854          const Sint32 sample1 = (Sint32) SDL_SwapBE16(src[1]);
   1.855          const Sint32 sample0 = (Sint32) SDL_SwapBE16(src[0]);
   1.856          src -= 4;
   1.857 -        dst[15] = (Uint16) sample3;
   1.858 -        dst[14] = (Uint16) sample2;
   1.859 -        dst[13] = (Uint16) sample1;
   1.860 -        dst[12] = (Uint16) sample0;
   1.861 -        dst[11] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
   1.862 -        dst[10] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
   1.863 -        dst[9] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.864 -        dst[8] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.865 -        dst[7] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.866 -        dst[6] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.867 -        dst[5] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.868 -        dst[4] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.869 -        dst[3] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.870 -        dst[2] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.871 -        dst[1] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.872 -        dst[0] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.873 +        dst[15] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.874 +        dst[14] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.875 +        dst[13] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.876 +        dst[12] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.877 +        dst[11] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.878 +        dst[10] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.879 +        dst[9] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.880 +        dst[8] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.881 +        dst[7] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
   1.882 +        dst[6] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
   1.883 +        dst[5] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.884 +        dst[4] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.885 +        dst[3] = (Uint16) sample3;
   1.886 +        dst[2] = (Uint16) sample2;
   1.887 +        dst[1] = (Uint16) sample1;
   1.888 +        dst[0] = (Uint16) sample0;
   1.889          last_sample3 = sample3;
   1.890          last_sample2 = sample2;
   1.891          last_sample1 = sample1;
   1.892 @@ -11062,30 +11062,30 @@
   1.893          const Sint32 sample1 = (Sint32) SDL_SwapBE16(src[1]);
   1.894          const Sint32 sample0 = (Sint32) SDL_SwapBE16(src[0]);
   1.895          src -= 6;
   1.896 -        dst[23] = (Uint16) sample5;
   1.897 -        dst[22] = (Uint16) sample4;
   1.898 -        dst[21] = (Uint16) sample3;
   1.899 -        dst[20] = (Uint16) sample2;
   1.900 -        dst[19] = (Uint16) sample1;
   1.901 -        dst[18] = (Uint16) sample0;
   1.902 -        dst[17] = (Uint16) (((3 * sample5) + last_sample5) >> 2);
   1.903 -        dst[16] = (Uint16) (((3 * sample4) + last_sample4) >> 2);
   1.904 -        dst[15] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
   1.905 -        dst[14] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
   1.906 -        dst[13] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.907 -        dst[12] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.908 -        dst[11] = (Uint16) ((sample5 + last_sample5) >> 1);
   1.909 -        dst[10] = (Uint16) ((sample4 + last_sample4) >> 1);
   1.910 -        dst[9] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.911 -        dst[8] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.912 -        dst[7] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.913 -        dst[6] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.914 -        dst[5] = (Uint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.915 -        dst[4] = (Uint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.916 -        dst[3] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.917 -        dst[2] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.918 -        dst[1] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.919 -        dst[0] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.920 +        dst[23] = (Uint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.921 +        dst[22] = (Uint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.922 +        dst[21] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.923 +        dst[20] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.924 +        dst[19] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.925 +        dst[18] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.926 +        dst[17] = (Uint16) ((sample5 + last_sample5) >> 1);
   1.927 +        dst[16] = (Uint16) ((sample4 + last_sample4) >> 1);
   1.928 +        dst[15] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.929 +        dst[14] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.930 +        dst[13] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.931 +        dst[12] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.932 +        dst[11] = (Uint16) (((3 * sample5) + last_sample5) >> 2);
   1.933 +        dst[10] = (Uint16) (((3 * sample4) + last_sample4) >> 2);
   1.934 +        dst[9] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
   1.935 +        dst[8] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
   1.936 +        dst[7] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.937 +        dst[6] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.938 +        dst[5] = (Uint16) sample5;
   1.939 +        dst[4] = (Uint16) sample4;
   1.940 +        dst[3] = (Uint16) sample3;
   1.941 +        dst[2] = (Uint16) sample2;
   1.942 +        dst[1] = (Uint16) sample1;
   1.943 +        dst[0] = (Uint16) sample0;
   1.944          last_sample5 = sample5;
   1.945          last_sample4 = sample4;
   1.946          last_sample3 = sample3;
   1.947 @@ -11292,38 +11292,38 @@
   1.948          const Sint32 sample1 = (Sint32) SDL_SwapBE16(src[1]);
   1.949          const Sint32 sample0 = (Sint32) SDL_SwapBE16(src[0]);
   1.950          src -= 8;
   1.951 -        dst[31] = (Uint16) sample7;
   1.952 -        dst[30] = (Uint16) sample6;
   1.953 -        dst[29] = (Uint16) sample5;
   1.954 -        dst[28] = (Uint16) sample4;
   1.955 -        dst[27] = (Uint16) sample3;
   1.956 -        dst[26] = (Uint16) sample2;
   1.957 -        dst[25] = (Uint16) sample1;
   1.958 -        dst[24] = (Uint16) sample0;
   1.959 -        dst[23] = (Uint16) (((3 * sample7) + last_sample7) >> 2);
   1.960 -        dst[22] = (Uint16) (((3 * sample6) + last_sample6) >> 2);
   1.961 -        dst[21] = (Uint16) (((3 * sample5) + last_sample5) >> 2);
   1.962 -        dst[20] = (Uint16) (((3 * sample4) + last_sample4) >> 2);
   1.963 -        dst[19] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
   1.964 -        dst[18] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
   1.965 -        dst[17] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
   1.966 -        dst[16] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
   1.967 -        dst[15] = (Uint16) ((sample7 + last_sample7) >> 1);
   1.968 -        dst[14] = (Uint16) ((sample6 + last_sample6) >> 1);
   1.969 -        dst[13] = (Uint16) ((sample5 + last_sample5) >> 1);
   1.970 -        dst[12] = (Uint16) ((sample4 + last_sample4) >> 1);
   1.971 -        dst[11] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.972 -        dst[10] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.973 -        dst[9] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.974 -        dst[8] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.975 -        dst[7] = (Uint16) ((sample7 + (3 * last_sample7)) >> 2);
   1.976 -        dst[6] = (Uint16) ((sample6 + (3 * last_sample6)) >> 2);
   1.977 -        dst[5] = (Uint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.978 -        dst[4] = (Uint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.979 -        dst[3] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.980 -        dst[2] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.981 -        dst[1] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.982 -        dst[0] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.983 +        dst[31] = (Uint16) ((sample7 + (3 * last_sample7)) >> 2);
   1.984 +        dst[30] = (Uint16) ((sample6 + (3 * last_sample6)) >> 2);
   1.985 +        dst[29] = (Uint16) ((sample5 + (3 * last_sample5)) >> 2);
   1.986 +        dst[28] = (Uint16) ((sample4 + (3 * last_sample4)) >> 2);
   1.987 +        dst[27] = (Uint16) ((sample3 + (3 * last_sample3)) >> 2);
   1.988 +        dst[26] = (Uint16) ((sample2 + (3 * last_sample2)) >> 2);
   1.989 +        dst[25] = (Uint16) ((sample1 + (3 * last_sample1)) >> 2);
   1.990 +        dst[24] = (Uint16) ((sample0 + (3 * last_sample0)) >> 2);
   1.991 +        dst[23] = (Uint16) ((sample7 + last_sample7) >> 1);
   1.992 +        dst[22] = (Uint16) ((sample6 + last_sample6) >> 1);
   1.993 +        dst[21] = (Uint16) ((sample5 + last_sample5) >> 1);
   1.994 +        dst[20] = (Uint16) ((sample4 + last_sample4) >> 1);
   1.995 +        dst[19] = (Uint16) ((sample3 + last_sample3) >> 1);
   1.996 +        dst[18] = (Uint16) ((sample2 + last_sample2) >> 1);
   1.997 +        dst[17] = (Uint16) ((sample1 + last_sample1) >> 1);
   1.998 +        dst[16] = (Uint16) ((sample0 + last_sample0) >> 1);
   1.999 +        dst[15] = (Uint16) (((3 * sample7) + last_sample7) >> 2);
  1.1000 +        dst[14] = (Uint16) (((3 * sample6) + last_sample6) >> 2);
  1.1001 +        dst[13] = (Uint16) (((3 * sample5) + last_sample5) >> 2);
  1.1002 +        dst[12] = (Uint16) (((3 * sample4) + last_sample4) >> 2);
  1.1003 +        dst[11] = (Uint16) (((3 * sample3) + last_sample3) >> 2);
  1.1004 +        dst[10] = (Uint16) (((3 * sample2) + last_sample2) >> 2);
  1.1005 +        dst[9] = (Uint16) (((3 * sample1) + last_sample1) >> 2);
  1.1006 +        dst[8] = (Uint16) (((3 * sample0) + last_sample0) >> 2);
  1.1007 +        dst[7] = (Uint16) sample7;
  1.1008 +        dst[6] = (Uint16) sample6;
  1.1009 +        dst[5] = (Uint16) sample5;
  1.1010 +        dst[4] = (Uint16) sample4;
  1.1011 +        dst[3] = (Uint16) sample3;
  1.1012 +        dst[2] = (Uint16) sample2;
  1.1013 +        dst[1] = (Uint16) sample1;
  1.1014 +        dst[0] = (Uint16) sample0;
  1.1015          last_sample7 = sample7;
  1.1016          last_sample6 = sample6;
  1.1017          last_sample5 = sample5;
  1.1018 @@ -11463,10 +11463,10 @@
  1.1019      while (dst >= target) {
  1.1020          const Sint32 sample0 = (Sint32) ((Sint16) SDL_SwapBE16(src[0]));
  1.1021          src--;
  1.1022 -        dst[3] = (Sint16) sample0;
  1.1023 -        dst[2] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
  1.1024 -        dst[1] = (Sint16) ((sample0 + last_sample0) >> 1);
  1.1025 -        dst[0] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
  1.1026 +        dst[3] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
  1.1027 +        dst[2] = (Sint16) ((sample0 + last_sample0) >> 1);
  1.1028 +        dst[1] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
  1.1029 +        dst[0] = (Sint16) sample0;
  1.1030          last_sample0 = sample0;
  1.1031          dst -= 4;
  1.1032      }
  1.1033 @@ -11582,14 +11582,14 @@
  1.1034          const Sint32 sample1 = (Sint32) ((Sint16) SDL_SwapBE16(src[1]));
  1.1035          const Sint32 sample0 = (Sint32) ((Sint16) SDL_SwapBE16(src[0]));
  1.1036          src -= 2;
  1.1037 -        dst[7] = (Sint16) sample1;
  1.1038 -        dst[6] = (Sint16) sample0;
  1.1039 -        dst[5] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
  1.1040 -        dst[4] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
  1.1041 -        dst[3] = (Sint16) ((sample1 + last_sample1) >> 1);
  1.1042 -        dst[2] = (Sint16) ((sample0 + last_sample0) >> 1);
  1.1043 -        dst[1] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
  1.1044 -        dst[0] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
  1.1045 +        dst[7] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
  1.1046 +        dst[6] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
  1.1047 +        dst[5] = (Sint16) ((sample1 + last_sample1) >> 1);
  1.1048 +        dst[4] = (Sint16) ((sample0 + last_sample0) >> 1);
  1.1049 +        dst[3] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
  1.1050 +        dst[2] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
  1.1051 +        dst[1] = (Sint16) sample1;
  1.1052 +        dst[0] = (Sint16) sample0;
  1.1053          last_sample1 = sample1;
  1.1054          last_sample0 = sample0;
  1.1055          dst -= 8;
  1.1056 @@ -11732,22 +11732,22 @@
  1.1057          const Sint32 sample1 = (Sint32) ((Sint16) SDL_SwapBE16(src[1]));
  1.1058          const Sint32 sample0 = (Sint32) ((Sint16) SDL_SwapBE16(src[0]));
  1.1059          src -= 4;
  1.1060 -        dst[15] = (Sint16) sample3;
  1.1061 -        dst[14] = (Sint16) sample2;
  1.1062 -        dst[13] = (Sint16) sample1;
  1.1063 -        dst[12] = (Sint16) sample0;
  1.1064 -        dst[11] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
  1.1065 -        dst[10] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
  1.1066 -        dst[9] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
  1.1067 -        dst[8] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
  1.1068 -        dst[7] = (Sint16) ((sample3 + last_sample3) >> 1);
  1.1069 -        dst[6] = (Sint16) ((sample2 + last_sample2) >> 1);
  1.1070 -        dst[5] = (Sint16) ((sample1 + last_sample1) >> 1);
  1.1071 -        dst[4] = (Sint16) ((sample0 + last_sample0) >> 1);
  1.1072 -        dst[3] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
  1.1073 -        dst[2] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
  1.1074 -        dst[1] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
  1.1075 -        dst[0] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
  1.1076 +        dst[15] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
  1.1077 +        dst[14] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
  1.1078 +        dst[13] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
  1.1079 +        dst[12] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
  1.1080 +        dst[11] = (Sint16) ((sample3 + last_sample3) >> 1);
  1.1081 +        dst[10] = (Sint16) ((sample2 + last_sample2) >> 1);
  1.1082 +        dst[9] = (Sint16) ((sample1 + last_sample1) >> 1);
  1.1083 +        dst[8] = (Sint16) ((sample0 + last_sample0) >> 1);
  1.1084 +        dst[7] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
  1.1085 +        dst[6] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
  1.1086 +        dst[5] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
  1.1087 +        dst[4] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
  1.1088 +        dst[3] = (Sint16) sample3;
  1.1089 +        dst[2] = (Sint16) sample2;
  1.1090 +        dst[1] = (Sint16) sample1;
  1.1091 +        dst[0] = (Sint16) sample0;
  1.1092          last_sample3 = sample3;
  1.1093          last_sample2 = sample2;
  1.1094          last_sample1 = sample1;
  1.1095 @@ -11922,30 +11922,30 @@
  1.1096          const Sint32 sample1 = (Sint32) ((Sint16) SDL_SwapBE16(src[1]));
  1.1097          const Sint32 sample0 = (Sint32) ((Sint16) SDL_SwapBE16(src[0]));
  1.1098          src -= 6;
  1.1099 -        dst[23] = (Sint16) sample5;
  1.1100 -        dst[22] = (Sint16) sample4;
  1.1101 -        dst[21] = (Sint16) sample3;
  1.1102 -        dst[20] = (Sint16) sample2;
  1.1103 -        dst[19] = (Sint16) sample1;
  1.1104 -        dst[18] = (Sint16) sample0;
  1.1105 -        dst[17] = (Sint16) (((3 * sample5) + last_sample5) >> 2);
  1.1106 -        dst[16] = (Sint16) (((3 * sample4) + last_sample4) >> 2);
  1.1107 -        dst[15] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
  1.1108 -        dst[14] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
  1.1109 -        dst[13] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
  1.1110 -        dst[12] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
  1.1111 -        dst[11] = (Sint16) ((sample5 + last_sample5) >> 1);
  1.1112 -        dst[10] = (Sint16) ((sample4 + last_sample4) >> 1);
  1.1113 -        dst[9] = (Sint16) ((sample3 + last_sample3) >> 1);
  1.1114 -        dst[8] = (Sint16) ((sample2 + last_sample2) >> 1);
  1.1115 -        dst[7] = (Sint16) ((sample1 + last_sample1) >> 1);
  1.1116 -        dst[6] = (Sint16) ((sample0 + last_sample0) >> 1);
  1.1117 -        dst[5] = (Sint16) ((sample5 + (3 * last_sample5)) >> 2);
  1.1118 -        dst[4] = (Sint16) ((sample4 + (3 * last_sample4)) >> 2);
  1.1119 -        dst[3] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
  1.1120 -        dst[2] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
  1.1121 -        dst[1] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
  1.1122 -        dst[0] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
  1.1123 +        dst[23] = (Sint16) ((sample5 + (3 * last_sample5)) >> 2);
  1.1124 +        dst[22] = (Sint16) ((sample4 + (3 * last_sample4)) >> 2);
  1.1125 +        dst[21] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
  1.1126 +        dst[20] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
  1.1127 +        dst[19] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
  1.1128 +        dst[18] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
  1.1129 +        dst[17] = (Sint16) ((sample5 + last_sample5) >> 1);
  1.1130 +        dst[16] = (Sint16) ((sample4 + last_sample4) >> 1);
  1.1131 +        dst[15] = (Sint16) ((sample3 + last_sample3) >> 1);
  1.1132 +        dst[14] = (Sint16) ((sample2 + last_sample2) >> 1);
  1.1133 +        dst[13] = (Sint16) ((sample1 + last_sample1) >> 1);
  1.1134 +        dst[12] = (Sint16) ((sample0 + last_sample0) >> 1);
  1.1135 +        dst[11] = (Sint16) (((3 * sample5) + last_sample5) >> 2);
  1.1136 +        dst[10] = (Sint16) (((3 * sample4) + last_sample4) >> 2);
  1.1137 +        dst[9] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
  1.1138 +        dst[8] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
  1.1139 +        dst[7] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
  1.1140 +        dst[6] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
  1.1141 +        dst[5] = (Sint16) sample5;
  1.1142 +        dst[4] = (Sint16) sample4;
  1.1143 +        dst[3] = (Sint16) sample3;
  1.1144 +        dst[2] = (Sint16) sample2;
  1.1145 +        dst[1] = (Sint16) sample1;
  1.1146 +        dst[0] = (Sint16) sample0;
  1.1147          last_sample5 = sample5;
  1.1148          last_sample4 = sample4;
  1.1149          last_sample3 = sample3;
  1.1150 @@ -12152,38 +12152,38 @@
  1.1151          const Sint32 sample1 = (Sint32) ((Sint16) SDL_SwapBE16(src[1]));
  1.1152          const Sint32 sample0 = (Sint32) ((Sint16) SDL_SwapBE16(src[0]));
  1.1153          src -= 8;
  1.1154 -        dst[31] = (Sint16) sample7;
  1.1155 -        dst[30] = (Sint16) sample6;
  1.1156 -        dst[29] = (Sint16) sample5;
  1.1157 -        dst[28] = (Sint16) sample4;
  1.1158 -        dst[27] = (Sint16) sample3;
  1.1159 -        dst[26] = (Sint16) sample2;
  1.1160 -        dst[25] = (Sint16) sample1;
  1.1161 -        dst[24] = (Sint16) sample0;
  1.1162 -        dst[23] = (Sint16) (((3 * sample7) + last_sample7) >> 2);
  1.1163 -        dst[22] = (Sint16) (((3 * sample6) + last_sample6) >> 2);
  1.1164 -        dst[21] = (Sint16) (((3 * sample5) + last_sample5) >> 2);
  1.1165 -        dst[20] = (Sint16) (((3 * sample4) + last_sample4) >> 2);
  1.1166 -        dst[19] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
  1.1167 -        dst[18] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
  1.1168 -        dst[17] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
  1.1169 -        dst[16] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
  1.1170 -        dst[15] = (Sint16) ((sample7 + last_sample7) >> 1);
  1.1171 -        dst[14] = (Sint16) ((sample6 + last_sample6) >> 1);
  1.1172 -        dst[13] = (Sint16) ((sample5 + last_sample5) >> 1);
  1.1173 -        dst[12] = (Sint16) ((sample4 + last_sample4) >> 1);
  1.1174 -        dst[11] = (Sint16) ((sample3 + last_sample3) >> 1);
  1.1175 -        dst[10] = (Sint16) ((sample2 + last_sample2) >> 1);
  1.1176 -        dst[9] = (Sint16) ((sample1 + last_sample1) >> 1);
  1.1177 -        dst[8] = (Sint16) ((sample0 + last_sample0) >> 1);
  1.1178 -        dst[7] = (Sint16) ((sample7 + (3 * last_sample7)) >> 2);
  1.1179 -        dst[6] = (Sint16) ((sample6 + (3 * last_sample6)) >> 2);
  1.1180 -        dst[5] = (Sint16) ((sample5 + (3 * last_sample5)) >> 2);
  1.1181 -        dst[4] = (Sint16) ((sample4 + (3 * last_sample4)) >> 2);
  1.1182 -        dst[3] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
  1.1183 -        dst[2] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
  1.1184 -        dst[1] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
  1.1185 -        dst[0] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
  1.1186 +        dst[31] = (Sint16) ((sample7 + (3 * last_sample7)) >> 2);
  1.1187 +        dst[30] = (Sint16) ((sample6 + (3 * last_sample6)) >> 2);
  1.1188 +        dst[29] = (Sint16) ((sample5 + (3 * last_sample5)) >> 2);
  1.1189 +        dst[28] = (Sint16) ((sample4 + (3 * last_sample4)) >> 2);
  1.1190 +        dst[27] = (Sint16) ((sample3 + (3 * last_sample3)) >> 2);
  1.1191 +        dst[26] = (Sint16) ((sample2 + (3 * last_sample2)) >> 2);
  1.1192 +        dst[25] = (Sint16) ((sample1 + (3 * last_sample1)) >> 2);
  1.1193 +        dst[24] = (Sint16) ((sample0 + (3 * last_sample0)) >> 2);
  1.1194 +        dst[23] = (Sint16) ((sample7 + last_sample7) >> 1);
  1.1195 +        dst[22] = (Sint16) ((sample6 + last_sample6) >> 1);
  1.1196 +        dst[21] = (Sint16) ((sample5 + last_sample5) >> 1);
  1.1197 +        dst[20] = (Sint16) ((sample4 + last_sample4) >> 1);
  1.1198 +        dst[19] = (Sint16) ((sample3 + last_sample3) >> 1);
  1.1199 +        dst[18] = (Sint16) ((sample2 + last_sample2) >> 1);
  1.1200 +        dst[17] = (Sint16) ((sample1 + last_sample1) >> 1);
  1.1201 +        dst[16] = (Sint16) ((sample0 + last_sample0) >> 1);
  1.1202 +        dst[15] = (Sint16) (((3 * sample7) + last_sample7) >> 2);
  1.1203 +        dst[14] = (Sint16) (((3 * sample6) + last_sample6) >> 2);
  1.1204 +        dst[13] = (Sint16) (((3 * sample5) + last_sample5) >> 2);
  1.1205 +        dst[12] = (Sint16) (((3 * sample4) + last_sample4) >> 2);
  1.1206 +        dst[11] = (Sint16) (((3 * sample3) + last_sample3) >> 2);
  1.1207 +        dst[10] = (Sint16) (((3 * sample2) + last_sample2) >> 2);
  1.1208 +        dst[9] = (Sint16) (((3 * sample1) + last_sample1) >> 2);
  1.1209 +        dst[8] = (Sint16) (((3 * sample0) + last_sample0) >> 2);
  1.1210 +        dst[7] = (Sint16) sample7;
  1.1211 +        dst[6] = (Sint16) sample6;
  1.1212 +        dst[5] = (Sint16) sample5;
  1.1213 +        dst[4] = (Sint16) sample4;
  1.1214 +        dst[3] = (Sint16) sample3;
  1.1215 +        dst[2] = (Sint16) sample2;
  1.1216 +        dst[1] = (Sint16) sample1;
  1.1217 +        dst[0] = (Sint16) sample0;
  1.1218          last_sample7 = sample7;
  1.1219          last_sample6 = sample6;
  1.1220          last_sample5 = sample5;
  1.1221 @@ -12323,10 +12323,10 @@
  1.1222      while (dst >= target) {
  1.1223          const Sint64 sample0 = (Sint64) ((Sint32) SDL_SwapLE32(src[0]));
  1.1224          src--;
  1.1225 -        dst[3] = (Sint32) sample0;
  1.1226 -        dst[2] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1227 -        dst[1] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1228 -        dst[0] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1229 +        dst[3] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1230 +        dst[2] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1231 +        dst[1] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1232 +        dst[0] = (Sint32) sample0;
  1.1233          last_sample0 = sample0;
  1.1234          dst -= 4;
  1.1235      }
  1.1236 @@ -12442,14 +12442,14 @@
  1.1237          const Sint64 sample1 = (Sint64) ((Sint32) SDL_SwapLE32(src[1]));
  1.1238          const Sint64 sample0 = (Sint64) ((Sint32) SDL_SwapLE32(src[0]));
  1.1239          src -= 2;
  1.1240 -        dst[7] = (Sint32) sample1;
  1.1241 -        dst[6] = (Sint32) sample0;
  1.1242 -        dst[5] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1243 -        dst[4] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1244 -        dst[3] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1245 -        dst[2] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1246 -        dst[1] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1247 -        dst[0] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1248 +        dst[7] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1249 +        dst[6] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1250 +        dst[5] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1251 +        dst[4] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1252 +        dst[3] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1253 +        dst[2] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1254 +        dst[1] = (Sint32) sample1;
  1.1255 +        dst[0] = (Sint32) sample0;
  1.1256          last_sample1 = sample1;
  1.1257          last_sample0 = sample0;
  1.1258          dst -= 8;
  1.1259 @@ -12592,22 +12592,22 @@
  1.1260          const Sint64 sample1 = (Sint64) ((Sint32) SDL_SwapLE32(src[1]));
  1.1261          const Sint64 sample0 = (Sint64) ((Sint32) SDL_SwapLE32(src[0]));
  1.1262          src -= 4;
  1.1263 -        dst[15] = (Sint32) sample3;
  1.1264 -        dst[14] = (Sint32) sample2;
  1.1265 -        dst[13] = (Sint32) sample1;
  1.1266 -        dst[12] = (Sint32) sample0;
  1.1267 -        dst[11] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1268 -        dst[10] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1269 -        dst[9] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1270 -        dst[8] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1271 -        dst[7] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1272 -        dst[6] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1273 -        dst[5] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1274 -        dst[4] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1275 -        dst[3] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1276 -        dst[2] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1277 -        dst[1] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1278 -        dst[0] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1279 +        dst[15] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1280 +        dst[14] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1281 +        dst[13] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1282 +        dst[12] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1283 +        dst[11] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1284 +        dst[10] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1285 +        dst[9] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1286 +        dst[8] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1287 +        dst[7] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1288 +        dst[6] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1289 +        dst[5] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1290 +        dst[4] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1291 +        dst[3] = (Sint32) sample3;
  1.1292 +        dst[2] = (Sint32) sample2;
  1.1293 +        dst[1] = (Sint32) sample1;
  1.1294 +        dst[0] = (Sint32) sample0;
  1.1295          last_sample3 = sample3;
  1.1296          last_sample2 = sample2;
  1.1297          last_sample1 = sample1;
  1.1298 @@ -12782,30 +12782,30 @@
  1.1299          const Sint64 sample1 = (Sint64) ((Sint32) SDL_SwapLE32(src[1]));
  1.1300          const Sint64 sample0 = (Sint64) ((Sint32) SDL_SwapLE32(src[0]));
  1.1301          src -= 6;
  1.1302 -        dst[23] = (Sint32) sample5;
  1.1303 -        dst[22] = (Sint32) sample4;
  1.1304 -        dst[21] = (Sint32) sample3;
  1.1305 -        dst[20] = (Sint32) sample2;
  1.1306 -        dst[19] = (Sint32) sample1;
  1.1307 -        dst[18] = (Sint32) sample0;
  1.1308 -        dst[17] = (Sint32) (((3 * sample5) + last_sample5) >> 2);
  1.1309 -        dst[16] = (Sint32) (((3 * sample4) + last_sample4) >> 2);
  1.1310 -        dst[15] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1311 -        dst[14] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1312 -        dst[13] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1313 -        dst[12] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1314 -        dst[11] = (Sint32) ((sample5 + last_sample5) >> 1);
  1.1315 -        dst[10] = (Sint32) ((sample4 + last_sample4) >> 1);
  1.1316 -        dst[9] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1317 -        dst[8] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1318 -        dst[7] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1319 -        dst[6] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1320 -        dst[5] = (Sint32) ((sample5 + (3 * last_sample5)) >> 2);
  1.1321 -        dst[4] = (Sint32) ((sample4 + (3 * last_sample4)) >> 2);
  1.1322 -        dst[3] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1323 -        dst[2] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1324 -        dst[1] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1325 -        dst[0] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1326 +        dst[23] = (Sint32) ((sample5 + (3 * last_sample5)) >> 2);
  1.1327 +        dst[22] = (Sint32) ((sample4 + (3 * last_sample4)) >> 2);
  1.1328 +        dst[21] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1329 +        dst[20] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1330 +        dst[19] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1331 +        dst[18] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1332 +        dst[17] = (Sint32) ((sample5 + last_sample5) >> 1);
  1.1333 +        dst[16] = (Sint32) ((sample4 + last_sample4) >> 1);
  1.1334 +        dst[15] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1335 +        dst[14] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1336 +        dst[13] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1337 +        dst[12] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1338 +        dst[11] = (Sint32) (((3 * sample5) + last_sample5) >> 2);
  1.1339 +        dst[10] = (Sint32) (((3 * sample4) + last_sample4) >> 2);
  1.1340 +        dst[9] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1341 +        dst[8] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1342 +        dst[7] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1343 +        dst[6] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1344 +        dst[5] = (Sint32) sample5;
  1.1345 +        dst[4] = (Sint32) sample4;
  1.1346 +        dst[3] = (Sint32) sample3;
  1.1347 +        dst[2] = (Sint32) sample2;
  1.1348 +        dst[1] = (Sint32) sample1;
  1.1349 +        dst[0] = (Sint32) sample0;
  1.1350          last_sample5 = sample5;
  1.1351          last_sample4 = sample4;
  1.1352          last_sample3 = sample3;
  1.1353 @@ -13012,38 +13012,38 @@
  1.1354          const Sint64 sample1 = (Sint64) ((Sint32) SDL_SwapLE32(src[1]));
  1.1355          const Sint64 sample0 = (Sint64) ((Sint32) SDL_SwapLE32(src[0]));
  1.1356          src -= 8;
  1.1357 -        dst[31] = (Sint32) sample7;
  1.1358 -        dst[30] = (Sint32) sample6;
  1.1359 -        dst[29] = (Sint32) sample5;
  1.1360 -        dst[28] = (Sint32) sample4;
  1.1361 -        dst[27] = (Sint32) sample3;
  1.1362 -        dst[26] = (Sint32) sample2;
  1.1363 -        dst[25] = (Sint32) sample1;
  1.1364 -        dst[24] = (Sint32) sample0;
  1.1365 -        dst[23] = (Sint32) (((3 * sample7) + last_sample7) >> 2);
  1.1366 -        dst[22] = (Sint32) (((3 * sample6) + last_sample6) >> 2);
  1.1367 -        dst[21] = (Sint32) (((3 * sample5) + last_sample5) >> 2);
  1.1368 -        dst[20] = (Sint32) (((3 * sample4) + last_sample4) >> 2);
  1.1369 -        dst[19] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1370 -        dst[18] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1371 -        dst[17] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1372 -        dst[16] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1373 -        dst[15] = (Sint32) ((sample7 + last_sample7) >> 1);
  1.1374 -        dst[14] = (Sint32) ((sample6 + last_sample6) >> 1);
  1.1375 -        dst[13] = (Sint32) ((sample5 + last_sample5) >> 1);
  1.1376 -        dst[12] = (Sint32) ((sample4 + last_sample4) >> 1);
  1.1377 -        dst[11] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1378 -        dst[10] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1379 -        dst[9] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1380 -        dst[8] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1381 -        dst[7] = (Sint32) ((sample7 + (3 * last_sample7)) >> 2);
  1.1382 -        dst[6] = (Sint32) ((sample6 + (3 * last_sample6)) >> 2);
  1.1383 -        dst[5] = (Sint32) ((sample5 + (3 * last_sample5)) >> 2);
  1.1384 -        dst[4] = (Sint32) ((sample4 + (3 * last_sample4)) >> 2);
  1.1385 -        dst[3] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1386 -        dst[2] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1387 -        dst[1] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1388 -        dst[0] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1389 +        dst[31] = (Sint32) ((sample7 + (3 * last_sample7)) >> 2);
  1.1390 +        dst[30] = (Sint32) ((sample6 + (3 * last_sample6)) >> 2);
  1.1391 +        dst[29] = (Sint32) ((sample5 + (3 * last_sample5)) >> 2);
  1.1392 +        dst[28] = (Sint32) ((sample4 + (3 * last_sample4)) >> 2);
  1.1393 +        dst[27] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1394 +        dst[26] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1395 +        dst[25] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1396 +        dst[24] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1397 +        dst[23] = (Sint32) ((sample7 + last_sample7) >> 1);
  1.1398 +        dst[22] = (Sint32) ((sample6 + last_sample6) >> 1);
  1.1399 +        dst[21] = (Sint32) ((sample5 + last_sample5) >> 1);
  1.1400 +        dst[20] = (Sint32) ((sample4 + last_sample4) >> 1);
  1.1401 +        dst[19] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1402 +        dst[18] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1403 +        dst[17] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1404 +        dst[16] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1405 +        dst[15] = (Sint32) (((3 * sample7) + last_sample7) >> 2);
  1.1406 +        dst[14] = (Sint32) (((3 * sample6) + last_sample6) >> 2);
  1.1407 +        dst[13] = (Sint32) (((3 * sample5) + last_sample5) >> 2);
  1.1408 +        dst[12] = (Sint32) (((3 * sample4) + last_sample4) >> 2);
  1.1409 +        dst[11] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1410 +        dst[10] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1411 +        dst[9] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1412 +        dst[8] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1413 +        dst[7] = (Sint32) sample7;
  1.1414 +        dst[6] = (Sint32) sample6;
  1.1415 +        dst[5] = (Sint32) sample5;
  1.1416 +        dst[4] = (Sint32) sample4;
  1.1417 +        dst[3] = (Sint32) sample3;
  1.1418 +        dst[2] = (Sint32) sample2;
  1.1419 +        dst[1] = (Sint32) sample1;
  1.1420 +        dst[0] = (Sint32) sample0;
  1.1421          last_sample7 = sample7;
  1.1422          last_sample6 = sample6;
  1.1423          last_sample5 = sample5;
  1.1424 @@ -13183,10 +13183,10 @@
  1.1425      while (dst >= target) {
  1.1426          const Sint64 sample0 = (Sint64) ((Sint32) SDL_SwapBE32(src[0]));
  1.1427          src--;
  1.1428 -        dst[3] = (Sint32) sample0;
  1.1429 -        dst[2] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1430 -        dst[1] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1431 -        dst[0] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1432 +        dst[3] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1433 +        dst[2] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1434 +        dst[1] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1435 +        dst[0] = (Sint32) sample0;
  1.1436          last_sample0 = sample0;
  1.1437          dst -= 4;
  1.1438      }
  1.1439 @@ -13302,14 +13302,14 @@
  1.1440          const Sint64 sample1 = (Sint64) ((Sint32) SDL_SwapBE32(src[1]));
  1.1441          const Sint64 sample0 = (Sint64) ((Sint32) SDL_SwapBE32(src[0]));
  1.1442          src -= 2;
  1.1443 -        dst[7] = (Sint32) sample1;
  1.1444 -        dst[6] = (Sint32) sample0;
  1.1445 -        dst[5] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1446 -        dst[4] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1447 -        dst[3] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1448 -        dst[2] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1449 -        dst[1] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1450 -        dst[0] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1451 +        dst[7] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1452 +        dst[6] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1453 +        dst[5] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1454 +        dst[4] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1455 +        dst[3] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1456 +        dst[2] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1457 +        dst[1] = (Sint32) sample1;
  1.1458 +        dst[0] = (Sint32) sample0;
  1.1459          last_sample1 = sample1;
  1.1460          last_sample0 = sample0;
  1.1461          dst -= 8;
  1.1462 @@ -13452,22 +13452,22 @@
  1.1463          const Sint64 sample1 = (Sint64) ((Sint32) SDL_SwapBE32(src[1]));
  1.1464          const Sint64 sample0 = (Sint64) ((Sint32) SDL_SwapBE32(src[0]));
  1.1465          src -= 4;
  1.1466 -        dst[15] = (Sint32) sample3;
  1.1467 -        dst[14] = (Sint32) sample2;
  1.1468 -        dst[13] = (Sint32) sample1;
  1.1469 -        dst[12] = (Sint32) sample0;
  1.1470 -        dst[11] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1471 -        dst[10] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1472 -        dst[9] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1473 -        dst[8] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1474 -        dst[7] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1475 -        dst[6] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1476 -        dst[5] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1477 -        dst[4] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1478 -        dst[3] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1479 -        dst[2] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1480 -        dst[1] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1481 -        dst[0] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1482 +        dst[15] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1483 +        dst[14] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1484 +        dst[13] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1485 +        dst[12] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1486 +        dst[11] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1487 +        dst[10] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1488 +        dst[9] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1489 +        dst[8] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1490 +        dst[7] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1491 +        dst[6] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1492 +        dst[5] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1493 +        dst[4] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1494 +        dst[3] = (Sint32) sample3;
  1.1495 +        dst[2] = (Sint32) sample2;
  1.1496 +        dst[1] = (Sint32) sample1;
  1.1497 +        dst[0] = (Sint32) sample0;
  1.1498          last_sample3 = sample3;
  1.1499          last_sample2 = sample2;
  1.1500          last_sample1 = sample1;
  1.1501 @@ -13642,30 +13642,30 @@
  1.1502          const Sint64 sample1 = (Sint64) ((Sint32) SDL_SwapBE32(src[1]));
  1.1503          const Sint64 sample0 = (Sint64) ((Sint32) SDL_SwapBE32(src[0]));
  1.1504          src -= 6;
  1.1505 -        dst[23] = (Sint32) sample5;
  1.1506 -        dst[22] = (Sint32) sample4;
  1.1507 -        dst[21] = (Sint32) sample3;
  1.1508 -        dst[20] = (Sint32) sample2;
  1.1509 -        dst[19] = (Sint32) sample1;
  1.1510 -        dst[18] = (Sint32) sample0;
  1.1511 -        dst[17] = (Sint32) (((3 * sample5) + last_sample5) >> 2);
  1.1512 -        dst[16] = (Sint32) (((3 * sample4) + last_sample4) >> 2);
  1.1513 -        dst[15] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1514 -        dst[14] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1515 -        dst[13] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1516 -        dst[12] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1517 -        dst[11] = (Sint32) ((sample5 + last_sample5) >> 1);
  1.1518 -        dst[10] = (Sint32) ((sample4 + last_sample4) >> 1);
  1.1519 -        dst[9] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1520 -        dst[8] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1521 -        dst[7] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1522 -        dst[6] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1523 -        dst[5] = (Sint32) ((sample5 + (3 * last_sample5)) >> 2);
  1.1524 -        dst[4] = (Sint32) ((sample4 + (3 * last_sample4)) >> 2);
  1.1525 -        dst[3] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1526 -        dst[2] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1527 -        dst[1] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1528 -        dst[0] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1529 +        dst[23] = (Sint32) ((sample5 + (3 * last_sample5)) >> 2);
  1.1530 +        dst[22] = (Sint32) ((sample4 + (3 * last_sample4)) >> 2);
  1.1531 +        dst[21] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1532 +        dst[20] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1533 +        dst[19] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1534 +        dst[18] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1535 +        dst[17] = (Sint32) ((sample5 + last_sample5) >> 1);
  1.1536 +        dst[16] = (Sint32) ((sample4 + last_sample4) >> 1);
  1.1537 +        dst[15] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1538 +        dst[14] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1539 +        dst[13] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1540 +        dst[12] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1541 +        dst[11] = (Sint32) (((3 * sample5) + last_sample5) >> 2);
  1.1542 +        dst[10] = (Sint32) (((3 * sample4) + last_sample4) >> 2);
  1.1543 +        dst[9] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1544 +        dst[8] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1545 +        dst[7] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1546 +        dst[6] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1547 +        dst[5] = (Sint32) sample5;
  1.1548 +        dst[4] = (Sint32) sample4;
  1.1549 +        dst[3] = (Sint32) sample3;
  1.1550 +        dst[2] = (Sint32) sample2;
  1.1551 +        dst[1] = (Sint32) sample1;
  1.1552 +        dst[0] = (Sint32) sample0;
  1.1553          last_sample5 = sample5;
  1.1554          last_sample4 = sample4;
  1.1555          last_sample3 = sample3;
  1.1556 @@ -13872,38 +13872,38 @@
  1.1557          const Sint64 sample1 = (Sint64) ((Sint32) SDL_SwapBE32(src[1]));
  1.1558          const Sint64 sample0 = (Sint64) ((Sint32) SDL_SwapBE32(src[0]));
  1.1559          src -= 8;
  1.1560 -        dst[31] = (Sint32) sample7;
  1.1561 -        dst[30] = (Sint32) sample6;
  1.1562 -        dst[29] = (Sint32) sample5;
  1.1563 -        dst[28] = (Sint32) sample4;
  1.1564 -        dst[27] = (Sint32) sample3;
  1.1565 -        dst[26] = (Sint32) sample2;
  1.1566 -        dst[25] = (Sint32) sample1;
  1.1567 -        dst[24] = (Sint32) sample0;
  1.1568 -        dst[23] = (Sint32) (((3 * sample7) + last_sample7) >> 2);
  1.1569 -        dst[22] = (Sint32) (((3 * sample6) + last_sample6) >> 2);
  1.1570 -        dst[21] = (Sint32) (((3 * sample5) + last_sample5) >> 2);
  1.1571 -        dst[20] = (Sint32) (((3 * sample4) + last_sample4) >> 2);
  1.1572 -        dst[19] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1573 -        dst[18] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1574 -        dst[17] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1575 -        dst[16] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1576 -        dst[15] = (Sint32) ((sample7 + last_sample7) >> 1);
  1.1577 -        dst[14] = (Sint32) ((sample6 + last_sample6) >> 1);
  1.1578 -        dst[13] = (Sint32) ((sample5 + last_sample5) >> 1);
  1.1579 -        dst[12] = (Sint32) ((sample4 + last_sample4) >> 1);
  1.1580 -        dst[11] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1581 -        dst[10] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1582 -        dst[9] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1583 -        dst[8] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1584 -        dst[7] = (Sint32) ((sample7 + (3 * last_sample7)) >> 2);
  1.1585 -        dst[6] = (Sint32) ((sample6 + (3 * last_sample6)) >> 2);
  1.1586 -        dst[5] = (Sint32) ((sample5 + (3 * last_sample5)) >> 2);
  1.1587 -        dst[4] = (Sint32) ((sample4 + (3 * last_sample4)) >> 2);
  1.1588 -        dst[3] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1589 -        dst[2] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1590 -        dst[1] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1591 -        dst[0] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1592 +        dst[31] = (Sint32) ((sample7 + (3 * last_sample7)) >> 2);
  1.1593 +        dst[30] = (Sint32) ((sample6 + (3 * last_sample6)) >> 2);
  1.1594 +        dst[29] = (Sint32) ((sample5 + (3 * last_sample5)) >> 2);
  1.1595 +        dst[28] = (Sint32) ((sample4 + (3 * last_sample4)) >> 2);
  1.1596 +        dst[27] = (Sint32) ((sample3 + (3 * last_sample3)) >> 2);
  1.1597 +        dst[26] = (Sint32) ((sample2 + (3 * last_sample2)) >> 2);
  1.1598 +        dst[25] = (Sint32) ((sample1 + (3 * last_sample1)) >> 2);
  1.1599 +        dst[24] = (Sint32) ((sample0 + (3 * last_sample0)) >> 2);
  1.1600 +        dst[23] = (Sint32) ((sample7 + last_sample7) >> 1);
  1.1601 +        dst[22] = (Sint32) ((sample6 + last_sample6) >> 1);
  1.1602 +        dst[21] = (Sint32) ((sample5 + last_sample5) >> 1);
  1.1603 +        dst[20] = (Sint32) ((sample4 + last_sample4) >> 1);
  1.1604 +        dst[19] = (Sint32) ((sample3 + last_sample3) >> 1);
  1.1605 +        dst[18] = (Sint32) ((sample2 + last_sample2) >> 1);
  1.1606 +        dst[17] = (Sint32) ((sample1 + last_sample1) >> 1);
  1.1607 +        dst[16] = (Sint32) ((sample0 + last_sample0) >> 1);
  1.1608 +        dst[15] = (Sint32) (((3 * sample7) + last_sample7) >> 2);
  1.1609 +        dst[14] = (Sint32) (((3 * sample6) + last_sample6) >> 2);
  1.1610 +        dst[13] = (Sint32) (((3 * sample5) + last_sample5) >> 2);
  1.1611 +        dst[12] = (Sint32) (((3 * sample4) + last_sample4) >> 2);
  1.1612 +        dst[11] = (Sint32) (((3 * sample3) + last_sample3) >> 2);
  1.1613 +        dst[10] = (Sint32) (((3 * sample2) + last_sample2) >> 2);
  1.1614 +        dst[9] = (Sint32) (((3 * sample1) + last_sample1) >> 2);
  1.1615 +        dst[8] = (Sint32) (((3 * sample0) + last_sample0) >> 2);
  1.1616 +        dst[7] = (Sint32) sample7;
  1.1617 +        dst[6] = (Sint32) sample6;
  1.1618 +        dst[5] = (Sint32) sample5;
  1.1619 +        dst[4] = (Sint32) sample4;
  1.1620 +        dst[3] = (Sint32) sample3;
  1.1621 +        dst[2] = (Sint32) sample2;
  1.1622 +        dst[1] = (Sint32) sample1;
  1.1623 +        dst[0] = (Sint32) sample0;
  1.1624          last_sample7 = sample7;
  1.1625          last_sample6 = sample6;
  1.1626          last_sample5 = sample5;
  1.1627 @@ -14043,10 +14043,10 @@
  1.1628      while (dst >= target) {
  1.1629          const double sample0 = (double) SDL_SwapFloatLE(src[0]);
  1.1630          src--;
  1.1631 -        dst[3] = (float) sample0;
  1.1632 -        dst[2] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1633 -        dst[1] = (float) ((sample0 + last_sample0) * 0.5);
  1.1634 -        dst[0] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1635 +        dst[3] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1636 +        dst[2] = (float) ((sample0 + last_sample0) * 0.5);
  1.1637 +        dst[1] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1638 +        dst[0] = (float) sample0;
  1.1639          last_sample0 = sample0;
  1.1640          dst -= 4;
  1.1641      }
  1.1642 @@ -14162,14 +14162,14 @@
  1.1643          const double sample1 = (double) SDL_SwapFloatLE(src[1]);
  1.1644          const double sample0 = (double) SDL_SwapFloatLE(src[0]);
  1.1645          src -= 2;
  1.1646 -        dst[7] = (float) sample1;
  1.1647 -        dst[6] = (float) sample0;
  1.1648 -        dst[5] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1649 -        dst[4] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1650 -        dst[3] = (float) ((sample1 + last_sample1) * 0.5);
  1.1651 -        dst[2] = (float) ((sample0 + last_sample0) * 0.5);
  1.1652 -        dst[1] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1653 -        dst[0] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1654 +        dst[7] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1655 +        dst[6] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1656 +        dst[5] = (float) ((sample1 + last_sample1) * 0.5);
  1.1657 +        dst[4] = (float) ((sample0 + last_sample0) * 0.5);
  1.1658 +        dst[3] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1659 +        dst[2] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1660 +        dst[1] = (float) sample1;
  1.1661 +        dst[0] = (float) sample0;
  1.1662          last_sample1 = sample1;
  1.1663          last_sample0 = sample0;
  1.1664          dst -= 8;
  1.1665 @@ -14312,22 +14312,22 @@
  1.1666          const double sample1 = (double) SDL_SwapFloatLE(src[1]);
  1.1667          const double sample0 = (double) SDL_SwapFloatLE(src[0]);
  1.1668          src -= 4;
  1.1669 -        dst[15] = (float) sample3;
  1.1670 -        dst[14] = (float) sample2;
  1.1671 -        dst[13] = (float) sample1;
  1.1672 -        dst[12] = (float) sample0;
  1.1673 -        dst[11] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.1674 -        dst[10] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.1675 -        dst[9] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1676 -        dst[8] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1677 -        dst[7] = (float) ((sample3 + last_sample3) * 0.5);
  1.1678 -        dst[6] = (float) ((sample2 + last_sample2) * 0.5);
  1.1679 -        dst[5] = (float) ((sample1 + last_sample1) * 0.5);
  1.1680 -        dst[4] = (float) ((sample0 + last_sample0) * 0.5);
  1.1681 -        dst[3] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.1682 -        dst[2] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.1683 -        dst[1] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1684 -        dst[0] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1685 +        dst[15] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.1686 +        dst[14] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.1687 +        dst[13] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1688 +        dst[12] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1689 +        dst[11] = (float) ((sample3 + last_sample3) * 0.5);
  1.1690 +        dst[10] = (float) ((sample2 + last_sample2) * 0.5);
  1.1691 +        dst[9] = (float) ((sample1 + last_sample1) * 0.5);
  1.1692 +        dst[8] = (float) ((sample0 + last_sample0) * 0.5);
  1.1693 +        dst[7] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.1694 +        dst[6] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.1695 +        dst[5] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1696 +        dst[4] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1697 +        dst[3] = (float) sample3;
  1.1698 +        dst[2] = (float) sample2;
  1.1699 +        dst[1] = (float) sample1;
  1.1700 +        dst[0] = (float) sample0;
  1.1701          last_sample3 = sample3;
  1.1702          last_sample2 = sample2;
  1.1703          last_sample1 = sample1;
  1.1704 @@ -14502,30 +14502,30 @@
  1.1705          const double sample1 = (double) SDL_SwapFloatLE(src[1]);
  1.1706          const double sample0 = (double) SDL_SwapFloatLE(src[0]);
  1.1707          src -= 6;
  1.1708 -        dst[23] = (float) sample5;
  1.1709 -        dst[22] = (float) sample4;
  1.1710 -        dst[21] = (float) sample3;
  1.1711 -        dst[20] = (float) sample2;
  1.1712 -        dst[19] = (float) sample1;
  1.1713 -        dst[18] = (float) sample0;
  1.1714 -        dst[17] = (float) (((3.0 * sample5) + last_sample5) * 0.25);
  1.1715 -        dst[16] = (float) (((3.0 * sample4) + last_sample4) * 0.25);
  1.1716 -        dst[15] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.1717 -        dst[14] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.1718 -        dst[13] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1719 -        dst[12] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1720 -        dst[11] = (float) ((sample5 + last_sample5) * 0.5);
  1.1721 -        dst[10] = (float) ((sample4 + last_sample4) * 0.5);
  1.1722 -        dst[9] = (float) ((sample3 + last_sample3) * 0.5);
  1.1723 -        dst[8] = (float) ((sample2 + last_sample2) * 0.5);
  1.1724 -        dst[7] = (float) ((sample1 + last_sample1) * 0.5);
  1.1725 -        dst[6] = (float) ((sample0 + last_sample0) * 0.5);
  1.1726 -        dst[5] = (float) ((sample5 + (3.0 * last_sample5)) * 0.25);
  1.1727 -        dst[4] = (float) ((sample4 + (3.0 * last_sample4)) * 0.25);
  1.1728 -        dst[3] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.1729 -        dst[2] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.1730 -        dst[1] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1731 -        dst[0] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1732 +        dst[23] = (float) ((sample5 + (3.0 * last_sample5)) * 0.25);
  1.1733 +        dst[22] = (float) ((sample4 + (3.0 * last_sample4)) * 0.25);
  1.1734 +        dst[21] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.1735 +        dst[20] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.1736 +        dst[19] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1737 +        dst[18] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1738 +        dst[17] = (float) ((sample5 + last_sample5) * 0.5);
  1.1739 +        dst[16] = (float) ((sample4 + last_sample4) * 0.5);
  1.1740 +        dst[15] = (float) ((sample3 + last_sample3) * 0.5);
  1.1741 +        dst[14] = (float) ((sample2 + last_sample2) * 0.5);
  1.1742 +        dst[13] = (float) ((sample1 + last_sample1) * 0.5);
  1.1743 +        dst[12] = (float) ((sample0 + last_sample0) * 0.5);
  1.1744 +        dst[11] = (float) (((3.0 * sample5) + last_sample5) * 0.25);
  1.1745 +        dst[10] = (float) (((3.0 * sample4) + last_sample4) * 0.25);
  1.1746 +        dst[9] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.1747 +        dst[8] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.1748 +        dst[7] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1749 +        dst[6] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1750 +        dst[5] = (float) sample5;
  1.1751 +        dst[4] = (float) sample4;
  1.1752 +        dst[3] = (float) sample3;
  1.1753 +        dst[2] = (float) sample2;
  1.1754 +        dst[1] = (float) sample1;
  1.1755 +        dst[0] = (float) sample0;
  1.1756          last_sample5 = sample5;
  1.1757          last_sample4 = sample4;
  1.1758          last_sample3 = sample3;
  1.1759 @@ -14732,38 +14732,38 @@
  1.1760          const double sample1 = (double) SDL_SwapFloatLE(src[1]);
  1.1761          const double sample0 = (double) SDL_SwapFloatLE(src[0]);
  1.1762          src -= 8;
  1.1763 -        dst[31] = (float) sample7;
  1.1764 -        dst[30] = (float) sample6;
  1.1765 -        dst[29] = (float) sample5;
  1.1766 -        dst[28] = (float) sample4;
  1.1767 -        dst[27] = (float) sample3;
  1.1768 -        dst[26] = (float) sample2;
  1.1769 -        dst[25] = (float) sample1;
  1.1770 -        dst[24] = (float) sample0;
  1.1771 -        dst[23] = (float) (((3.0 * sample7) + last_sample7) * 0.25);
  1.1772 -        dst[22] = (float) (((3.0 * sample6) + last_sample6) * 0.25);
  1.1773 -        dst[21] = (float) (((3.0 * sample5) + last_sample5) * 0.25);
  1.1774 -        dst[20] = (float) (((3.0 * sample4) + last_sample4) * 0.25);
  1.1775 -        dst[19] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.1776 -        dst[18] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.1777 -        dst[17] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1778 -        dst[16] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1779 -        dst[15] = (float) ((sample7 + last_sample7) * 0.5);
  1.1780 -        dst[14] = (float) ((sample6 + last_sample6) * 0.5);
  1.1781 -        dst[13] = (float) ((sample5 + last_sample5) * 0.5);
  1.1782 -        dst[12] = (float) ((sample4 + last_sample4) * 0.5);
  1.1783 -        dst[11] = (float) ((sample3 + last_sample3) * 0.5);
  1.1784 -        dst[10] = (float) ((sample2 + last_sample2) * 0.5);
  1.1785 -        dst[9] = (float) ((sample1 + last_sample1) * 0.5);
  1.1786 -        dst[8] = (float) ((sample0 + last_sample0) * 0.5);
  1.1787 -        dst[7] = (float) ((sample7 + (3.0 * last_sample7)) * 0.25);
  1.1788 -        dst[6] = (float) ((sample6 + (3.0 * last_sample6)) * 0.25);
  1.1789 -        dst[5] = (float) ((sample5 + (3.0 * last_sample5)) * 0.25);
  1.1790 -        dst[4] = (float) ((sample4 + (3.0 * last_sample4)) * 0.25);
  1.1791 -        dst[3] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.1792 -        dst[2] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.1793 -        dst[1] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1794 -        dst[0] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1795 +        dst[31] = (float) ((sample7 + (3.0 * last_sample7)) * 0.25);
  1.1796 +        dst[30] = (float) ((sample6 + (3.0 * last_sample6)) * 0.25);
  1.1797 +        dst[29] = (float) ((sample5 + (3.0 * last_sample5)) * 0.25);
  1.1798 +        dst[28] = (float) ((sample4 + (3.0 * last_sample4)) * 0.25);
  1.1799 +        dst[27] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.1800 +        dst[26] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.1801 +        dst[25] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1802 +        dst[24] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1803 +        dst[23] = (float) ((sample7 + last_sample7) * 0.5);
  1.1804 +        dst[22] = (float) ((sample6 + last_sample6) * 0.5);
  1.1805 +        dst[21] = (float) ((sample5 + last_sample5) * 0.5);
  1.1806 +        dst[20] = (float) ((sample4 + last_sample4) * 0.5);
  1.1807 +        dst[19] = (float) ((sample3 + last_sample3) * 0.5);
  1.1808 +        dst[18] = (float) ((sample2 + last_sample2) * 0.5);
  1.1809 +        dst[17] = (float) ((sample1 + last_sample1) * 0.5);
  1.1810 +        dst[16] = (float) ((sample0 + last_sample0) * 0.5);
  1.1811 +        dst[15] = (float) (((3.0 * sample7) + last_sample7) * 0.25);
  1.1812 +        dst[14] = (float) (((3.0 * sample6) + last_sample6) * 0.25);
  1.1813 +        dst[13] = (float) (((3.0 * sample5) + last_sample5) * 0.25);
  1.1814 +        dst[12] = (float) (((3.0 * sample4) + last_sample4) * 0.25);
  1.1815 +        dst[11] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.1816 +        dst[10] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.1817 +        dst[9] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1818 +        dst[8] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1819 +        dst[7] = (float) sample7;
  1.1820 +        dst[6] = (float) sample6;
  1.1821 +        dst[5] = (float) sample5;
  1.1822 +        dst[4] = (float) sample4;
  1.1823 +        dst[3] = (float) sample3;
  1.1824 +        dst[2] = (float) sample2;
  1.1825 +        dst[1] = (float) sample1;
  1.1826 +        dst[0] = (float) sample0;
  1.1827          last_sample7 = sample7;
  1.1828          last_sample6 = sample6;
  1.1829          last_sample5 = sample5;
  1.1830 @@ -14903,10 +14903,10 @@
  1.1831      while (dst >= target) {
  1.1832          const double sample0 = (double) SDL_SwapFloatBE(src[0]);
  1.1833          src--;
  1.1834 -        dst[3] = (float) sample0;
  1.1835 -        dst[2] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1836 -        dst[1] = (float) ((sample0 + last_sample0) * 0.5);
  1.1837 -        dst[0] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1838 +        dst[3] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1839 +        dst[2] = (float) ((sample0 + last_sample0) * 0.5);
  1.1840 +        dst[1] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1841 +        dst[0] = (float) sample0;
  1.1842          last_sample0 = sample0;
  1.1843          dst -= 4;
  1.1844      }
  1.1845 @@ -15022,14 +15022,14 @@
  1.1846          const double sample1 = (double) SDL_SwapFloatBE(src[1]);
  1.1847          const double sample0 = (double) SDL_SwapFloatBE(src[0]);
  1.1848          src -= 2;
  1.1849 -        dst[7] = (float) sample1;
  1.1850 -        dst[6] = (float) sample0;
  1.1851 -        dst[5] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1852 -        dst[4] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1853 -        dst[3] = (float) ((sample1 + last_sample1) * 0.5);
  1.1854 -        dst[2] = (float) ((sample0 + last_sample0) * 0.5);
  1.1855 -        dst[1] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1856 -        dst[0] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1857 +        dst[7] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1858 +        dst[6] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1859 +        dst[5] = (float) ((sample1 + last_sample1) * 0.5);
  1.1860 +        dst[4] = (float) ((sample0 + last_sample0) * 0.5);
  1.1861 +        dst[3] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1862 +        dst[2] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1863 +        dst[1] = (float) sample1;
  1.1864 +        dst[0] = (float) sample0;
  1.1865          last_sample1 = sample1;
  1.1866          last_sample0 = sample0;
  1.1867          dst -= 8;
  1.1868 @@ -15172,22 +15172,22 @@
  1.1869          const double sample1 = (double) SDL_SwapFloatBE(src[1]);
  1.1870          const double sample0 = (double) SDL_SwapFloatBE(src[0]);
  1.1871          src -= 4;
  1.1872 -        dst[15] = (float) sample3;
  1.1873 -        dst[14] = (float) sample2;
  1.1874 -        dst[13] = (float) sample1;
  1.1875 -        dst[12] = (float) sample0;
  1.1876 -        dst[11] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.1877 -        dst[10] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.1878 -        dst[9] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1879 -        dst[8] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1880 -        dst[7] = (float) ((sample3 + last_sample3) * 0.5);
  1.1881 -        dst[6] = (float) ((sample2 + last_sample2) * 0.5);
  1.1882 -        dst[5] = (float) ((sample1 + last_sample1) * 0.5);
  1.1883 -        dst[4] = (float) ((sample0 + last_sample0) * 0.5);
  1.1884 -        dst[3] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.1885 -        dst[2] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.1886 -        dst[1] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1887 -        dst[0] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1888 +        dst[15] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.1889 +        dst[14] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.1890 +        dst[13] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1891 +        dst[12] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1892 +        dst[11] = (float) ((sample3 + last_sample3) * 0.5);
  1.1893 +        dst[10] = (float) ((sample2 + last_sample2) * 0.5);
  1.1894 +        dst[9] = (float) ((sample1 + last_sample1) * 0.5);
  1.1895 +        dst[8] = (float) ((sample0 + last_sample0) * 0.5);
  1.1896 +        dst[7] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.1897 +        dst[6] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.1898 +        dst[5] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1899 +        dst[4] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1900 +        dst[3] = (float) sample3;
  1.1901 +        dst[2] = (float) sample2;
  1.1902 +        dst[1] = (float) sample1;
  1.1903 +        dst[0] = (float) sample0;
  1.1904          last_sample3 = sample3;
  1.1905          last_sample2 = sample2;
  1.1906          last_sample1 = sample1;
  1.1907 @@ -15362,30 +15362,30 @@
  1.1908          const double sample1 = (double) SDL_SwapFloatBE(src[1]);
  1.1909          const double sample0 = (double) SDL_SwapFloatBE(src[0]);
  1.1910          src -= 6;
  1.1911 -        dst[23] = (float) sample5;
  1.1912 -        dst[22] = (float) sample4;
  1.1913 -        dst[21] = (float) sample3;
  1.1914 -        dst[20] = (float) sample2;
  1.1915 -        dst[19] = (float) sample1;
  1.1916 -        dst[18] = (float) sample0;
  1.1917 -        dst[17] = (float) (((3.0 * sample5) + last_sample5) * 0.25);
  1.1918 -        dst[16] = (float) (((3.0 * sample4) + last_sample4) * 0.25);
  1.1919 -        dst[15] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.1920 -        dst[14] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.1921 -        dst[13] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1922 -        dst[12] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1923 -        dst[11] = (float) ((sample5 + last_sample5) * 0.5);
  1.1924 -        dst[10] = (float) ((sample4 + last_sample4) * 0.5);
  1.1925 -        dst[9] = (float) ((sample3 + last_sample3) * 0.5);
  1.1926 -        dst[8] = (float) ((sample2 + last_sample2) * 0.5);
  1.1927 -        dst[7] = (float) ((sample1 + last_sample1) * 0.5);
  1.1928 -        dst[6] = (float) ((sample0 + last_sample0) * 0.5);
  1.1929 -        dst[5] = (float) ((sample5 + (3.0 * last_sample5)) * 0.25);
  1.1930 -        dst[4] = (float) ((sample4 + (3.0 * last_sample4)) * 0.25);
  1.1931 -        dst[3] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.1932 -        dst[2] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.1933 -        dst[1] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1934 -        dst[0] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1935 +        dst[23] = (float) ((sample5 + (3.0 * last_sample5)) * 0.25);
  1.1936 +        dst[22] = (float) ((sample4 + (3.0 * last_sample4)) * 0.25);
  1.1937 +        dst[21] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.1938 +        dst[20] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.1939 +        dst[19] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1940 +        dst[18] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1941 +        dst[17] = (float) ((sample5 + last_sample5) * 0.5);
  1.1942 +        dst[16] = (float) ((sample4 + last_sample4) * 0.5);
  1.1943 +        dst[15] = (float) ((sample3 + last_sample3) * 0.5);
  1.1944 +        dst[14] = (float) ((sample2 + last_sample2) * 0.5);
  1.1945 +        dst[13] = (float) ((sample1 + last_sample1) * 0.5);
  1.1946 +        dst[12] = (float) ((sample0 + last_sample0) * 0.5);
  1.1947 +        dst[11] = (float) (((3.0 * sample5) + last_sample5) * 0.25);
  1.1948 +        dst[10] = (float) (((3.0 * sample4) + last_sample4) * 0.25);
  1.1949 +        dst[9] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.1950 +        dst[8] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.1951 +        dst[7] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1952 +        dst[6] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1953 +        dst[5] = (float) sample5;
  1.1954 +        dst[4] = (float) sample4;
  1.1955 +        dst[3] = (float) sample3;
  1.1956 +        dst[2] = (float) sample2;
  1.1957 +        dst[1] = (float) sample1;
  1.1958 +        dst[0] = (float) sample0;
  1.1959          last_sample5 = sample5;
  1.1960          last_sample4 = sample4;
  1.1961          last_sample3 = sample3;
  1.1962 @@ -15592,38 +15592,38 @@
  1.1963          const double sample1 = (double) SDL_SwapFloatBE(src[1]);
  1.1964          const double sample0 = (double) SDL_SwapFloatBE(src[0]);
  1.1965          src -= 8;
  1.1966 -        dst[31] = (float) sample7;
  1.1967 -        dst[30] = (float) sample6;
  1.1968 -        dst[29] = (float) sample5;
  1.1969 -        dst[28] = (float) sample4;
  1.1970 -        dst[27] = (float) sample3;
  1.1971 -        dst[26] = (float) sample2;
  1.1972 -        dst[25] = (float) sample1;
  1.1973 -        dst[24] = (float) sample0;
  1.1974 -        dst[23] = (float) (((3.0 * sample7) + last_sample7) * 0.25);
  1.1975 -        dst[22] = (float) (((3.0 * sample6) + last_sample6) * 0.25);
  1.1976 -        dst[21] = (float) (((3.0 * sample5) + last_sample5) * 0.25);
  1.1977 -        dst[20] = (float) (((3.0 * sample4) + last_sample4) * 0.25);
  1.1978 -        dst[19] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.1979 -        dst[18] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.1980 -        dst[17] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.1981 -        dst[16] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.1982 -        dst[15] = (float) ((sample7 + last_sample7) * 0.5);
  1.1983 -        dst[14] = (float) ((sample6 + last_sample6) * 0.5);
  1.1984 -        dst[13] = (float) ((sample5 + last_sample5) * 0.5);
  1.1985 -        dst[12] = (float) ((sample4 + last_sample4) * 0.5);
  1.1986 -        dst[11] = (float) ((sample3 + last_sample3) * 0.5);
  1.1987 -        dst[10] = (float) ((sample2 + last_sample2) * 0.5);
  1.1988 -        dst[9] = (float) ((sample1 + last_sample1) * 0.5);
  1.1989 -        dst[8] = (float) ((sample0 + last_sample0) * 0.5);
  1.1990 -        dst[7] = (float) ((sample7 + (3.0 * last_sample7)) * 0.25);
  1.1991 -        dst[6] = (float) ((sample6 + (3.0 * last_sample6)) * 0.25);
  1.1992 -        dst[5] = (float) ((sample5 + (3.0 * last_sample5)) * 0.25);
  1.1993 -        dst[4] = (float) ((sample4 + (3.0 * last_sample4)) * 0.25);
  1.1994 -        dst[3] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.1995 -        dst[2] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.1996 -        dst[1] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.1997 -        dst[0] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.1998 +        dst[31] = (float) ((sample7 + (3.0 * last_sample7)) * 0.25);
  1.1999 +        dst[30] = (float) ((sample6 + (3.0 * last_sample6)) * 0.25);
  1.2000 +        dst[29] = (float) ((sample5 + (3.0 * last_sample5)) * 0.25);
  1.2001 +        dst[28] = (float) ((sample4 + (3.0 * last_sample4)) * 0.25);
  1.2002 +        dst[27] = (float) ((sample3 + (3.0 * last_sample3)) * 0.25);
  1.2003 +        dst[26] = (float) ((sample2 + (3.0 * last_sample2)) * 0.25);
  1.2004 +        dst[25] = (float) ((sample1 + (3.0 * last_sample1)) * 0.25);
  1.2005 +        dst[24] = (float) ((sample0 + (3.0 * last_sample0)) * 0.25);
  1.2006 +        dst[23] = (float) ((sample7 + last_sample7) * 0.5);
  1.2007 +        dst[22] = (float) ((sample6 + last_sample6) * 0.5);
  1.2008 +        dst[21] = (float) ((sample5 + last_sample5) * 0.5);
  1.2009 +        dst[20] = (float) ((sample4 + last_sample4) * 0.5);
  1.2010 +        dst[19] = (float) ((sample3 + last_sample3) * 0.5);
  1.2011 +        dst[18] = (float) ((sample2 + last_sample2) * 0.5);
  1.2012 +        dst[17] = (float) ((sample1 + last_sample1) * 0.5);
  1.2013 +        dst[16] = (float) ((sample0 + last_sample0) * 0.5);
  1.2014 +        dst[15] = (float) (((3.0 * sample7) + last_sample7) * 0.25);
  1.2015 +        dst[14] = (float) (((3.0 * sample6) + last_sample6) * 0.25);
  1.2016 +        dst[13] = (float) (((3.0 * sample5) + last_sample5) * 0.25);
  1.2017 +        dst[12] = (float) (((3.0 * sample4) + last_sample4) * 0.25);
  1.2018 +        dst[11] = (float) (((3.0 * sample3) + last_sample3) * 0.25);
  1.2019 +        dst[10] = (float) (((3.0 * sample2) + last_sample2) * 0.25);
  1.2020 +        dst[9] = (float) (((3.0 * sample1) + last_sample1) * 0.25);
  1.2021 +        dst[8] = (float) (((3.0 * sample0) + last_sample0) * 0.25);
  1.2022 +        dst[7] = (float) sample7;
  1.2023 +        dst[6] = (float) sample6;
  1.2024 +        dst[5] = (float) sample5;
  1.2025 +        dst[4] = (float) sample4;
  1.2026 +        dst[3] = (float) sample3;
  1.2027 +        dst[2] = (float) sample2;
  1.2028 +        dst[1] = (float) sample1;
  1.2029 +        dst[0] = (float) sample0;
  1.2030          last_sample7 = sample7;
  1.2031          last_sample6 = sample6;
  1.2032          last_sample5 = sample5;