~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/mlib/dsputil_mlib.c

  • Committer: Bazaar Package Importer
  • Author(s): John Dong
  • Date: 2008-02-25 15:47:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080225154712-qvr11ekcea4c9ry8
Tags: 1.1.6-0.1ubuntu1
* Merge from debian-multimedia (LP: #120003), Ubuntu Changes:
 - For ffmpeg-related build-deps, remove cvs from package names.
 - Standards-Version 3.7.3
 - Maintainer Spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * Sun mediaLib optimized DSP utils
3
3
 * Copyright (c) 2001 Fabrice Bellard.
4
4
 *
5
 
 * This library is free software; you can redistribute it and/or
 
5
 * This file is part of FFmpeg.
 
6
 *
 
7
 * FFmpeg is free software; you can redistribute it and/or
6
8
 * modify it under the terms of the GNU Lesser General Public
7
9
 * License as published by the Free Software Foundation; either
8
 
 * version 2 of the License, or (at your option) any later version.
 
10
 * version 2.1 of the License, or (at your option) any later version.
9
11
 *
10
 
 * This library is distributed in the hope that it will be useful,
 
12
 * FFmpeg is distributed in the hope that it will be useful,
11
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
15
 * Lesser General Public License for more details.
14
16
 *
15
17
 * You should have received a copy of the GNU Lesser General Public
16
 
 * License along with this library; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 * License along with FFmpeg; if not, write to the Free Software
 
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
20
 */
19
21
 
20
22
#include "../dsputil.h"
23
25
#include <mlib_types.h>
24
26
#include <mlib_status.h>
25
27
#include <mlib_sys.h>
 
28
#include <mlib_algebra.h>
26
29
#include <mlib_video.h>
27
30
 
28
 
 
29
 
/* copy block, width 16 pixel, height 8/16 */
 
31
/* misc */
 
32
 
 
33
static void get_pixels_mlib(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
 
34
{
 
35
  int i;
 
36
 
 
37
  for (i=0;i<8;i++) {
 
38
    mlib_VectorConvert_S16_U8_Mod((mlib_s16 *)block, (mlib_u8 *)pixels, 8);
 
39
 
 
40
    pixels += line_size;
 
41
    block += 8;
 
42
  }
 
43
}
 
44
 
 
45
static void diff_pixels_mlib(DCTELEM *restrict block, const uint8_t *s1, const uint8_t *s2, int line_size)
 
46
{
 
47
  int i;
 
48
 
 
49
  for (i=0;i<8;i++) {
 
50
    mlib_VectorSub_S16_U8_Mod((mlib_s16 *)block, (mlib_u8 *)s1, (mlib_u8 *)s2, 8);
 
51
 
 
52
    s1 += line_size;
 
53
    s2 += line_size;
 
54
    block += 8;
 
55
  }
 
56
}
 
57
 
 
58
static void add_pixels_clamped_mlib(const DCTELEM *block, uint8_t *pixels, int line_size)
 
59
{
 
60
    mlib_VideoAddBlock_U8_S16(pixels, (mlib_s16 *)block, line_size);
 
61
}
 
62
 
 
63
/* put block, width 16 pixel, height 8/16 */
30
64
 
31
65
static void put_pixels16_mlib (uint8_t * dest, const uint8_t * ref,
32
 
                               int stride, int height)
 
66
                               int stride, int height)
33
67
{
34
 
    assert(height == 16 || height == 8);
35
 
    if (height == 16)
36
 
        mlib_VideoCopyRef_U8_U8_16x16(dest, (uint8_t *)ref, stride);
37
 
    else
38
 
        mlib_VideoCopyRef_U8_U8_16x8 (dest, (uint8_t *)ref, stride);
 
68
  switch (height) {
 
69
    case 8:
 
70
      mlib_VideoCopyRef_U8_U8_16x8(dest, (uint8_t *)ref, stride);
 
71
    break;
 
72
 
 
73
    case 16:
 
74
      mlib_VideoCopyRef_U8_U8_16x16(dest, (uint8_t *)ref, stride);
 
75
    break;
 
76
 
 
77
    default:
 
78
      assert(0);
 
79
  }
39
80
}
40
81
 
41
82
static void put_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref,
42
 
                                  int stride, int height)
 
83
                                  int stride, int height)
