Skip to contentSkip to conversation

nouveau: Add support for XvMC acceleration

PATCH New Marcin Slusarz 2 participants 3 messages Sep 10, 2011 – Oct 8, 2011 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAMmP6nczOaGwXbuaNEc-nrTw7kvGdjOr-6+qbWTMqm9s_UkpMA@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 13 lines · Maarten Lankhorst

Hey ★,

Quoted 10 lines · ★ Emeric

Hi Maarten,
I tried the v2 patch with my good old geforce 8600M GS, and it worked well. The CPU usage seems a little higher than usual, I'd said 60% instead of 40% for a 720p video, but I'll try with a higher bitrate video and without building with debug parameters to see if I can found a performance gain. The only problem is that I cannot seek through the video without an segfault on that error "X11 error: BadAccess (attempt to access private resource denied)", I attached a gdb backtrace. It appears to be related to the drawing of the mplayer OSD.

Quoted 3 lines

That's either a bug in mplayer or in the state tracker. What's oy and ox set to at the time of the crash? and where does xvimage->data point to :)

This is a bug in xf86-video-nouveau actually, and it leads to memory corruption in mplayer.

Patch below fixes it, but OSD still doesn't work.

---
From 00f7986291b86db9a09c1651eb4450c69761fe27 Mon Sep 17 00:00:00 2001
From: Marcin Slusarz <[email protected]>
Date: Sat, 10 Sep 2011 23:14:53 +0200
Subject: [PATCH] xv: support AI44/IA44

---
 src/nouveau_xv.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
src/nouveau_xv.c +8 -0
index 30753fa..5a5337c 100644
@@ -1426,7 +1426,15 @@ NVQueryImageAttributes(ScrnInfoPtr pScrn, int id,
 			pitches[0] = size; // 4*width
 		size *= *h; // 4*width*height
 		break;
+	case FOURCC_AI44:
+	case FOURCC_IA44:
+		size = *w; // width
+		if (pitches)
+			pitches[0] = size; // width
+		size *= *h; // width*height
+		break;
 	default:
+		xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Unknown colorspace: %x\n", id);
 		*w = *h = size = 0;
 		break;
 	}
Signature · 6 lines
1.7.6.1

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
#4 lore raw
Quoted 14 lines · Marcin Slusarz
Quoted 13 lines · Maarten Lankhorst

Hey ★,

Quoted 10 lines · ★ Emeric

Hi Maarten,
I tried the v2 patch with my good old geforce 8600M GS, and it worked well. The CPU usage seems a little higher than usual, I'd said 60% instead of 40% for a 720p video, but I'll try with a higher bitrate video and without building with debug parameters to see if I can found a performance gain. The only problem is that I cannot seek through the video without an segfault on that error "X11 error: BadAccess (attempt to access private resource denied)", I attached a gdb backtrace. It appears to be related to the drawing of the mplayer OSD.

Quoted 8 lines
Quoted 3 lines

That's either a bug in mplayer or in the state tracker. What's oy and ox set to at the time of the crash? and where does xvimage->data point to :)

This is a bug in xf86-video-nouveau actually, and it leads to memory corruption in mplayer.

Patch below fixes it, but OSD still doesn't work.

With commit f626d99edf17a1d3203b257f6fe6993229ea6866 in mesa OSD in mplayer works (Yeah! ;). I've submitted patch for mplayer to disable OSD instead of crashing.

Ben, can you review and push patch in the previous mail? (xv: support AI44/IA44) Thanks.

Marcin
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

PATCH 1/1 xv: add support for AI44/IA44

From: Marcin Slusarz <[email protected]>
Date: Sat, 10 Sep 2011 23:14:53 +0200
Subject: [PATCH] xv: support AI44/IA44

It's needed for osd in mplayer's xvmc output.

---
 src/nouveau_xv.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
src/nouveau_xv.c +8 -0
index 30753fa..5a5337c 100644
@@ -1426,7 +1426,15 @@ NVQueryImageAttributes(ScrnInfoPtr pScrn, int id,
 			pitches[0] = size; // 4*width
 		size *= *h; // 4*width*height
 		break;
+	case FOURCC_AI44:
+	case FOURCC_IA44:
+		size = *w; // width
+		if (pitches)
+			pitches[0] = size; // width
+		size *= *h; // width*height
+		break;
 	default:
+		xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Unknown colorspace: %x\n", id);
 		*w = *h = size = 0;
 		break;
 	}
Signature · 1 line
1.7.6.1