From patchwork Mon Jul 11 10:58:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 16584 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id F251DBE173 for ; Mon, 11 Jul 2022 10:58:48 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 622DE62752; Mon, 11 Jul 2022 12:58:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1657537128; bh=1+1R4EGYEKVUK/AQ1Hf69dY1wpif4pQcKkzvx4LPjwY=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=JYHQBBNDqQoDcWrNG0y0riTzPt8oX3T07IPSEhL6QvYrDmzDT/57elrsfO0stWDwr J6KtLRvTyCCU/U3xJTvCOJACuhz+uIhTk83Up1fvzthbOE9zatKFDVMwyaRTwV7oS+ A8jvJVO6cYJ9KacGeRkXRIYViRe7Wnbo4medXRsNjBBL6gK37YLu+PZyU8k9+kdvAH h6usekD8NlGkP15CJsqMVHUZdytgjbg3jAdN9h0ufEMdKl0bbRHve81aw5svFedJZj TPPoR+uRmrY7rUpb6Lw30hPgWqg0pn6QPgeyR0E2DX1Pp/kqoNk/33VmFjxp/x0cvw HNimKDytDcSpw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 975E260401 for ; Mon, 11 Jul 2022 12:58:46 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="g9QTh5wW"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [IPv6:2401:4900:1f3f:b3fb:3712:29bf:7855:376e]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E68A1326; Mon, 11 Jul 2022 12:58:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1657537126; bh=1+1R4EGYEKVUK/AQ1Hf69dY1wpif4pQcKkzvx4LPjwY=; h=From:To:Cc:Subject:Date:From; b=g9QTh5wWOgAaQHHjTI12DMzV6DyUWfUZVKkIunisYO3g2/njKqEiriam/+ouFdbrJ pRabFgoh2T/SJ80zN/OxfHo+f9qW98igj09v6Um7wO7MZcnOYwGmJvZMsPckpll6sD d11RAt/tJl59tejdOAEBSnj539FmcwwnRLHvBoCw= To: libcamera-devel@lists.libcamera.org Date: Mon, 11 Jul 2022 16:28:33 +0530 Message-Id: <20220711105835.48254-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/2] IPU3 Pack utility X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" We already have utility to unpack 10-bit packed bayer data as ipu3-unpack utility. This series provide the opposite i.e. a utility to pack 16-bit bayer unpacked data back to IPU3 specific 10-bit bayer format. Changes in v2: - Drop support for multiple input files - Support "-" to output on stdout - Handle packing of last 2 indexes from input data separately to avoid out-of-bound error cases. Patch 1/2 is a drive-by string-fix. Umang Jain (2): utils: ipu3-unpack: Fix error string utils: ipu3-pack: Provide a 10-bit bayer packing utility utils/ipu3/ipu3-pack.c | 100 +++++++++++++++++++++++++++++++++++++++ utils/ipu3/ipu3-unpack.c | 2 +- utils/ipu3/meson.build | 1 + 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 utils/ipu3/ipu3-pack.c