From patchwork Thu Nov 15 11:23:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dafna Hirschfeld X-Patchwork-Id: 10684157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 250D113BF for ; Thu, 15 Nov 2018 11:23:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 122C42C416 for ; Thu, 15 Nov 2018 11:23:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04DCA2C41B; Thu, 15 Nov 2018 11:23:57 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A70372C416 for ; Thu, 15 Nov 2018 11:23:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729117AbeKOVbV (ORCPT ); Thu, 15 Nov 2018 16:31:21 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39277 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728931AbeKOVbV (ORCPT ); Thu, 15 Nov 2018 16:31:21 -0500 Received: by mail-wm1-f68.google.com with SMTP id u13-v6so17653293wmc.4 for ; Thu, 15 Nov 2018 03:23:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=hUf9uSZrlykPUOADkm7R6SIwPgrBS4G7sAhAdRIvfxw=; b=osas5WhMD8iC8IQNNDsZH61U5nAamQ/ndnp93qIyG78PIty7p5xZo985fwNIA8HLtY 9r78En95peb3lHGo3ZM4NXFsanXLA0JtVOsfszubYTnbwA3yqgNFmrjzAcsjSAgaD8hH L+xK84/AfGB5dynJ9Hh0sgC4HcEE/KNVXrPrpojhAyGe9KKoKJHq7VAvYROGJ6SEilFU SjC9R9rOTrHqABWtKjVukxPnbKny++ISL9vV2AfSRpfItvgPwTLe0qM1d3y5Zb2gWVfN zviaQdpOA2OZTg7c/6lDZmiTZ9Jp+8gDbomz4IxBcu2X1cbgWbQKoY3oSqsd+qHC7DKP 74Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hUf9uSZrlykPUOADkm7R6SIwPgrBS4G7sAhAdRIvfxw=; b=eBVSwyaIBhAaK5X3lkfjUdw/yHdOd3t4+ZZmDMBprWQXUP/7CdcLbGX/JSRRz7sOkV TRqNasekiTphi85+aJC2L8oRr+I9I9OF0U80RXK76ZFfOb6vsuo6UqLe925o2x1VwvLK i1ItXV3Iiva6ffZvPdl3yVvyaRg9ymdwYgSkB0rnGZOPEwDU8sOR1oru7U9STxuNaNtl qpb97UA93LnYoWILLAF6TbN0cFXP695cLf5DyOPygDPj52mcHMbVoJoGDJeoRNQ3ro6m 4CMMyBU5sSnYL7/SF9I0Vyx+n524W1XTuKMnO3gJk/bkGI0XtLzTq3EAsyGcHghRaBlY V5PQ== X-Gm-Message-State: AGRZ1gJ+d9pF/wuqb6TUbs/ZEncixch78n7Oj6Nh3UHq1DJukVlSnq8c BuCSQ2xJdvJq2huOPgrTcf8= X-Google-Smtp-Source: AJdET5f2NvRx/+SBJm7bJXfoEbPzy+c8DJYG8F0DgKjEryV4WPq+4EcKiEOw62k9kkTIlaZVUYbKEA== X-Received: by 2002:a1c:2e50:: with SMTP id u77-v6mr5155925wmu.106.1542281032997; Thu, 15 Nov 2018 03:23:52 -0800 (PST) Received: from localhost.localdomain ([87.70.83.200]) by smtp.gmail.com with ESMTPSA id c6-v6sm10614682wre.45.2018.11.15.03.23.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 03:23:52 -0800 (PST) From: Dafna Hirschfeld To: helen.koike@collabora.com, hverkuil@xs4all.nl, mchehab@kernel.org Cc: linux-media@vger.kernel.org, Dafna Hirschfeld , outreachy-kernel@googlegroups.com Subject: [PATCH vicodec v4 0/3] Add support to more pixel formats in vicodec Date: Thu, 15 Nov 2018 13:23:29 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The new supported formats are V4L2_PIX_FMT_GREY, V4L2_PIX_FMT_ARGB32, V4L2_PIX_FMT_ABGR32. The returned encoded format is chaned to support various numbers of planes instead of assuming 3 planes. The first patch adds new fields to structs. The second patch adds support for V4L2_PIX_FMT_GREY. The third patch adds support for V4L2_PIX_FMT_ARGB32, V4L2_PIX_FMT_ABGR32. The code used to test this patch is https://github.com/kamomil/outreachy The script I used to test greyscale support: https://github.com/kamomil/outreachy/blob/master/greyscale-full-example.sh The script I used to test argb/abgr: https://github.com/kamomil/outreachy/blob/master/argb-and-abgr-full-example.sh Changes from v3: patch 1,3: - no change patch 2: - replace the 2-bit flag FWHT_FL_COMPONENTS_NUM_BIT[01] with GENMASK - add TODO comment - handle the case where the encoded stream is different format than the decoded - allocate maximal space for the V4L2_PIX_FMT_FWHT format with the test 'flags & FWHT_FL_COMPONENTS_NUM_BIT[01]' Dafna Hirschfeld (3): media: vicodec: prepare support for various number of planes media: vicodec: Add support of greyscale format media: vicodec: Add support for 4 planes formats drivers/media/platform/vicodec/codec-fwht.c | 73 +++++++---- drivers/media/platform/vicodec/codec-fwht.h | 15 ++- .../media/platform/vicodec/codec-v4l2-fwht.c | 123 +++++++++++++----- .../media/platform/vicodec/codec-v4l2-fwht.h | 3 +- drivers/media/platform/vicodec/vicodec-core.c | 35 ++++- 5 files changed, 182 insertions(+), 67 deletions(-)