~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/x86/h264_weight_10bit.asm

  • Committer: Gauvain Pocentek
  • Date: 2012-03-06 11:59:12 UTC
  • mfrom: (66.1.15 precise)
  • Revision ID: gauvain@pocentek.net-20120306115912-h9d6kt9j0l532oo5
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* New upstream snapshot
* upload to unstable
* Build against external libmpeg2
* drop 51_FTBFS_arm.patch again
* no longer build depend on libcdparanoia-dev on the Hurd
* Fix FTBFS on the hurd.
  Thanks to Samuel Thibault <sthibault@debian.org> (Closes: #654974)
* Fix FTBFS on arm
* New upstream snapshot, Closes: #650339, #643621, #481807
* Imported Upstream version 1.0~rc4+svn34492
* Bump standards version
* Bump dependency on libav >= 4:0.8~, Closes: #653887
* Fix build-indep
* Build mplayer-gui again, Closes: #568514
* Drop debian/all-lang-config-mak.sh, no longer needed
* include .dfsg1 in version number
* remove get-orig-source target
* no longer prune compiler flags from the environment
* No longer advertise nor build 3fdx, mga and dxr3 backends,
  Closes: #496106, #442181, #533546
* beautify mplayer version identification string
* Brown paperbag upload.
* Next try to fix build failure on sparce after recent binutils change.
* Brown paperbag upload.
* Really fix build failure on sparc after recent binutils change.
* Properly set Replaces/Conflicts on mplayer2{,-dbg} to avoid
  file overwrite errors.
* Adjust versioning of mplayer listed in the mplayer-dbg's Depends field.
* Fix build failure on sparc after recent binutils change.
* Urgency medium bumped because of RC-level bugfix
  and speeding up x264 transition.
* Update to my @debian.org email.
* Upload to unstable
* Enable joystick support on Linux only, Closes: #638408
* Rebuild fixes toolchain issue on arm, Closes: #637077
* New upstream snapshot
* following the discussion started by Diego Biurrun <diego@biurrun.de>
  in debian-devel, I have prepared a new packaging of 'mplayer'
  (with code that comes from CVS)
* the upstream tar.bz cannot be distributed by Debian, since it contains
   CSS code; so I am repackaging it 
* I have tried my best to address all known issues:
  - the package contains the detailed Copyright made by Diego Biurrun 
  - the package does not contain CSS code, or  AFAIK other code on which 
     there is active patent enforcement
  - there is a script  debian/cvs-changelog.sh  that shows all changes
     done to files included in this source.
    This should comply with GPLv2 sec 2.a  (in spirit if not in letter)
    For this reason, the source code contains CVS directories.
* needs   make (>= 3.80) for 'html-chunked-$(1)' in DOCS/xml/Makefile

* some corrections, as suggested Diego Biurrun
  - binary codecs should go into /usr/lib/codecs (upstream default)
  - better template 'mplayer/install_codecs'
  - an empty 'font=' in mplayer.conf breaks mplayer: postinst corrected
* correction in 'mplayer/cfgnote'
* better mplayer.postinst and mplayer.config

* New upstream release
* better debian/copyright file
* do not ship a skin
* New upstream release
* changed DEB_BUILD_OPTIONS to DEB_BUILD_CONFIGURE ,
  DEB_BUILD_OPTIONS is used as in debian policy
* use gcc-3.4
* changed xlibs-dev to a long list of dependencies, for Debian/etch
* try to adhere to  http://www.mplayerhq.hu/DOCS/tech/binary-packaging.txt
  (see README.Debian for details)
* removed dependency on xlibmesa-dev, disabled opengl
* New upstream release
* Simon McVittie <hacks@pseudorandom.co.uk> wonderful work:
- Work around Debian bug #267442 (glibc's sys/uio.h and gcc's altivec.h have
  conflicting uses for __vector) by re-ordering #includes
- Fix potential symlink attack in ./configure
- Disable support for binary codecs on platforms for which those codecs
  aren't available; also disable the corresponding Debconf note when it's
  inappropriate
- Changed Build-Depends: so it works in pbuilder
- Explicitly build-depend on libjpeg62-dev, libfontconfig1-dev,
  libungif4-dev 