43
84
{
44
 
    assert(height == 16 || height == 8);
45
 
    if (height == 16)
46
 
        mlib_VideoInterpX_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
47
 
    else
48
 
        mlib_VideoInterpX_U8_U8_16x8 (dest, (uint8_t *)ref, stride, stride);
 
85
  switch (height) {
 
86
    case 8:
 
87
      mlib_VideoInterpX_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
 
88
    break;
 
89
 
 
90
    case 16:
 
91
      mlib_VideoInterpX_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
 
92
    break;
 
93
 
 
94
    default:
 
95
      assert(0);
 
96
  }
49
97
}
50
98
 
51
99
static void put_pixels16_y2_mlib (uint8_t * dest, const uint8_t * ref,
52
 
                                  int stride, int height)
 
100
                                  int stride, int height)
53
101
{
54
 
    assert(height == 16 || height == 8);
55
 
    if (height == 16)
56
 
        mlib_VideoInterpY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
57
 
    else
58
 
        mlib_VideoInterpY_U8_U8_16x8 (dest, (uint8_t *)ref, stride, stride);
 
102
  switch (height) {
 
103
    case 8:
 
104
      mlib_VideoInterpY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
 
105
    break;
 
106
 
 
107
    case 16:
 
108
      mlib_VideoInterpY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
 
109
    break;
 
110
 
 
111
    default:
 
112
      assert(0);
 
113
  }
59
114
}
60
115
 
61
116
static void put_pixels16_xy2_mlib(uint8_t * dest, const uint8_t * ref,
62
 
                                  int stride, int height)
 
117
                                  int stride, int height)
63
118
{
64
 
    assert(height == 16 || height == 8);
65
 
    if (height == 16) 
66
 
        mlib_VideoInterpXY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
67
 
    else
68
 
        mlib_VideoInterpXY_U8_U8_16x8 (dest, (uint8_t *)ref, stride, stride);
 
119
  switch (height) {
 
120
    case 8:
 
121
      mlib_VideoInterpXY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
 
122
    break;
 
123
 
 
124
    case 16:
 
125
      mlib_VideoInterpXY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
 
126
    break;
 
127
 
 
128
    default:
 
129
      assert(0);
 
130
  }
69
131
}
70
132
 
71
 
 
72
 
/* copy block, width 8 pixel, height 8/16 */
 
133
/* put block, width 8 pixel, height 4/8/16 */
73
134
 
74
135
static void put_pixels8_mlib (uint8_t * dest, const uint8_t * ref,
75
 
                              int stride, int height)
 
136
                               int stride, int height)
76
137
{
77
 
    assert(height == 16 || height == 8);
78
 
    if (height == 16)
79
 
        mlib_VideoCopyRef_U8_U8_8x16(dest, (uint8_t *)ref, stride);
80
 
    else
81
 
        mlib_VideoCopyRef_U8_U8_8x8 (dest, (uint8_t *)ref, stride);
 
138
  switch (height) {
 
139
    case 4:
 
140
      mlib_VideoCopyRef_U8_U8_8x4(dest, (uint8_t *)ref, stride);
 
141
    break;
 
142
 
 
143
    case 8:
 
144
      mlib_VideoCopyRef_U8_U8_8x8(dest, (uint8_t *)ref, stride);
 
145
    break;
 
146
 
 
147
    case 16:
 
148
      mlib_VideoCopyRef_U8_U8_8x16(dest, (uint8_t *)ref, stride);
 
149
    break;
 
150
 
 
151
    default:
 
152
      assert(0);
 
153
  }
82
154
}
83
155
 
84
156
static void put_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref,
85
 
                                 int stride, int height)
 
157
                                  int stride, int height)
86
158
{
87
 
    assert(height == 16 || height == 8);
88
 
    if (height == 16)
89
 
        mlib_VideoInterpX_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
90
 
    else
91
 
        mlib_VideoInterpX_U8_U8_8x8 (dest, (uint8_t *)ref, stride, stride);
 
159
  switch (height) {
 
160
    case 4:
 
161
      mlib_VideoInterpX_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
 
162
    break;
 
163
 
 
164
    case 8:
 
165
      mlib_VideoInterpX_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
 
166
    break;
 
167
 
 
168
    case 16:
 
169
      mlib_VideoInterpX_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
 
170
    break;
 
171
 
 
172
    default:
 
173
      assert(0);
 
174
  }
92
175
}
93
176
 
94
177
static void put_pixels8_y2_mlib (uint8_t * dest, const uint8_t * ref,
95
 
                                 int stride, int height)
 
178
                                  int stride, int height)
