~medibuntu-maintainers/mplayer/medibuntu.oneiric

« back to all changes in this revision

Viewing changes to libavcodec/ppc/gcc_fixes.h

  • Committer: Gauvain Pocentek
  • Date: 2010-09-25 09:39:02 UTC
  • mfrom: (66.1.6 maverick)
  • Revision ID: gauvain@images-20100925093902-9q2akz3ls3qzhaaw
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* merge from debian, remaining changes:
  - build depend against, lame, x264, xvid
* debian/patches/60eval-api.patch, backport patch from upstream to
  unbreak compilation for eval.h move not yet in 0.6
* gmplayer is gone now, please see smplayer as alternative frontend.
  LP: #503537, #493088, #467534, #467524, #460326, #390399, #285570,
      #208680, #118709, #513065, #459595, #455913, #179918, #65165.
* enable the mencoder package
* sort build depends alphabetically
* enable dvdnav support, Closes: #582508, #488226, LP: #611749
* prepare new upload
* no longer build mplayer-gui, it doesn't build anymore with shared
  swscale
* merge from debian/experimental, remaining changes:
  - build depend against, lame, x264, xvid
  - enable mencoder and mplayer-gui
* ensure that quilt patches are actually applied
* New Upstream Version, LP: #539315
* Build (against) again the System FFmpeg 
* tighten dependency on FFmpeg 0.6
* remove patches merged upstream
* remove 22disable-xscreensaver.patch
* refresh patches
* readd x264, xvid and mp3lame support, LP: #606125
* remove old parallel building mechanism, fixes FTBFS
* New upstream version
* compile against internal ffmpeg for now, LP: #587203, #588097
* recompile for directfb transtion, LP: #587163
* remove patches that were merged upstream
* avoid removing DOCS/html directory. it is included in release
  tarball
* convert to source Format: 3.0 (quilt)
* refreshed patches
* remove files that are included in upstream tarball
* rework debian/rules file
  - support parallel building
  - merge build rules for mplayer and mencoder package
  - remove unreferenced COMMON_CONFIGURE_FLAGS macro
  - rename DEB_BUILD_CONFIGURE -> CONFIGURE_FLAGS
  - don't build documentation - release tarballs have them prebuilt
  - build HTML documentation only if not already avaiable in the build
    tree
  - remove remaining references to debian/strip.sh from debian/rules
