diff options
author | Maarten Lankhorst <[email protected]> | 2011-09-10 09:55:55 +0200 |
---|---|---|
committer | Younes Manton <[email protected]> | 2011-09-10 14:22:11 -0400 |
commit | 1465dc26a540e2b6f8a055cf0ab48f774a3775bf (patch) | |
tree | 47b2cb4bc282b14c657a5df44924970816a21ae4 /src/gallium/drivers/nouveau/nouveau_video.h | |
parent | 10dbd029279dda1689410d8ef2bc5aba64dd5958 (diff) |
nouveau: Add support for XvMC acceleration
Try to use the PMPEG where available
Signed-off-by: Maarten Lankhorst <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_video.h')
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_video.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_video.h b/src/gallium/drivers/nouveau/nouveau_video.h new file mode 100644 index 00000000000..c6875c39a04 --- /dev/null +++ b/src/gallium/drivers/nouveau/nouveau_video.h @@ -0,0 +1,42 @@ +#ifndef __NOUVEAU_VIDEO_H__ +#define __NOUVEAU_SCREEN_H__ + +#include "nv17_mpeg.xml.h" +#include "nv31_mpeg.xml.h" + +struct nouveau_video_buffer { + struct pipe_video_buffer base; + unsigned num_planes; + struct pipe_resource *resources[2]; + struct pipe_sampler_view *sampler_view_planes[2]; + struct pipe_sampler_view *sampler_view_components[3]; + struct pipe_surface *surfaces[2]; +}; + +struct nouveau_decoder { + struct pipe_video_decoder base; + struct nouveau_screen *screen; + struct nouveau_grobj *mpeg; + struct nouveau_bo *cmd_bo, *data_bo, *fence_bo; + + unsigned *fence_map; + unsigned fence_seq; + + unsigned ofs; + unsigned *cmds; + + unsigned *data; + unsigned data_pos; + unsigned picture_structure; + + unsigned past, future, current; + unsigned num_surfaces; + struct nouveau_video_buffer *surfaces[8]; +}; + +static INLINE void +nouveau_vpe_write(struct nouveau_decoder *dec, unsigned data) { + dec->cmds[dec->ofs++] = data; +} + +#endif |