summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nouveau_video.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_video.h')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_video.h42
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