From patchwork Fri Mar 22 19:50:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 19797 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 3207DBD160 for ; Fri, 22 Mar 2024 19:51:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 53BBE62826; Fri, 22 Mar 2024 20:51:03 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="VMYl6NWX"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 983BE61C45 for ; Fri, 22 Mar 2024 20:51:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1711137060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L/bUMvrlTYS5jNwsBY/BFnmn7pGX+APWCBJ/ovhFMcc=; b=VMYl6NWXgwlkCLKLBX6cO1VmFIgGkK4kvsTQGeZQcccO3VP21Y0EByR2R77f6Sq4UvIRU9 zd9kqoP95EjVmHvoM+e1qcH+GcoudOAYEs6kuZEV1BDdhEW8KgbPziSA9KII6Vfj9+vRy1 KAYvAKfWk9qhnvbBhVbzlt9AEvMiIJY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-83-EjbtN1DyO5GtKpHeidSYow-1; Fri, 22 Mar 2024 15:50:56 -0400 X-MC-Unique: EjbtN1DyO5GtKpHeidSYow-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6AAE4185A784; Fri, 22 Mar 2024 19:50:56 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.224.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 44B512022C1D; Fri, 22 Mar 2024 19:50:54 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Kieran Bingham , Laurent Pinchart Subject: [PATCH v4 0/1] cam: Add support for PPM output format Date: Fri, 22 Mar 2024 20:50:31 +0100 Message-ID: <20240322195032.1803017-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This is to make cam file output directly usable in image viewers and processors, without the need to explore the file format and to convert it to something usable using home-made converters. v4 (Laurent's review addressed): - Use "ppm" rather than "pnm" everywhere. - Alphabetical ordering at several places. - config.stride used directly instead of storing it to a variable. - A short note regarding file formats added to the commit message. v3: - Pass Sink rather than void* to the writer. - Fix the copyright line. v2: No change, just rebased on current master. Milan Zamazal (1): apps: cam: Add support for PPM output format src/apps/cam/file_sink.cpp | 11 +++++++ src/apps/cam/main.cpp | 2 ++ src/apps/common/meson.build | 1 + src/apps/common/ppm_writer.cpp | 53 ++++++++++++++++++++++++++++++++++ src/apps/common/ppm_writer.h | 20 +++++++++++++ 5 files changed, 87 insertions(+) create mode 100644 src/apps/common/ppm_writer.cpp create mode 100644 src/apps/common/ppm_writer.h