~ubuntu-branches/ubuntu/natty/mesa/natty-proposed

« back to all changes in this revision

Viewing changes to src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker, Robert Hooker, Christopher James Halse Rogers
  • Date: 2010-09-14 08:55:40 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100914085540-m4fpl0hdjlfd4jgz
Tags: 7.9~git20100909-0ubuntu1
[ Robert Hooker ]
* New upstream git snapshot up to commit 94118fe2d4b1e5 (LP: #631413)
* New features include ATI HD5xxx series support in r600, and a vastly
  improved glsl compiler.
* Remove pre-generated .pc's, use the ones generated at build time
  instead.
* Remove all references to mesa-utils now that its no longer shipped
  with the mesa source.
* Disable the experimental ARB_fragment_shader option by default on
  i915, it exposes incomplete functionality that breaks KDE compositing
  among other things. It can be enabled via driconf still. (LP: #628930).

[ Christopher James Halse Rogers ]
* debian/patches/04_osmesa_version.diff:
  - Refresh for new upstream
* Bugs fixed in this release:
  - Fixes severe rendering corruption in Unity on radeon (LP: #628727,
    LP: #596292, LP: #599741, LP: #630315, LP: #613694, LP: #599741).
  - Also fixes rendering in gnome-shell (LP: #578619).
  - Flickering in OpenGL apps on radeon (LP: #626943, LP: #610541).
  - Provides preliminary support for new intel chips (LP: #601052).
* debian/rules:
  - Update configure flags to match upstream reshuffling.
  - Explicitly remove gallium DRI drivers that we don't want to ship.
* Update debian/gbp.conf for this Maverick-specific packaging
* libegl1-mesa-dri-x11,kms: There are no longer separate kms or x11 drivers
  for EGL, libegl1-mesa-drivers now contains a single driver that provides
  both backends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**************************************************************************
2
 
 * 
3
 
 * Copyright 2009 Younes Manton.
4
 
 * All Rights Reserved.
5
 
 * 
6
 
 * Permission is hereby granted, free of charge, to any person obtaining a
7
 
 * copy of this software and associated documentation files (the
8
 
 * "Software"), to deal in the Software without restriction, including
9
 
 * without limitation the rights to use, copy, modify, merge, publish,
10
 
 * distribute, sub license, and/or sell copies of the Software, and to
11
 
 * permit persons to whom the Software is furnished to do so, subject to
12
 
 * the following conditions:
13
 
 * 
14
 
 * The above copyright notice and this permission notice (including the
15
 
 * next paragraph) shall be included in all copies or substantial portions
16
 
 * of the Software.
17
 
 * 
18
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
 
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
 
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21
 
 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22
 
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23
 
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
 
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
 
 * 
26
 
 **************************************************************************/
27
 
 
28
 
#ifndef vl_mpeg12_mc_renderer_h
29
 
#define vl_mpeg12_mc_renderer_h
30
 
 
31
 
#include <pipe/p_compiler.h>
32
 
#include <pipe/p_state.h>
33
 
#include <pipe/p_video_state.h>
34
 
 
35
 
struct pipe_context;
36
 
struct pipe_video_surface;
37
 
struct pipe_macroblock;
38
 
 
39
 
/* A slice is video-width (rounded up to a multiple of macroblock width) x macroblock height */
40
 
enum VL_MPEG12_MC_RENDERER_BUFFER_MODE
41
 
{
42
 
   VL_MPEG12_MC_RENDERER_BUFFER_SLICE,  /* Saves memory at the cost of smaller batches */
43
 
   VL_MPEG12_MC_RENDERER_BUFFER_PICTURE /* Larger batches, more memory */
44
 
};
45
 
 
46
 
enum VL_MPEG12_MC_RENDERER_EMPTY_BLOCK
47
 
{
48
 
   VL_MPEG12_MC_RENDERER_EMPTY_BLOCK_XFER_ALL, /* Waste of memory bandwidth */
49
 
   VL_MPEG12_MC_RENDERER_EMPTY_BLOCK_XFER_ONE, /* Can only do point-filtering when interpolating subsampled chroma channels */
50
 
   VL_MPEG12_MC_RENDERER_EMPTY_BLOCK_XFER_NONE /* Needs conditional texel fetch! */
51
 
};
52
 
 
53
 
struct vl_mpeg12_mc_renderer
54
 
{
55
 
   struct pipe_context *pipe;
56
 
   unsigned picture_width;
57
 
   unsigned picture_height;
58
 
   enum pipe_video_chroma_format chroma_format;
59
 
   enum VL_MPEG12_MC_RENDERER_BUFFER_MODE bufmode;
60
 
   enum VL_MPEG12_MC_RENDERER_EMPTY_BLOCK eb_handling;
61
 
   bool pot_buffers;
62
 
   unsigned macroblocks_per_batch;
63
 
 
64
 
   struct pipe_viewport_state viewport;
65
 
   struct pipe_scissor_state scissor;
66
 
   struct pipe_buffer *vs_const_buf;
67
 
   struct pipe_buffer *fs_const_buf;
68
 
   struct pipe_framebuffer_state fb_state;
69
 
   struct pipe_vertex_element vertex_elems[8];
70
 
        
71
 
   union
72
 
   {
73
 
      void *all[5];
74
 
      struct { void *y, *cb, *cr, *ref[2]; } individual;
75
 
   } samplers;
76
 
        
77
 
   void *i_vs, *p_vs[2], *b_vs[2];
78
 
   void *i_fs, *p_fs[2], *b_fs[2];
79
 
        
80
 
   union
81
 
   {
82
 
      struct pipe_texture *all[5];
83
 
      struct { struct pipe_texture *y, *cb, *cr, *ref[2]; } individual;
84
 
   } textures;
85
 
 
86
 
   union
87
 
   {
88
 
      struct pipe_vertex_buffer all[3];
89
 
      struct { struct pipe_vertex_buffer ycbcr, ref[2]; } individual;
90
 
   } vertex_bufs;
91
 
        
92
 
   struct pipe_texture *surface, *past, *future;
93
 
   struct pipe_fence_handle **fence;
94
 
   unsigned num_macroblocks;
95
 
   struct pipe_mpeg12_macroblock *macroblock_buf;
96
 
   struct pipe_transfer *tex_transfer[3];
97
 
   short *texels[3];
98
 
   struct { float x, y; } surface_tex_inv_size;
99
 
   struct { float x, y; } zero_block[3];
100
 
};
101
 
 
102
 
bool vl_mpeg12_mc_renderer_init(struct vl_mpeg12_mc_renderer *renderer,
103
 
                                struct pipe_context *pipe,
104
 
                                unsigned picture_width,
105
 
                                unsigned picture_height,
106
 
                                enum pipe_video_chroma_format chroma_format,
107
 
                                enum VL_MPEG12_MC_RENDERER_BUFFER_MODE bufmode,
108
 
                                enum VL_MPEG12_MC_RENDERER_EMPTY_BLOCK eb_handling,
109
 
                                bool pot_buffers);
110
 
 
111
 
void vl_mpeg12_mc_renderer_cleanup(struct vl_mpeg12_mc_renderer *renderer);
112
 
 
113
 
void vl_mpeg12_mc_renderer_render_macroblocks(struct vl_mpeg12_mc_renderer *renderer,
114
 
                                              struct pipe_texture *surface,
115
 
                                              struct pipe_texture *past,
116
 
                                              struct pipe_texture *future,
117
 
                                              unsigned num_macroblocks,
118
 
                                              struct pipe_mpeg12_macroblock *mpeg12_macroblocks,
119
 
                                              struct pipe_fence_handle **fence);
120
 
 
121
 
#endif /* vl_mpeg12_mc_renderer_h */