~ubuntu-branches/ubuntu/trusty/libsdl1.2/trusty

« back to all changes in this revision

Viewing changes to src/video/ps3/spulibs/spu_common.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2009-12-08 01:50:15 UTC
  • mfrom: (2.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20091208015015-mr68dcbbctrhi5at
Tags: 1.2.14-1ubuntu1
* Merge from Debian experimental, remaining changes:
  + debian/control:
    + add libglu1-mesa-dev as a build dependency, so SDL gets built
      with OpenGL support (LP: #328932)
    - dropped build-depends on libarts1-dev, libartsc0-dev. These
      packages will disappear as part of the arts removal
      (LP: #320915)
    - Removed Package: libsdl1.2debian-arts section entirely
    - dropped depends on libsdl1.2debian-arts (= ${binary:Version})
      for libsdl1.2-debian
    - dropped recommends on libartsc0-dev for libsdl1.2-dev
    - Remove svgalib support.
  + debian/rules:
    + set --enable-arts-shared=no and --enable-arts=no in confflags
    - removed --disable-audio-arts from udeb_confflags
    - dropped arts from FLAVOURS=
    + Link using -Wl,-Bsymbolic-functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * SDL - Simple DirectMedia Layer
 
3
 * CELL BE Support for PS3 Framebuffer
 
4
 * Copyright (C) 2008, 2009 International Business Machines Corporation
 
5
 *
 
6
 * This library is free software; you can redistribute it and/or modify it
 
7
 * under the terms of the GNU Lesser General Public License as published
 
8
 * by the Free Software Foundation; either version 2.1 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This library is distributed in the hope that it will be useful, but
 
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
 * Lesser General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public
 
17
 * License along with this library; if not, write to the Free Software
 
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
 
19
 * USA
 
20
 *
 
21
 *  Martin Lowinski  <lowinski [at] de [dot] ibm [ibm] com>
 
22
 *  Dirk Herrendoerfer <d.herrendoerfer [at] de [dot] ibm [dot] com>
 
23
 *  SPE code based on research by:
 
24
 *  Rene Becker
 
25
 *  Thimo Emmerich
 
26
 */
 
27
 
 
28
/* Common definitions/makros for SPUs */
 
29
 
 
30
#ifndef _SPU_COMMON_H
 
31
#define _SPU_COMMON_H
 
32
 
 
33
#include <stdio.h>
 
34
#include <stdint.h>
 
35
#include <string.h>
 
36
 
 
37
/* Tag management */
 
38
#define DMA_WAIT_TAG(_tag)     \
 
39
    mfc_write_tag_mask(1<<(_tag)); \
 
40
    mfc_read_tag_status_all();
 
41
 
 
42
/* SPU mailbox messages */
 
43
#define SPU_READY       0
 
44
#define SPU_START       1
 
45
#define SPU_FIN         2
 
46
#define SPU_EXIT        3
 
47
 
 
48
/* Tags */
 
49
#define RETR_BUF        0
 
50
#define STR_BUF         1
 
51
#define TAG_INIT        2
 
52
 
 
53
/* Buffersizes */
 
54
#define MAX_HDTV_WIDTH 1920
 
55
#define MAX_HDTV_HEIGHT 1080
 
56
/* One stride of HDTV */
 
57
#define BUFFER_SIZE 7680
 
58
 
 
59
/* fb_writer ppu/spu exchange parms */
 
60
struct fb_writer_parms_t {
 
61
        uint8_t *data;
 
62
        uint8_t *center;
 
63
        uint32_t out_line_stride;
 
64
        uint32_t in_line_stride;
 
65
        uint32_t bounded_input_height;
 
66
        uint32_t bounded_input_width;
 
67
        uint32_t fb_pixel_size;
 
68
 
 
69
        /* This padding is to fulfill the need for 16 byte alignment. On parm change, update! */
 
70
        char padding[4];
 
71
} __attribute__((aligned(128)));
 
72
 
 
73
/* yuv2rgb ppu/spu exchange parms */
 
74
struct yuv2rgb_parms_t {
 
75
        uint8_t* y_plane;
 
76
        uint8_t* v_plane;
 
77
        uint8_t* u_plane;
 
78
 
 
79
        uint8_t* dstBuffer;
 
80
 
 
81
        unsigned int src_pixel_width;
 
82
        unsigned int src_pixel_height;
 
83
 
 
84
        /* This padding is to fulfill the need for 16 byte alignment. On parm change, update! */
 
85
        char padding[128 - ((4 * sizeof(uint8_t *) + 2 * sizeof(unsigned int)) & 0x7F)];
 
86
} __attribute__((aligned(128)));
 
87
 
 
88
/* bilin_scaler ppu/spu exchange parms */
 
89
struct scale_parms_t {
 
90
        uint8_t* y_plane;
 
91
        uint8_t* v_plane;
 
92
        uint8_t* u_plane;
 
93
 
 
94
        uint8_t* dstBuffer;
 
95
 
 
96
        unsigned int src_pixel_width;
 
97
        unsigned int src_pixel_height;
 
98
 
 
99
        unsigned int dst_pixel_width;
 
100
        unsigned int dst_pixel_height;
 
101
 
 
102
        /* This padding is to fulfill the need for 16 byte alignment. On parm change, update! */
 
103
        char padding[128 - ((4 * sizeof(uint8_t *) + 4 * sizeof(unsigned int)) & 0x7F)];
 
104
} __attribute__((aligned(128)));
 
105
 
 
106
#endif /* _SPU_COMMON_H */
 
107
 
 
108