From 2f490116d200f8ada250d53fd37a4566114d0e20 Mon Sep 17 00:00:00 2001 From: Dmitry Gryazin Date: Sat, 1 Nov 2008 10:14:55 +0300 Subject: [PATCH] Add YUY2 palette support to the YUV supported formats list. 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) But 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. Solution I have found: 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. Signed-off-by: Dmitry Gryazin Signed-off-by: Kirill Smelkov --- src/v4l.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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]; -- 1.5.6.5