* remove copied vdpau headers
* copy in mencoder.c from upstream
* enable mplayer-gui (Closes: #579925) and mencoder packages. 
  (Closes: #396954, #400940, #580168)
* Fix rtsp vulnerability. Patch applied by DSA. Closes: #581245
* Fix another integer overflow, Closes: #524805
* prepare new upload
* sync libao2/ao_pulse.c with svn r30062, Closes: #558196, #580113
* make configure use pkg-config for fribidi checks. Closes: #582784,
  LP: #556200
* document 23mplayer-debug-printf.patch
* avoid mentioning of GTK frontend in mplayer description
* improve package descriptions of mplayer-doc and mplayer-dbg
* medium urgency because of fixed security issue
* fix SVN_VERION regex in debian rules to unbreak get-orig-source
  target. Closes: #582369
* forcefully disable arts support. Closes: #581225
* Remove mencoder from Depends in mplayer-dbg package.
* new upstream snapshot from rc3 branch.
* remove patches applied upstream:
  
  - 24_enable_fontconfig_by_default.diff
  - 30_add_gmplayer_man_rules.diff
  - 40_improve_desktop_file.patch
  - 41_fix_forcedsubsonly.patch
  - 50_fix_crashes_with_invalid_SDPs.patch
  - 50_fix_initial_volume_setting_pulse_output.patch
  - 61-malloc-bsd.patch
  - 62-disable-vidix-on-kfreebsd-amd64.patch
  - 63-sys-kd-include.patch
* don't install apport hook
* gross hack to avoid building mplayer-nogui and mplayer-gui packages
* add md5sum to remove to avoid spurious conffile prompt, Closes: #568272
* Make mplayer build on kFreeBSD (backports from upstream), Closes: #578622
  - Revert obscure hack that disables the malloc.h check on certain BSD
    platforms. 
  - disable vidix on kFreeBSD-amd64
  - rename 'struct keypad' -> 'struct m_keypad' to avoid FTBFS on
    kFreeBSD/amd64
* enable fontconfig by default. (Closes: #573257)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * gcc fixes for altivec.
3
 
 * Used to workaround broken gcc (FSF gcc-3 pre gcc-3.3)
4
 
 * and to stay somewhat compatible with Darwin.
5
 
 *
6
 
 * This file is part of FFmpeg.
7
 
 *
8
 
 * FFmpeg is free software; you can redistribute it and/or
9
 
 * modify it under the terms of the GNU Lesser General Public
10
 
 * License as published by the Free Software Foundation; either
11
 
 * version 2.1 of the License, or (at your option) any later version.
12
 
 *
13
 
 * FFmpeg is distributed in the hope that it will be useful,
14
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 
 * Lesser General Public License for more details.
17
 
 *
18
 
 * You should have received a copy of the GNU Lesser General Public
19
 
 * License along with FFmpeg; if not, write to the Free Software
20
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
 
 */
22
 
 
23
 
#ifndef AVCODEC_PPC_GCC_FIXES_H
24
 
#define AVCODEC_PPC_GCC_FIXES_H
25
 
 
26
 
#include "config.h"
27
 
 
28
 
#if HAVE_ALTIVEC_H
29
 
#include <altivec.h>
30
 
#endif
31
 
 
32
 
#if (__GNUC__ < 4)
33
 
# define REG_v(a)
34
 
#else
35
 
# define REG_v(a) __asm__ ( #a )
36
 
#endif
37
 
 
38
 
#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
39
 
 
40
 
/* This code was provided to me by Bartosch Pixa
41
 
 * as a separate header file (broken_mergel.h).
42
 
 * thanks to lu_zero for the workaround.
43
 
 *
44
 
 * See this mail for more information:
45
 
 * http://gcc.gnu.org/ml/gcc/2003-04/msg00967.html
46
 
 */
47
 
 
48
 
static inline vector signed char ff_vmrglb (vector signed char const A,
49
 
                                          vector signed char const B)
50
 
{
51
 
    static const vector unsigned char lowbyte = {
52
 
        0x08, 0x18, 0x09, 0x19, 0x0a, 0x1a, 0x0b,  0x1b,
53
 
        0x0c, 0x1c, 0x0d, 0x1d, 0x0e, 0x1e, 0x0f, 0x1f
54
 
    };
55
 
    return vec_perm (A, B, lowbyte);
56
 
}
57
 
 
58
 
static inline vector signed short ff_vmrglh (vector signed short const A,
59
 
                                          vector signed short const B)
60
 
{
61
 
    static const vector unsigned char lowhalf = {
62
 
        0x08, 0x09, 0x18, 0x19, 0x0a, 0x0b, 0x1a, 0x1b,
63
 
        0x0c, 0x0d, 0x1c, 0x1d, 0x0e, 0x0f, 0x1e, 0x1f
64
 
    };
65
 
    return vec_perm (A, B, lowhalf);
66
 
}
67
 
 
68
 
static inline vector signed int ff_vmrglw (vector signed int const A,
69
 
                                          vector signed int const B)
70
 
{
71
 
    static const vector unsigned char lowword = {
72
 
        0x08, 0x09, 0x0a, 0x0b, 0x18, 0x19, 0x1a, 0x1b,
73
 
        0x0c, 0x0d, 0x0e, 0x0f, 0x1c, 0x1d, 0x1e, 0x1f
74
 
    };
75
 
    return vec_perm (A, B, lowword);
76
 
}
77
 
/*#define ff_vmrglb ff_vmrglb
78
 
#define ff_vmrglh ff_vmrglh
79
 
#define ff_vmrglw ff_vmrglw
80
 
*/
81
 
#undef vec_mergel
82
 
 
83
 
#define vec_mergel(a1, a2) \
84
 
__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \
85
 
      ((vector signed char) ff_vmrglb ((vector signed char) (a1), (vector signed char) (a2))), \
86
 
__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \
87
 
      ((vector unsigned char) ff_vmrglb ((vector signed char) (a1), (vector signed char) (a2))), \
88
 
__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \
89
 
      ((vector signed short) ff_vmrglh ((vector signed short) (a1), (vector signed short) (a2))), \
90
 
__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \
91
 
      ((vector unsigned short) ff_vmrglh ((vector signed short) (a1), (vector signed short) (a2))), \
92
 
__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \
93
 
      ((vector float) ff_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \
94
 
__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \
95
 
      ((vector signed int) ff_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \
96
 
__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \
97
 
      ((vector unsigned int) ff_vmrglw ((vector signed int) (a1), (vector signed int) (a2))), \
98
 
    __altivec_link_error_invalid_argument ())))))))
99
 
 
100
 
#endif /* (__GNUC__ == 3 && __GNUC_MINOR__ < 3) */
101
 
 
102
 
#endif /* AVCODEC_PPC_GCC_FIXES_H */