From patchwork Wed Sep 23 06:30:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jun Nie X-Patchwork-Id: 49482 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8N6UH2U015017 for ; Wed, 23 Sep 2009 06:30:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753871AbZIWGaM (ORCPT ); Wed, 23 Sep 2009 02:30:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753787AbZIWGaM (ORCPT ); Wed, 23 Sep 2009 02:30:12 -0400 Received: from mail-yw0-f174.google.com ([209.85.211.174]:33093 "EHLO mail-yw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753786AbZIWGaL (ORCPT ); Wed, 23 Sep 2009 02:30:11 -0400 Received: by ywh4 with SMTP id 4so554449ywh.33 for ; Tue, 22 Sep 2009 23:30:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=H8gfWn+qjJrJ0RXWinUR8sRW1nAM139SSQw/q+D/QZk=; b=oCOHkzZjFDW8FKM4QftjMlRjiuCInUApQ4Aqk+qZfXYJDQ9Pj0Fg47NYsBi4MsrY9J Osky4zgbycsrW8mHr4OQX/qwyQohnBEgMb5ll+Qy+LIYwPQK4BV6qeWUFJTOd5SQJ2AF /adAZS9V086XImpkmwZtZkXXCi+npOtsesiH0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=WLCc1sBvusBwS6Gkux76uELE3OyVKtPxEXEgtzkwFyYfDDjkfD3t1c6Y8DD6VTa+jt gFzvW1J/FQtZXiz1YWzGg6etebeEoOzFJA+hkOBQaxpkQhkmp7tt0h5QVDssHvq87GWE w55eMNSRMnXeTfgayeKmtqDudaoQLERma78mo= MIME-Version: 1.0 Received: by 10.151.29.2 with SMTP id g2mr3365178ybj.324.1253687414862; Tue, 22 Sep 2009 23:30:14 -0700 (PDT) Date: Wed, 23 Sep 2009 14:30:14 +0800 Message-ID: <7c34ac520909222330k73380177sbf103345f5d3d7ec@mail.gmail.com> Subject: Support on discontinuous planer buffer and stride From: Jun Nie To: linux-media Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi,      I re-send this email for the last one is rejected by system. I am sorry if you guys received both.      I am optimizing video playback with overlay with V4L2 driver. The video content is a sub-region of codec output. Thus a memory copy is necessary.     Is there plan to support for stride and discrete YUV planer in kernel? Such as below changes can help much for my usage case.     If such change is acceptable for everyone, I may help on the implementation.     Any comments are welcome. Jun N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±™çbj)í…æèw*jg¬±¨¶‰šŽŠÝ¢j/êäz¹Þ–Šà2ŠÞ™¨è­Ú&¢)ß¡«a¶Úþø®G«éh®æj:+v‰¨Šwè†Ù¥ --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -529,7 +529,20 @@ struct v4l2_buffer {                 __u32           offset;                 unsigned long   userptr;         } m; +       /* UV/GB location is valid only in planer case */ +       union { +               __u32           offset_ug; +               unsigned long   userptr_ug; +       } m_ug; +       union { +               __u32           offset_vb; +               unsigned long   userptr_vb; +       } m_vb;         __u32                   length; +       /* stride of YUV or RGB */ +       __u32                   stride_yr; +       __u32                   stride_ug; +       __u32                   stride_vb;         __u32                   input;         __u32                   reserved;  };