Trident hardware Scaler fails to scale video. It seems that something is wrong in this pipeline: videogradder -> backend hardware scaler -> video-display. Trident driver's hardware Scaler supports YUV format, but YUY2 palette. xvinfo out: .... id:0x32595559 (YUY2) guid: 59555932-0000-0010-8000-00aa00389b71 bits perpixel: 16 number of planes: 1 type: YUV (packed) I have found in V4L2 API specifications that it supports YUYV. (http://v4l2spec.bytesex.org/spec-single/v4l2.html) 1. v4l_check_yuv function couldn't setup the pipeline to hardware scaler. Why? The IDs of the formats are the same in Video card driver and V4L driver. 2. The default initial format in TRIDENTInitOffscreenImages function is RV16. And it isn't supported by V4L video driver. I have found trivial soultion: 1. Modify xf86-video-trident driver. Init ofscreen images by correct format in TRIDENTInitOffscreenImages function. 2. Modify xf86-video-v4l subsystem-driver. Append YUY2 palette to the YUV supported formats list with the YUYV's ID. It should works fine with modern Video Cards, because they support both YUV formats. [PATCH 1/2] diff --git a/src/trident_video.c b/src/trident_video.c index 7b6fb10..87e56ec 100644 --- a/src/trident_video.c +++ b/src/trident_video.c @@ -1132,7 +1132,7 @@ TRIDENTInitOffscreenImages(ScreenPtr pScreen) if(!(offscreenImages = xalloc(sizeof(XF86OffscreenImageRec)))) return; - offscreenImages[0].image = &Images[0]; + offscreenImages[0].image = &Images[2]; offscreenImages[0].flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; offscreenImages[0].alloc_surface = TRIDENTAllocateSurface; [PATCH 2/2] diff --git a/src/v4l.c b/src/v4l.c index 9210a3f..1256ea9 100644 --- a/src/v4l.c +++ b/src/v4l.c @@ -865,6 +865,7 @@ static void v4l_check_yuv(ScrnInfoPtr pScrn, PortPrivPtr pPPriv, } yuvlist[] = { { VIDEO_PALETTE_YUV422, 16, 0x32595559, XvPacked }, { VIDEO_PALETTE_UYVY, 16, 0x59565955, XvPacked }, + { VIDEO_PALETTE_YUYV, 16, 0x32595559, XvPacked }, { 0 /* end of list */ }, }; ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
Created attachment 25291 [details] [review] xorg-video-trident patch
Created attachment 25292 [details] [review] xorg-video-v4l patch
Mass closure: This bug has been untouched for more than six years, and is not obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.