summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_context.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2013-07-16 17:50:43 -0400
committerMaarten Lankhorst <[email protected]>2013-07-18 07:52:32 +0200
commitfbdae1ca41946af374c7924fd4c296199172890d (patch)
treec5cbfa59180eb586e0efebd9a99fa5c4e23dd276 /src/gallium/drivers/nv50/nv50_context.c
parentf96c07abf6ded1ac07a1e8fe3952321ec170193d (diff)
nv50: H.264/MPEG2 decoding support via VP2, available on NV84-NV96, NVA0
Adds H.264 and MPEG2 codec support via VP2, using firmware from the blob. Acceleration is supported at the bitstream level for H.264 and IDCT level for MPEG2. Known issues: - H.264 interlaced doesn't render properly - H.264 shows very occasional artifacts on a small fraction of videos - MPEG2 + VDPAU shows frequent but small artifacts, which aren't there when using XvMC on the same videos Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_context.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index 5781c4bb766..79a047391af 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -258,7 +258,18 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
draw_set_rasterize_stage(nv50->draw, nv50_draw_render_stage(nv50));
#endif
- nouveau_context_init_vdec(&nv50->base);
+ if (screen->base.device->chipset < 0x84) {
+ /* PMPEG */
+ nouveau_context_init_vdec(&nv50->base);
+ } else if (screen->base.device->chipset < 0x98 ||
+ screen->base.device->chipset == 0xa0) {
+ /* VP2 */
+ pipe->create_video_decoder = nv84_create_decoder;
+ pipe->create_video_buffer = nv84_video_buffer_create;
+ } else {
+ /* Unsupported, but need to init pointers. */
+ nouveau_context_init_vdec(&nv50->base);
+ }
flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RD;