~siretart/ubuntu/utopic/libav/libav10

« back to all changes in this revision

Viewing changes to libavcodec/sparc/vis.h

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-05-11 12:28:45 UTC
  • mfrom: (1.1.22) (2.1.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140511122845-gxvpts83i958y0i5
Tags: 6:10.1-1
* New upstream release 10:
   - pcm-dvd: Fix 20bit decoding (bug/592)
   - avi: Improve non-interleaved detection (bug/666)
   - arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6
   - arm: hpeldsp: prevent overreads in armv6 asm (bug/646)
   - avfilter: Add missing emms_c when needed
   - rtmpproto: Check the buffer sizes when copying app/playpath strings
   - swscale: Fix an undefined behaviour
   - vp9: Read the frame size as unsigned
   - dcadec: Use correct channel count in stereo downmix check
   - dcadec: Do not decode the XCh extension when downmixing to stereo
   - matroska: add the Opus mapping
   - matroskadec: read the CodecDelay element
   - rtmpproto: Make sure to pass on the error code if read_connect failed
   - lavr: allocate the resampling buffer with a positive size
   - mp3enc: Properly write bitrate value in XING header (Closes: #736088)
   - golomb: Fix the implementation of get_se_golomb_long
* Drop debian/libav-tools.maintscript. ffserver is no longer found in
  stable, and this seems to cause other problems today (Closes: #742676)

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#ifndef AVCODEC_SPARC_VIS_H
43
43
#define AVCODEC_SPARC_VIS_H
44
44
 
 
45
#define ACCEL_SPARC_VIS 1
 
46
#define ACCEL_SPARC_VIS2 2
 
47
 
 
48
static inline int vis_level(void)
 
49
{
 
50
    int accel = 0;
 
51
    accel |= ACCEL_SPARC_VIS;
 
52
    accel |= ACCEL_SPARC_VIS2;
 
53
    return accel;
 
54
}
 
55
 
45
56
#define vis_opc_base    ((0x1 << 31) | (0x36 << 19))
46
57
#define vis_opf(X)      ((X) << 5)
47
58
#define vis_sreg(X)     (X)
139
150
#define vis_m2r_2(op,mem1,mem2,rd) \
140
151
        __asm__ volatile (#op "\t[%0 + %1], %%f" #rd : : "r" (mem1), "r" (mem2) )
141
152
 
142
 
static inline void vis_set_gsr(unsigned int _val)
 
153
static inline void vis_set_gsr(unsigned int val)
143
154
{
144
 
        register unsigned int val __asm__("g1");
145
 
 
146
 
        val = _val;
147
 
        __asm__ volatile(".word 0xa7804000"
 
155
        __asm__ volatile("mov %0,%%asr19"
148
156
                             : : "r" (val));
149
157
}
150
158
 
162
170
#define vis_st64(rs1,mem)               vis_r2m(std, rs1, mem)
163
171
#define vis_st64_2(rs1,mem1,mem2)       vis_r2m_2(std, rs1, mem1, mem2)
164
172
 
165
 
#define vis_ldblk(mem, rd) \
166
 
do {        register void *__mem __asm__("g1"); \
167
 
        __mem = &(mem); \
168
 
        __asm__ volatile(".word 0xc1985e00 | %1" \
169
 
                             : \
170
 
                             : "r" (__mem), \
171
 
                               "i" (vis_rd_d(rd)) \
172
 
                             : "memory"); \
173
 
} while (0)
174
 
 
175
 
#define vis_stblk(rd, mem) \
176
 
do {        register void *__mem __asm__("g1"); \
177
 
        __mem = &(mem); \
178
 
        __asm__ volatile(".word 0xc1b85e00 | %1" \
179
 
                             : \
180
 
                             : "r" (__mem), \
181
 
                               "i" (vis_rd_d(rd)) \
182
 
                             : "memory"); \
183
 
} while (0)
184
 
 
185
 
#define vis_membar_storestore()        \
186
 
        __asm__ volatile(".word 0x8143e008" : : : "memory")
187
 
 
188
 
#define vis_membar_sync()        \
189
 
        __asm__ volatile(".word 0x8143e040" : : : "memory")
190
 
 
191
173
/* 16 and 32 bit partitioned addition and subtraction.  The normal
192
174
 * versions perform 4 16-bit or 2 32-bit additions or subtractions.
193
175
 * The 's' versions perform 2 16-bit or 1 32-bit additions or
223
205
 
224
206
/* Alignment instructions.  */
225
207
 
226
 
static inline const void *vis_alignaddr(const void *_ptr)
227
 
{
228
 
        register const void *ptr __asm__("g1");
229
 
 
230
 
        ptr = _ptr;
231
 
 
232
 
        __asm__ volatile(".word %2"
233
 
                             : "=&r" (ptr)
234
 
                             : "0" (ptr),
235
 
                               "i" (vis_opc_base | vis_opf(0x18) |
236
 
                                    vis_rs1_s(1) |
237
 
                                    vis_rs2_s(0) |
238
 
                                    vis_rd_s(1)));
239
 
 
240
 
        return ptr;
241
 
}
242
 
 
243
 
static inline void vis_alignaddr_g0(void *_ptr)
244
 
{
245
 
        register void *ptr __asm__("g1");
246
 
 
247
 
        ptr = _ptr;
248
 
 
249
 
        __asm__ volatile(".word %2"
250
 
                             : "=&r" (ptr)
251
 
                             : "0" (ptr),
252
 
                               "i" (vis_opc_base | vis_opf(0x18) |
253
 
                                    vis_rs1_s(1) |
254
 
                                    vis_rs2_s(0) |
255
 
                                    vis_rd_s(0)));
256
 
}
257
 
 
258
 
static inline void *vis_alignaddrl(void *_ptr)
259
 
{
260
 
        register void *ptr __asm__("g1");
261
 
 
262
 
        ptr = _ptr;
263
 
 
264
 
        __asm__ volatile(".word %2"
265
 
                             : "=&r" (ptr)
266
 
                             : "0" (ptr),
267
 
                               "i" (vis_opc_base | vis_opf(0x19) |
268
 
                                    vis_rs1_s(1) |
269
 
                                    vis_rs2_s(0) |
270
 
                                    vis_rd_s(1)));
271
 
 
272
 
        return ptr;
273
 
}
274
 
 
275
 
static inline void vis_alignaddrl_g0(void *_ptr)
276
 
{
277
 
        register void *ptr __asm__("g1");
278
 
 
279
 
        ptr = _ptr;
280
 
 
281
 
        __asm__ volatile(".word %2"
282
 
                             : "=&r" (ptr)
283
 
                             : "0" (ptr),
284
 
                               "i" (vis_opc_base | vis_opf(0x19) |
285
 
                                    vis_rs1_s(1) |
286
 
                                    vis_rs2_s(0) |
287
 
                                    vis_rd_s(0)));
 
208
static inline const void *vis_alignaddr(const void *ptr)
 
209
{
 
210
        __asm__ volatile("alignaddr %0, %%g0, %0"
 
211
                             : "=&r" (ptr)
 
212
                             : "0" (ptr));
 
213
 
 
214
        return ptr;
 
215
}
 
216
 
 
217
static inline void vis_alignaddr_g0(void *ptr)
 
218
{
 
219
        __asm__ volatile("alignaddr %0, %%g0, %%g0"
 
220
                             : : "r" (ptr));
288
221
}
289
222
 
290
223
#define vis_faligndata(rs1,rs2,rd)        vis_dd2d(0x48, rs1, rs2, rd)