96
179
{
97
 
    assert(height == 16 || height == 8);
98
 
    if (height == 16)
99
 
        mlib_VideoInterpY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
100
 
    else
101
 
        mlib_VideoInterpY_U8_U8_8x8 (dest, (uint8_t *)ref, stride, stride);
 
180
  switch (height) {
 
181
    case 4:
 
182
      mlib_VideoInterpY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
 
183
    break;
 
184
 
 
185
    case 8:
 
186
      mlib_VideoInterpY_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
 
187
    break;
 
188
 
 
189
    case 16:
 
190
      mlib_VideoInterpY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
 
191
    break;
 
192
 
 
193
    default:
 
194
      assert(0);
 
195
  }
102
196
}
103
197
 
104
198
static void put_pixels8_xy2_mlib(uint8_t * dest, const uint8_t * ref,
105
 
                                 int stride, int height)
 
199
                                  int stride, int height)
106
200
{
107
 
    assert(height == 16 || height == 8);
108
 
    if (height == 16) 
109
 
        mlib_VideoInterpXY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
110
 
    else
111
 
        mlib_VideoInterpXY_U8_U8_8x8 (dest, (uint8_t *)ref, stride, stride);
 
201
  switch (height) {
 
202
    case 4:
 
203
      mlib_VideoInterpXY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
 
204
    break;
 
205
 
 
206
    case 8:
 
207
      mlib_VideoInterpXY_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
 
208
    break;
 
209
 
 
210
    case 16:
 
211
      mlib_VideoInterpXY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
 
212
    break;
 
213
 
 
214
    default:
 
215
      assert(0);
 
216
  }
112
217
}
113
218
 
114
 
 
115
 
/* average/merge dest+source block, width 16 pixel, height 8/16 */
 
219
/* average block, width 16 pixel, height 8/16 */
116
220
 
117
221
static void avg_pixels16_mlib (uint8_t * dest, const uint8_t * ref,
118
 
                               int stride, int height)
 
222
                               int stride, int height)
119
223
{
120
 
    assert(height == 16 || height == 8);
121
 
    if (height == 16)
122
 
        mlib_VideoCopyRefAve_U8_U8_16x16(dest, (uint8_t *)ref, stride);
123
 
    else
124
 
        mlib_VideoCopyRefAve_U8_U8_16x8 (dest, (uint8_t *)ref, stride);
 
224
  switch (height) {
 
225
    case 8:
 
226
      mlib_VideoCopyRefAve_U8_U8_16x8(dest, (uint8_t *)ref, stride);
 
227
    break;
 
228
 
 
229
    case 16:
 
230
      mlib_VideoCopyRefAve_U8_U8_16x16(dest, (uint8_t *)ref, stride);
 
231
    break;
 
232
 
 
233
    default:
 
234
      assert(0);
 
235
  }
125
236
}
126
237
 
127
238
static void avg_pixels16_x2_mlib (uint8_t * dest, const uint8_t * ref,
128
 
                                  int stride, int height)
 
239
                                  int stride, int height)
129
240
{
130
 
    assert(height == 16 || height == 8);
131
 
    if (height == 16)
132
 
        mlib_VideoInterpAveX_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
133
 
    else
134
 
        mlib_VideoInterpAveX_U8_U8_16x8 (dest, (uint8_t *)ref, stride, stride);
 
241
  switch (height) {
 
242
    case 8:
 
243
      mlib_VideoInterpAveX_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
 
244
    break;
 
245
 
 
246
    case 16:
 
247
      mlib_VideoInterpAveX_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
 
248
    break;
 
249
 
 
250
    default:
 
251
      assert(0);
 
252
  }
135
253
}
136
254
 
137
255
static void avg_pixels16_y2_mlib (uint8_t * dest, const uint8_t * ref,
138
 
                                  int stride, int height)
139
 
{
140
 
    assert(height == 16 || height == 8);
141
 
    if (height == 16)
142
 
        mlib_VideoInterpAveY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
143
 
    else
144
 
        mlib_VideoInterpAveY_U8_U8_16x8 (dest, (uint8_t *)ref, stride, stride);
145
 
}
146
 
 
147
 
static void avg_pixels16_xy2_mlib (uint8_t * dest, const uint8_t * ref,
148
 
                                   int stride, int height)
149
 
{
150
 
    assert(height == 16 || height == 8);
151
 
    if (height == 16)
152
 
        mlib_VideoInterpAveXY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
153
 
    else
154
 
        mlib_VideoInterpAveXY_U8_U8_16x8 (dest, (uint8_t *)ref, stride, stride);
155
 
}
156
 
 
157
 
 
158
 
/* average/merge dest+source block, width 8 pixel, height 8/16 */
 
256
                                  int stride, int height)
 
