Revision 3155c994 libavcodec/simple_idct.c

View differences:

libavcodec/simple_idct.c
167 167

  
168 168
	return 2;
169 169
}
170

  
171
inline static void idctSparseCol(int16_t *col)
172
{
173
        int a0, a1, a2, a3, b0, b1, b2, b3;
174

  
175
        col[0] += (1 << (COL_SHIFT - 1)) / W4;
176

  
177
        a0 = W4 * col[8 * 0];
178
        a1 = W4 * col[8 * 0];
179
        a2 = W4 * col[8 * 0];
180
        a3 = W4 * col[8 * 0];
181

  
182
        if (col[8 * 2]) {
183
                a0 += W2 * col[8 * 2];
184
                a1 += W6 * col[8 * 2];
185
                a2 -= W6 * col[8 * 2];
186
                a3 -= W2 * col[8 * 2];
187
        }
188

  
189
        if (col[8 * 4]) {
190
                a0 += W4 * col[8 * 4];
191
                a1 -= W4 * col[8 * 4];
192
                a2 -= W4 * col[8 * 4];
193
                a3 += W4 * col[8 * 4];
194
        }
195

  
196
        if (col[8 * 6]) {
197
                a0 += W6 * col[8 * 6];
198
                a1 -= W2 * col[8 * 6];
199
                a2 += W2 * col[8 * 6];
200
                a3 -= W6 * col[8 * 6];
201
        }
202

  
203
        if (col[8 * 1]) {
204
                b0 = W1 * col[8 * 1];
205
                b1 = W3 * col[8 * 1];
206
                b2 = W5 * col[8 * 1];
207
                b3 = W7 * col[8 * 1];
208
        } else {
209
                b0 = b1 = b2 = b3 = 0;
210
        }
211

  
212
        if (col[8 * 3]) {
213
                b0 += W3 * col[8 * 3];
214
                b1 -= W7 * col[8 * 3];
215
                b2 -= W1 * col[8 * 3];
216
                b3 -= W5 * col[8 * 3];
217
        }
218

  
219
        if (col[8 * 5]) {
220
                b0 += W5 * col[8 * 5];
221
                b1 -= W1 * col[8 * 5];
222
                b2 += W7 * col[8 * 5];
223
                b3 += W3 * col[8 * 5];
224
        }
225

  
226
        if (col[8 * 7]) {
227
                b0 += W7 * col[8 * 7];
228
                b1 -= W5 * col[8 * 7];
229
                b2 += W3 * col[8 * 7];
230
                b3 -= W1 * col[8 * 7];
231
        }
232

  
233
        col[8 * 0] = (a0 + b0) >> COL_SHIFT;
234
        col[8 * 7] = (a0 - b0) >> COL_SHIFT;
235
        col[8 * 1] = (a1 + b1) >> COL_SHIFT;
236
        col[8 * 6] = (a1 - b1) >> COL_SHIFT;
237
        col[8 * 2] = (a2 + b2) >> COL_SHIFT;
238
        col[8 * 5] = (a2 - b2) >> COL_SHIFT;
239
        col[8 * 3] = (a3 + b3) >> COL_SHIFT;
240
        col[8 * 4] = (a3 - b3) >> COL_SHIFT;
241
}
242

  
170 243
#else  /* not ARCH_ALPHA */
171 244

  
172 245
static inline void idctRowCondDC (int16_t * row)

Also available in: Unified diff