- Tweak debian/rules to avoid certain errors being ignored
- Use --language=all
* provide a target  'debian/rules get-orig-source' 
  that recreates the orig.tar.gz ; then use the above orig.tar.gz
* rewrote some parts of debian/rules
* don't clean and recompile docs if upstream ships them
* mplayer-doc was shipping too much stuff
* translated man pages where not installed properly
* compile with libdv4-dev
* correct README.Debian
* Forgot build-dep on libtheora
* Must not depend on libxvidcore
* New upstream release
* new release.
* rc1 to become 0.90
* new pre-release
* new pre-release
* gtk bug fixed.
* new release.
* version bumped
* 0.60 pre2 release
* 0.60 pre-release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
SECTION .text
37
37
 
38
38
;-----------------------------------------------------------------------------
39
 
; void h264_weight(uint8_t *dst, int stride, int log2_denom,
 
39
; void h264_weight(uint8_t *dst, int stride, int height, int log2_denom,
40
40
;                  int weight, int offset);
41
41
;-----------------------------------------------------------------------------
42
 
%ifdef ARCH_X86_32
43
 
DECLARE_REG_TMP 2
44
 
%else
45
 
DECLARE_REG_TMP 10
46
 
%endif
47
 
 
48
 
%macro WEIGHT_PROLOGUE 1
49
 
    mov t0, %1
 
42
%macro WEIGHT_PROLOGUE 0
50
43
.prologue
51
 
    PROLOGUE 0,5,8
 
44
    PROLOGUE 0,6,8
52
45
    movifnidn  r0, r0mp
53
46
    movifnidn r1d, r1m
54
 
    movifnidn r3d, r3m
 
47
    movifnidn r2d, r2m
55
48
    movifnidn r4d, r4m
 
49
    movifnidn r5d, r5m
56
50
%endmacro
57
51
 
58
52
%macro WEIGHT_SETUP 1
59
53
    mova       m0, [pw_1]
60
 
    movd       m2, r2m
 
54
    movd       m2, r3m
61
55
    pslld      m0, m2       ; 1<<log2_denom
62
56
    SPLATW     m0, m0
63
 
    shl        r4, 19       ; *8, move to upper half of dword
64
 
    lea        r4, [r4+r3*2+0x10000]
65
 
    movd       m3, r4d      ; weight<<1 | 1+(offset<<(3))
 
57
    shl        r5, 19       ; *8, move to upper half of dword
 
58
    lea        r5, [r5+r4*2+0x10000]
 
59
    movd       m3, r5d      ; weight<<1 | 1+(offset<<(3))
66
60
    pshufd     m3, m3, 0
67
61
    mova       m4, [pw_pixel_max]
68
62
    paddw      m2, [sq_1]   ; log2_denom+1
96
90
%endmacro
97
91
 
98
92
%macro WEIGHT_FUNC_DBL 1
99
 
cglobal h264_weight_16x16_10_%1
100
 
    WEIGHT_PROLOGUE 16
 
93
cglobal h264_weight_16_10_%1
 
94
    WEIGHT_PROLOGUE
101
95
    WEIGHT_SETUP %1
102
96
.nextrow
103
97
    WEIGHT_OP %1,  0
105
99
    WEIGHT_OP %1, 16
106
100
    mova [r0+16], m5
107
101
    add       r0, r1
108
 
    dec       t0
 
102
    dec       r2d
109
103
    jnz .nextrow
110
104
    REP_RET
111
 
 
112
 
cglobal h264_weight_16x8_10_%1
113
 
    mov t0, 8
114
 
    jmp mangle(ff_h264_weight_16x16_10_%1.prologue)
115
105
%endmacro
116
106
 
117
107
INIT_XMM
120
110
 
121
111
 
122
112
%macro WEIGHT_FUNC_MM 1
123
 
cglobal h264_weight_8x16_10_%1
124
 
    WEIGHT_PROLOGUE 16
 
113
cglobal h264_weight_8_10_%1
 
114
    WEIGHT_PROLOGUE
125
115
    WEIGHT_SETUP %1
126
116
.nextrow
127
117
    WEIGHT_OP  %1, 0
128
118
    mova     [r0], m5
129
119
    add        r0, r1
130
 
    dec        t0
 
120
    dec        r2d
131
121
    jnz .nextrow
132
122
    REP_RET
133
 
 
134
 
cglobal h264_weight_8x8_10_%1
135
 
    mov t0, 8
136
 
    jmp mangle(ff_h264_weight_8x16_10_%1.prologue)
137
 
 
138
 
cglobal h264_weight_8x4_10_%1
139
 
    mov t0, 4
140
 
    jmp mangle(ff_h264_weight_8x16_10_%1.prologue)
141
123
%endmacro
142
124
 
143
125
INIT_XMM
146
128
 
147
129
 
148
130
%macro WEIGHT_FUNC_HALF_MM 1
149
 
cglobal h264_weight_4x8_10_%1
150
 
    WEIGHT_PROLOGUE 4
 
131
cglobal h264_weight_4_10_%1
 
132
    WEIGHT_PROLOGUE
 
133
    sar         r2d, 1
151
134
    WEIGHT_SETUP %1
152
135
    lea         r3, [r1*2]
153
136
.nextrow
155
138
    movh      [r0], m5
156
139
    movhps [r0+r1], m5
157
140
    add         r0, r3
158
 
    dec         t0
 
141
    dec         r2d
159
142
    jnz .nextrow
160
143
    REP_RET
161
 
 
162
 
cglobal h264_weight_4x4_10_%1
163
 
    mov t0, 2
164
 
    jmp mangle(ff_h264_weight_4x8_10_%1.prologue)
165
 
 
166
 
cglobal h264_weight_4x2_10_%1
167
 
    mov t0, 1
168
 
    jmp mangle(ff_h264_weight_4x8_10_%1.prologue)
169
144
%endmacro
170
145
 
171
146
INIT_XMM
174
149
 
175
150
 
176
151
;-----------------------------------------------------------------------------
177
 
; void h264_biweight(uint8_t *dst, uint8_t *src, int stride, int log2_denom,
178
 
;                    int weightd, int weights, int offset);
 
152
; void h264_biweight(uint8_t *dst, uint8_t *src, int stride, int height,
 
153
;                    int log2_denom, int weightd, int weights, int offset);
179
154
;-----------------------------------------------------------------------------
180
155
%ifdef ARCH_X86_32
181
 
DECLARE_REG_TMP 2,3
 
156
DECLARE_REG_TMP 3
182
157
%else
183
 
DECLARE_REG_TMP 10,2
 
158
DECLARE_REG_TMP 10
184
159
%endif
185
160
 
186
 
%macro BIWEIGHT_PROLOGUE 1
187
 
    mov t0, %1
 
161
%macro BIWEIGHT_PROLOGUE 0
188
162
.prologue
189
163
    PROLOGUE 0,7,8
190
164
    movifnidn  r0, r0mp
191
165
    movifnidn  r1, r1mp
192
 
    movifnidn t1d, r2m
193
 
    movifnidn r4d, r4m
 
166
    movifnidn r2d, r2m
194
167
    movifnidn r5d, r5m
195
168
    movifnidn r6d, r6m
 
169
    movifnidn t0d, r7m
196
170
%endmacro
197
171
 
198
172
%macro BIWEIGHT_SETUP 1
199
 
    lea        r6, [r6*4+1] ; (offset<<2)+1
200
 
    or         r6, 1
201
 
    shl        r5, 16
202
 
    or         r4, r5
203
 
    movd       m4, r4d      ; weightd | weights
204
 
    movd       m5, r6d      ; (offset+1)|1
205
 
    movd       m6, r3m      ; log2_denom
 
173
    lea        t0, [t0*4+1] ; (offset<<2)+1
 
174
    or         t0, 1
 
175
    shl        r6, 16
 
176
    or         r5, r6
 
177
    movd       m4, r5d      ; weightd | weights
 
178
    movd       m5, t0d      ; (offset+1)|1
 
179
    movd       m6, r4m      ; log2_denom
206
180
    pslld      m5, m6       ; (((offset<<2)+1)|1)<<log2_denom
207
181
    paddd      m6, [sq_1]
208
182
    pshufd     m4, m4, 0
209
183
    pshufd     m5, m5, 0
210
184
    mova       m3, [pw_pixel_max]
 
185
    movifnidn r3d, r3m
211
186
%ifnidn %1, sse4
212
187
    pxor       m7, m7
213
188
%endif
243
218
%endmacro
244
219
 
245
220
%macro BIWEIGHT_FUNC_DBL 1
246
 
cglobal h264_biweight_16x16_10_%1
247
 
    BIWEIGHT_PROLOGUE 16
 
221
cglobal h264_biweight_16_10_%1
 
222
    BIWEIGHT_PROLOGUE
248
223
    BIWEIGHT_SETUP %1
249
224
.nextrow
250
225
    BIWEIGHT  %1,  0
251
226
    mova [r0   ], m0
252
227
    BIWEIGHT  %1, 16
253
228
    mova [r0+16], m0
254
 
    add       r0, t1
255
 
    add       r1, t1
256
 
    dec       t0
 
229
    add       r0, r2
 
230
    add       r1, r2
 
231
    dec       r3d
257
232
    jnz .nextrow
258
233
    REP_RET
259
 
 
260
 
cglobal h264_biweight_16x8_10_%1
261
 
    mov t0, 8
262
 
    jmp mangle(ff_h264_biweight_16x16_10_%1.prologue)
263
234
%endmacro
264
235
 
265
236
INIT_XMM
267
238
BIWEIGHT_FUNC_DBL sse4
268
239
 
269
240
%macro BIWEIGHT_FUNC 1
270
 
cglobal h264_biweight_8x16_10_%1
271
 
    BIWEIGHT_PROLOGUE 16
 
241
cglobal h264_biweight_8_10_%1
 
242
    BIWEIGHT_PROLOGUE
272
243
    BIWEIGHT_SETUP %1
273
244
.nextrow
274
245
    BIWEIGHT %1, 0
275
246
    mova   [r0], m0
276
 
    add      r0, t1
277
 
    add      r1, t1
278
 
    dec      t0
 
247
    add      r0, r2
 
248
    add      r1, r2
 
249
    dec      r3d
279
250
    jnz .nextrow
280
251
    REP_RET
281
 
 
282
 
cglobal h264_biweight_8x8_10_%1
283
 
    mov t0, 8
284
 
    jmp mangle(ff_h264_biweight_8x16_10_%1.prologue)
285
 
 
286
 
cglobal h264_biweight_8x4_10_%1
287
 
    mov t0, 4
288
 
    jmp mangle(ff_h264_biweight_8x16_10_%1.prologue)
289
252
%endmacro
290
253
 
291
254
INIT_XMM
293
256
BIWEIGHT_FUNC sse4
294
257
 
295
258
%macro BIWEIGHT_FUNC_HALF 1
296
 
cglobal h264_biweight_4x8_10_%1
297
 
    BIWEIGHT_PROLOGUE 4
 
259
cglobal h264_biweight_4_10_%1
 
260
    BIWEIGHT_PROLOGUE
298
261
    BIWEIGHT_SETUP %1
299
 
    lea        r4, [t1*2]
 
262
    sar        r3d, 1
 
263
    lea        r4, [r2*2]
300
264
.nextrow
301
 
    BIWEIGHT    %1, 0, t1
 
265
    BIWEIGHT    %1, 0, r2
302
266
    movh   [r0   ], m0
303
 
    movhps [r0+t1], m0
 
267
    movhps [r0+r2], m0
304
268
    add         r0, r4
305
269
    add         r1, r4
306
 
    dec         t0
 
270
    dec         r3d
307
271
    jnz .nextrow
308
272
    REP_RET
309
 
 
310
 
cglobal h264_biweight_4x4_10_%1
311
 
    mov t0, 2
312
 
    jmp mangle(ff_h264_biweight_4x8_10_%1.prologue)
313
 
 
314
 
cglobal h264_biweight_4x2_10_%1
315
 
    mov t0, 1
316
 
    jmp mangle(ff_h264_biweight_4x8_10_%1.prologue)
317
273
%endmacro
318
274
 
319
275
INIT_XMM