~ubuntu-branches/ubuntu/hardy/avidemux/hardy

« back to all changes in this revision

Viewing changes to avidemux/mpeg2enc/altivec/detect.c

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev
  • Date: 2007-12-18 13:53:04 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071218135304-cdqec2lg2bglyz15
Tags: 1:2.4~preview3-0.0ubuntu1
* Upload to Ubuntu. (LP: #163287, LP: #126572)
* debian/changelog: re-added Ubuntu releases.
* debian/control:
  - Require debhelper >= 5.0.51 (for dh_icons) and imagemagick.
  - Build-depend on libsdl1.2-dev instead of libsdl-dev.
  - Build against newer libx264-dev. (LP: #138854)
  - Removed libamrnb-dev, not in Ubuntu yet.
* debian/rules:
  - Install all icon sizes, using convert (upstream installs none).
  - Added missing calls to dh_installmenu, dh_installman, dh_icons and
    dh_desktop.
* debian/menu, debian/avidemux-qt.menu:
  - Corrected package and executable names.
* debian/avidemux-common.install: Install icons.
* debian/avidemux.common.manpages: Install man/avidemux.1.
* debian/links, debian/avidemux-cli.links, debian/avidemux-gtk.links:
  - Link manpages to avidemux.1.gz.
* debian/install, debian/avidemux-qt.install, debian/avidemux-gtk.desktop,
  debian/avidemux-qt.desktop: Install desktop files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* detect.c, this file is part of the
2
 
 * AltiVec optimized library for MJPEG tools MPEG-1/2 Video Encoder
3
 
 * Copyright (C) 2002  James Klicman <james@klicman.org>
4
 
 *
5
 
 * This library is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License as published by
7
 
 * the Free Software Foundation; either version 2 of the License, or
8
 
 * (at your option) any later version.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
 */
19
 
 
20
 
#ifdef HAVE_CONFIG_H
21
 
#include <config.h>
22
 
#endif
23
 
 
24
 
#ifdef HAVE_ALTIVEC_H
25
 
/* include last to ensure AltiVec type semantics, especially for bool. */
26
 
#include <altivec.h>
27
 
#endif
28
 
 
29
 
/*
30
 
 * Functions containing AltiVec code have additional VRSAVE instructions
31
 
 * at the beginning and end of the function. To avoid executing any AltiVec
32
 
 * instructions before our signal handler is setup the AltiVec code is
33
 
 * encapsulated in a function.
34
 
 *
35
 
 * The automatic VRSAVE instructions can be disabled with
36
 
 * #pragma altivec_vrsave off
37
 
 *
38
 
 * Storing vector registers to memory shouldn't alter the state of the vectors
39
 
 * or the vector unit. The following function contains a single vector stvx
40
 
 * instruction.
41
 
 */
42
 
#pragma altivec_vrsave off
43
 
int altivec_copy_v0()
44
 
{
45
 
    register vector unsigned int v0 asm ("v0");
46
 
    union {
47
 
        vector unsigned int align16;
48
 
        unsigned int v0[4];
49
 
    } copy;
50
 
 
51
 
    vec_st(v0, 0, copy.v0);
52
 
    return copy.v0[0];
53
 
}
54
 
 
55
 
/*
56
 
 * detect_altivec() moved to ../cpu_accel.c
57
 
 */