257
{
 
258
  switch (height) {
 
259
    case 8:
 
260
      mlib_VideoInterpAveY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
 
261
    break;
 
262
 
 
263
    case 16:
 
264
      mlib_VideoInterpAveY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
 
265
    break;
 
266
 
 
267
    default:
 
268
      assert(0);
 
269
  }
 
270
}
 
271
 
 
272
static void avg_pixels16_xy2_mlib(uint8_t * dest, const uint8_t * ref,
 
273
                                  int stride, int height)
 
274
{
 
275
  switch (height) {
 
276
    case 8:
 
277
      mlib_VideoInterpAveXY_U8_U8_16x8(dest, (uint8_t *)ref, stride, stride);
 
278
    break;
 
279
 
 
280
    case 16:
 
281
      mlib_VideoInterpAveXY_U8_U8_16x16(dest, (uint8_t *)ref, stride, stride);
 
282
    break;
 
283
 
 
284
    default:
 
285
      assert(0);
 
286
  }
 
287
}
 
288
 
 
289
/* average block, width 8 pixel, height 4/8/16 */
159
290
 
160
291
static void avg_pixels8_mlib (uint8_t * dest, const uint8_t * ref,
161
 
                              int stride, int height)
 
292
                               int stride, int height)
162
293
{
163
 
    assert(height == 16 || height == 8);
164
 
    if (height == 16)
165
 
        mlib_VideoCopyRefAve_U8_U8_8x16(dest, (uint8_t *)ref, stride);
166
 
    else
167
 
        mlib_VideoCopyRefAve_U8_U8_8x8 (dest, (uint8_t *)ref, stride);
 
294
  switch (height) {
 
295
    case 4:
 
296
      mlib_VideoCopyRefAve_U8_U8_8x4(dest, (uint8_t *)ref, stride);
 
297
    break;
 
298
 
 
299
    case 8:
 
300
      mlib_VideoCopyRefAve_U8_U8_8x8(dest, (uint8_t *)ref, stride);
 
301
    break;
 
302
 
 
303
    case 16:
 
304
      mlib_VideoCopyRefAve_U8_U8_8x16(dest, (uint8_t *)ref, stride);
 
305
    break;
 
306
 
 
307
    default:
 
308
      assert(0);
 
309
  }
168
310
}
169
311
 
170
312
static void avg_pixels8_x2_mlib (uint8_t * dest, const uint8_t * ref,
171
 
                                 int stride, int height)
 
313
                                  int stride, int height)
172
314
{
173
 
    assert(height == 16 || height == 8);
174
 
    if (height == 16)
175
 
        mlib_VideoInterpAveX_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
176
 
    else
177
 
        mlib_VideoInterpAveX_U8_U8_8x8 (dest, (uint8_t *)ref, stride, stride);
 
315
  switch (height) {
 
316
    case 4:
 
317
      mlib_VideoInterpAveX_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
 
318
    break;
 
319
 
 
320
    case 8:
 
321
      mlib_VideoInterpAveX_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
 
322
    break;
 
323
 
 
324
    case 16:
 
325
      mlib_VideoInterpAveX_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
 
326
    break;
 
327
 
 
328
    default:
 
329
      assert(0);
 
330
  }
178
331
}
179
332
 
180
333
static void avg_pixels8_y2_mlib (uint8_t * dest, const uint8_t * ref,
181
 
                                 int stride, int height)
182
 
{
183
 
    assert(height == 16 || height == 8);
184
 
    if (height == 16)
185
 
        mlib_VideoInterpAveY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
186
 
    else
187
 
        mlib_VideoInterpAveY_U8_U8_8x8 (dest, (uint8_t *)ref, stride, stride);
188
 
}
189
 
 
190
 
static void avg_pixels8_xy2_mlib (uint8_t * dest, const uint8_t * ref,
191
 
                                  int stride, int height)
192
 
{
193
 
    assert(height == 16 || height == 8);
194
 
    if (height == 16)
195
 
        mlib_VideoInterpAveXY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
196
 
    else
197
 
        mlib_VideoInterpAveXY_U8_U8_8x8 (dest, (uint8_t *)ref, stride, stride);
198
 
}
199
 
 
200
 
 
201
 
static void (*put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
202
 
 
203
 
 
204
 
static void add_pixels_clamped_mlib(const DCTELEM *block, uint8_t *pixels, int line_size)
205
 
{
206
 
    mlib_VideoAddBlock_U8_S16(pixels, (mlib_s16 *)block, line_size);
207
 
}
208
 
 
209
 
 
210
 
/* XXX: those functions should be suppressed ASAP when all IDCTs are
211
 
   converted */
 
334
                                  int stride, int height)
 
