From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933880AbdADQrB (ORCPT ); Wed, 4 Jan 2017 11:47:01 -0500 Received: from mga06.intel.com ([134.134.136.31]:26758 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761063AbdADQq6 (ORCPT ); Wed, 4 Jan 2017 11:46:58 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,459,1477983600"; d="scan'208";a="1089875550" Date: Wed, 4 Jan 2017 18:46:49 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: ayaka Cc: dri-devel@lists.freedesktop.org, randy.li@rock-chips.com, linux-kernel@vger.kernel.org, daniel.vetter@intel.com, mchehab@kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH 1/2] drm_fourcc: Add new P010 video format Message-ID: <20170104164649.GL31595@intel.com> References: <1483347004-32593-1-git-send-email-ayaka@soulik.info> <1483347004-32593-2-git-send-email-ayaka@soulik.info> <20170104155632.GI31595@intel.com> <1f0969b0-31b3-f9ee-653e-3689fe27932d@soulik.info> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1f0969b0-31b3-f9ee-653e-3689fe27932d@soulik.info> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 05, 2017 at 12:31:27AM +0800, ayaka wrote: > > > On 01/04/2017 11:56 PM, Ville Syrjälä wrote: > > On Mon, Jan 02, 2017 at 04:50:03PM +0800, Randy Li wrote: > >> P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits > >> per channel video format. Rockchip's vop support this > >> video format(little endian only) as the input video format. > >> > >> Signed-off-by: Randy Li > >> --- > >> include/uapi/drm/drm_fourcc.h | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > >> index 9e1bb7f..d2721da 100644 > >> --- a/include/uapi/drm/drm_fourcc.h > >> +++ b/include/uapi/drm/drm_fourcc.h > >> @@ -119,6 +119,7 @@ extern "C" { > >> #define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */ > >> #define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */ > >> #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ > >> +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel */ > > We could use a better description of the format here. IIRC there is > > 10bits of actual data contained in each 16bits. So there should be a > > proper comment explaning in which way the bits are stored. > It is a little hard to describe P010, /* * 2 plane YCbCr * index 0 = Y plane, [15:0] Y:X 10:6 little-endian * index 1 = Cr:Cb plane, [31:0] Cr:X:Cb:X 10:6:10:6 little-endian */ /* * 2 plane YCbCr * index 0 = Y plane, [15:0] Y 16 little-endian * index 1 = Cr:Cb plane, [31:0] Cr:Cb 16:16 little-endian */ or something like that (not 100% sure I got the order of bits and whatnot correct). -- Ville Syrjälä Intel OTC