From patchwork Sun Jul 8 02:35:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hyun Kwon X-Patchwork-Id: 10513009 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C9FFE603D7 for ; Sun, 8 Jul 2018 02:37:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6E0628718 for ; Sun, 8 Jul 2018 02:37:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAE0F2871E; Sun, 8 Jul 2018 02:37:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 560C828718 for ; Sun, 8 Jul 2018 02:37:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4A22E6E371; Sun, 8 Jul 2018 02:37:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0058.outbound.protection.outlook.com [104.47.41.58]) by gabe.freedesktop.org (Postfix) with ESMTPS id 78BD489D42 for ; Sun, 8 Jul 2018 02:37:29 +0000 (UTC) Received: from BN6PR02CA0041.namprd02.prod.outlook.com (2603:10b6:404:5f::27) by SN6PR02MB4334.namprd02.prod.outlook.com (2603:10b6:805:a4::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.20; Sun, 8 Jul 2018 02:37:28 +0000 Received: from BL2NAM02FT005.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::208) by BN6PR02CA0041.outlook.office365.com (2603:10b6:404:5f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.930.21 via Frontend Transport; Sun, 8 Jul 2018 02:37:27 +0000 Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT005.mail.protection.outlook.com (10.152.76.252) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.906.15 via Frontend Transport; Sun, 8 Jul 2018 02:37:27 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:51627 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1fbzZm-0004mp-KD for dri-devel@lists.freedesktop.org; Sat, 07 Jul 2018 19:37:26 -0700 Received: from [127.0.0.1] (helo=xsj-smtp-dlp2.xlnx.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fbzZh-00074V-Fh; Sat, 07 Jul 2018 19:37:21 -0700 Received: from xsj-pvapsmtp01 (mailman.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w682bK85017998; Sat, 7 Jul 2018 19:37:20 -0700 Received: from [172.19.2.244] (helo=xsjhyunkubuntu) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fbzZg-00074N-OR; Sat, 07 Jul 2018 19:37:20 -0700 Received: by xsjhyunkubuntu (Postfix, from userid 13638) id 441122C73C6; Sat, 7 Jul 2018 19:35:37 -0700 (PDT) From: Hyun Kwon To: Subject: [PATCH libdrm 3/3] tests: util: Add support for YUV422 and YUV444 Date: Sat, 7 Jul 2018 19:35:33 -0700 Message-ID: <1531017333-1483-4-git-send-email-hyun.kwon@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531017333-1483-1-git-send-email-hyun.kwon@xilinx.com> References: <1531017333-1483-1-git-send-email-hyun.kwon@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(136003)(39850400004)(2980300002)(438002)(199004)(189003)(76176011)(478600001)(106466001)(50466002)(6666003)(103686004)(63266004)(336012)(8936002)(81166006)(81156014)(106002)(16586007)(8676002)(186003)(6916009)(51416003)(5660300001)(42186006)(316002)(26005)(47776003)(48376002)(356003)(2616005)(90966002)(476003)(4326008)(6266002)(2906002)(126002)(36756003)(52956003)(446003)(11346002)(426003)(486006)(50226002)(107886003)(305945005)(44832011)(2351001)(107986001)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR02MB4334; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT005; 1:gIyoPw6VK4/J/k9iPPPec+1/wEg2rcY9zcAV/wW5+qr7kz/rgLHHH3FSDHSQisxrc8yjmY/sB64onVMQApKg8PZ6du95c3rKLdAn85Bsyhpx9brRSnzhKPdSWvlwO/u5 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 691482f5-6995-4fef-422b-08d5e47bbea7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060); SRVR:SN6PR02MB4334; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4334; 3:nq1fPpfXkFFll6aDS4l28qc2yOQxi2mjzq6AfLMrD2DpQeU4fDLrBp8XbonimSsMN4gMQ302I3agZjHaj0tKC1wD+b0L/Ah6DJUxHuYTItZFgNqfQlA3PRNZdDINx+Zeyl+M6ZhYRLzFWNhc5S83yOOGjuRz2jGF9xCljmqh/30z1ViAKlQkZU1K5X6CQbrbRuhn4hBAwBVJP0uUjn4iGQPOddLzSUkPKrxTpbDNBaxjvfb1bum4elGhxPAtcEMA80fej07shDJMnIjAVP5SrNINpZQnoOSR0gnC0h9grPjyHFHlGfXLMQZxcDnTx0U3ygi+59LPPb7w+kE1rl0U1IeQoH0JDKRPiyG0zKFmwoo=; 25:poc1DScq6/S93IXaFoCJHTDa/ecnrAv979L/KAL45SJHRtCctlzZHRiKlyaMtzSK2aEEI/gPD1os3xCIY+ia+pV0V+w9sYJrHEQlWwjDWFFFdMgUWj6piEUH3nk+FetSEl28dCNE3h1fjmxKQHG1AF0TGKEkjyxTmKcHzvAxOZMIoCFLnHk9fjrpN5WF6RzZeoCFTw5p7NNZiyLYvze1A+4qAEs+kUGCCF8Uds4dNqh+wBv2yjg1hpiob9Voqe4wEXtdjYqed4O33rbnvCyOUwQZgaHPKevUElIHR1mGiEUgWG80S66hPPpt85qRDoX+KxSiHC2xAQuTT7C6rcX7QA== X-MS-TrafficTypeDiagnostic: SN6PR02MB4334: X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4334; 31:H2iYFOHox5EPqEQM30XsvmRR4xdR+aBj/CcDy9/Oxe+aXwzxyl70YqaCWcN2eyMEuEH0hUswdYQ68CFIyzN+kigP0Xh8RM81anPmpXDq6Ew3pa5qwaG46biiD/uouGYGdr4ZTKF2mB284DBuc2Ptd4UmR/9SBg3Dzfe/IznwMhZ7X5e0KeQGrP0ex/wBnMxc7JRmlpgKOG58qVxTsckaG5aty4ckttIPw/UP9k1UjJY=; 20:XHMve/YImTgtav0JyEvwJ/BHMEjzmGunlduuwHT9Gobzn1Zug/mv3V5i/M6CTMDZVQkEmloyfpmli93GQ0geP91o3NfH7FdKbOZgsMDXqCOpRjnzQbPHpMHoiX8Qr0dXKJEPHij029kD/Ol2dvBfKiSVmWekEwHHWK/m0IGHXTcpWLcuaSxubqZbO+rXmWQ/H2xUFDK32tkxkInoDa1XbG4tpZDULbB8T6V0m2LD2/QYOgIhWpKtuZrdrev8R0kZ6X9fcdw0YIuDIU4IqpKzO8MYfd4KLJ8pa8OuQCuyFwRqiJJDpzxtC0LKAVrhE97DO/0QF+ifS9eFUCwH8z8mFOKPCHwfNbVizHmLCF3hSLhI+gbrUPVlG2Ea3Sy980GPWnMnYbY+0UWoUyUo5HFILtkrWB43pkZ9KiPwEuYvVrLEZKClMUncvVKFJy25JKw1wN4HKeDUfPqmI0HO1EbUIKwrOir4shrEzqv6AeiRK4D2hlsJji4H5VIZKWZUuQV2 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(93006095)(93004095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:SN6PR02MB4334; BCL:0; PCL:0; RULEID:; SRVR:SN6PR02MB4334; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4334; 4:9nBP3Q9zXs4nExELW3tLYW4FAvMjmorH2I7iFMr9fc41j9/gzvHWoNaaJ1FWByRsUN2fStmxo8bpulReDrIfIhbs/eEnkB3slTwdGEQXhzh5D9FzxBG5Ths0hZAzrC1VJu/OTc797zZxcPmBZ6Ml9Nikez9Es2l+PfsFre7zggi5XvKvyTNwY86BGzef+XMmgNhLq3mXzCNdeAUkBGop0TbXyA3f4Y6iq7vsBPjQ8K1tg0Bmcpt0WuJVKEHIP+Myysfkg3bSeHAMIThLwzyFG7YAJWVNCKMnm6NRQbPXlN5JTX0t0IjtQlBFB3Ren7gH X-Forefront-PRVS: 0727122FC6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR02MB4334; 23:B3kv+DTL7Szs+nf40m7rH4kwrJiVy7yTXwrQRQlvH?= =?us-ascii?Q?tZ2x6cybgFuToQKAlDcDNZA9W9EagpkFRpfZP8X91KojDD/GVfXnN0bR9WyJ?= =?us-ascii?Q?qttGtfyF1b/jAdUiDYgBHDKCufCfEjh0iU8fKkdjsRThez/hTdfjRXPZ2EEy?= =?us-ascii?Q?z/pdj6KNtGFOnTFQd7DrkYQ5nVEv3HYggXoIEw3Qdb2CA7cHaZimI3zhp17G?= =?us-ascii?Q?QZMmVAEnbHiS8uJ/4lPrR7aZNaQb9cOk9c6qGiTg6GGAy00l5M0I8y4DsWZP?= =?us-ascii?Q?TcXy8dHIQsieVa+qs8ETMieC2pzJ/TQBtykf+MQeHD1+UyE+sUsWBnpxnan3?= =?us-ascii?Q?3osEWNaCS/T9vOyP9sI3kyo+/ArxiahSGT6mvDWPIcGXQLmws1dWbb/pyna4?= =?us-ascii?Q?aOEXJe/QFMmt/l+5oJzwbHJjVVhh/75hn+Ki/C+q2HFEQzBQwt6712vnS10x?= =?us-ascii?Q?umvnY2sJWXhwtWTaG2TkAYa6C7vbFQuE0pjG0me60wjakj28IzHVKYHWN2mb?= =?us-ascii?Q?+m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UyveuatGLma8M/42JhhFnbjLCunca0vDg9fEt2LxmLjv96q4l96kJi3amML3tJoOzxFYjn1r/0PlBPH7ZvAmAMg6K5nTE0fIizikW+hrI/Bk4A94OozF/xcqhxBKD6E25iZYf1KuzSPmM+CX3dHd5P6mPTw+oGO2W+kE6bHdAQjBNUvYWXayXtWOdHDrDm1etVtcBhjLRyhsw X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2018 02:37:27.1660 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 691482f5-6995-4fef-422b-08d5e47bbea7 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR02MB4334 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hyun Kwon Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Enable YUV422 and YUV444 formats by adding to the format table and pattern generation calls. Signed-off-by: Hyun Kwon --- tests/util/format.c | 4 ++++ tests/util/pattern.c | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/tests/util/format.c b/tests/util/format.c index 15ac5e1..b48594c 100644 --- a/tests/util/format.c +++ b/tests/util/format.c @@ -52,6 +52,10 @@ static const struct util_format_info format_info[] = { /* YUV planar */ { DRM_FORMAT_YUV420, "YU12", MAKE_YUV_INFO(YUV_YCbCr, 2, 2, 1) }, { DRM_FORMAT_YVU420, "YV12", MAKE_YUV_INFO(YUV_YCrCb, 2, 2, 1) }, + { DRM_FORMAT_YUV422, "YU16", MAKE_YUV_INFO(YUV_YCbCr, 2, 1, 1) }, + { DRM_FORMAT_YVU422, "YV16", MAKE_YUV_INFO(YUV_YCrCb, 2, 1, 1) }, + { DRM_FORMAT_YUV444, "YU24", MAKE_YUV_INFO(YUV_YCbCr, 1, 1, 1) }, + { DRM_FORMAT_YVU444, "YV24", MAKE_YUV_INFO(YUV_YCrCb, 1, 1, 1) }, /* RGB16 */ { DRM_FORMAT_ARGB4444, "AR12", MAKE_RGB_INFO(4, 8, 4, 4, 4, 0, 4, 12) }, { DRM_FORMAT_XRGB4444, "XR12", MAKE_RGB_INFO(4, 8, 4, 4, 4, 0, 0, 0) }, diff --git a/tests/util/pattern.c b/tests/util/pattern.c index aa067c9..2805724 100644 --- a/tests/util/pattern.c +++ b/tests/util/pattern.c @@ -487,10 +487,14 @@ static void fill_smpte(const struct util_format_info *info, void *planes[3], width, height, stride); case DRM_FORMAT_YUV420: + case DRM_FORMAT_YUV422: + case DRM_FORMAT_YUV444: return fill_smpte_yuv_planar(&info->yuv, planes[0], planes[1], planes[2], width, height, stride); case DRM_FORMAT_YVU420: + case DRM_FORMAT_YVU422: + case DRM_FORMAT_YVU444: return fill_smpte_yuv_planar(&info->yuv, planes[0], planes[2], planes[1], width, height, stride); @@ -772,10 +776,14 @@ static void fill_tiles(const struct util_format_info *info, void *planes[3], width, height, stride); case DRM_FORMAT_YUV420: + case DRM_FORMAT_YUV422: + case DRM_FORMAT_YUV444: return fill_tiles_yuv_planar(info, planes[0], planes[1], planes[2], width, height, stride); case DRM_FORMAT_YVU420: + case DRM_FORMAT_YVU422: + case DRM_FORMAT_YVU444: return fill_tiles_yuv_planar(info, planes[0], planes[2], planes[1], width, height, stride);