335
{
 
336
  switch (height) {
 
337
    case 4:
 
338
      mlib_VideoInterpAveY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
 
339
    break;
 
340
 
 
341
    case 8:
 
342
      mlib_VideoInterpAveY_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
 
343
    break;
 
344
 
 
345
    case 16:
 
346
      mlib_VideoInterpAveY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
 
347
    break;
 
348
 
 
349
    default:
 
350
      assert(0);
 
351
  }
 
352
}
 
353
 
 
354
static void avg_pixels8_xy2_mlib(uint8_t * dest, const uint8_t * ref,
 
355
                                  int stride, int height)
 
356
{
 
357
  switch (height) {
 
358
    case 4:
 
359
      mlib_VideoInterpAveXY_U8_U8_8x4(dest, (uint8_t *)ref, stride, stride);
 
360
    break;
 
361
 
 
362
    case 8:
 
363
      mlib_VideoInterpAveXY_U8_U8_8x8(dest, (uint8_t *)ref, stride, stride);
 
364
    break;
 
365
 
 
366
    case 16:
 
367
      mlib_VideoInterpAveXY_U8_U8_8x16(dest, (uint8_t *)ref, stride, stride);
 
368
    break;
 
369
 
 
370
    default:
 
371
      assert(0);
 
372
  }
 
373
}
 
374
 
 
375
/* swap byte order of a buffer */
 
376
 
 
377
static void bswap_buf_mlib(uint32_t *dst, uint32_t *src, int w)
 
378
{
 
379
  mlib_VectorReverseByteOrder_U32_U32(dst, src, w);
 
380
}
 
381
 
 
382
/* transformations */
 
383
 
212
384
static void ff_idct_put_mlib(uint8_t *dest, int line_size, DCTELEM *data)
213
385
{
 
386
    int i;
 
387
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
 
388
 
214
389
    mlib_VideoIDCT8x8_S16_S16 (data, data);
215
 
    put_pixels_clamped(data, dest, line_size);
 
390
 
 
391
    for(i=0;i<8;i++) {
 
392
        dest[0] = cm[data[0]];
 
393
        dest[1] = cm[data[1]];
 
394
        dest[2] = cm[data[2]];
 
395
        dest[3] = cm[data[3]];
 
396
        dest[4] = cm[data[4]];
 
397
        dest[5] = cm[data[5]];
 
398
        dest[6] = cm[data[6]];
 
399
        dest[7] = cm[data[7]];
 
400
 
 
401
        dest += line_size;
 
402
        data += 8;
 
403
    }
216
404
}
217
405
 
218
406
static void ff_idct_add_mlib(uint8_t *dest, int line_size, DCTELEM *data)
221
409
    mlib_VideoAddBlock_U8_S16(dest, (mlib_s16 *)data, line_size);
222
410
}
223
411
 
224
 
static void ff_idct_mlib(uint8_t *dest, int line_size, DCTELEM *data)
 
412
static void ff_idct_mlib(DCTELEM *data)
225
413
{
226
414
    mlib_VideoIDCT8x8_S16_S16 (data, data);
227
415
}
233
421
 
234
422
void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx)
235
423
{
 
424
    c->get_pixels  = get_pixels_mlib;
 
425
    c->diff_pixels = diff_pixels_mlib;
 
426
    c->add_pixels_clamped = add_pixels_clamped_mlib;
 
427
 
236
428
    c->put_pixels_tab[0][0] = put_pixels16_mlib;
237
429
    c->put_pixels_tab[0][1] = put_pixels16_x2_mlib;
238
430
    c->put_pixels_tab[0][2] = put_pixels16_y2_mlib;
254
446
    c->put_no_rnd_pixels_tab[0][0] = put_pixels16_mlib;
255
447
    c->put_no_rnd_pixels_tab[1][0] = put_pixels8_mlib;
256
448
 
257
 
    c->add_pixels_clamped = add_pixels_clamped_mlib;
258
 
    put_pixels_clamped = c->put_pixels_clamped;
 
449
    c->bswap_buf = bswap_buf_mlib;
259
450
}
260
451
 
261
452
void MPV_common_init_mlib(MpegEncContext *s)
262
453
{
263
 
    int i;
264
 
 
265
454
    if(s->avctx->dct_algo==FF_DCT_AUTO || s->avctx->dct_algo==FF_DCT_MLIB){
266
 
        s->dsp.fdct = ff_fdct_mlib;
 
455
        s->dsp.fdct = ff_fdct_mlib;
267
456
    }
268
457
 
269
458
    if(s->avctx->idct_algo==FF_IDCT_AUTO || s->avctx->idct_algo==FF_IDCT_MLIB){