{"id":14288,"url":"https://patchwork.libcamera.org/api/patches/14288/?format=json","web_url":"https://patchwork.libcamera.org/patch/14288/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211023103302.152769-3-umang.jain@ideasonboard.com>","date":"2021-10-23T10:32:57","name":"[libcamera-devel,v6,2/7] android: post_processor_jpeg: Replace encoder_ nullptr check","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"9fe151849cb61b92eb44cbfe26e68309ec244e68","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/?format=json","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14288/mbox/","series":[{"id":2652,"url":"https://patchwork.libcamera.org/api/series/2652/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2652","date":"2021-10-23T10:32:55","name":"Async Post Processor","version":6,"mbox":"https://patchwork.libcamera.org/series/2652/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14288/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14288/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D240BBDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 23 Oct 2021 10:33:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 02ED864873;\n\tSat, 23 Oct 2021 12:33:16 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF60260239\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 23 Oct 2021 12:33:13 +0200 (CEST)","from perceval.ideasonboard.com (unknown [103.251.226.213])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E3F5B547;\n\tSat, 23 Oct 2021 12:33:12 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"XoUvQbhJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634985193;\n\tbh=l/NM6MLuXFNLgFropUfBbVQLha4gxOv5E4sKnwI20g8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=XoUvQbhJCzS+zQ16hV/kX2UoxLkhQ7Y7ZkdsyEMqYvpNbyiMFUtNrwQjuXNaAwkWR\n\tqmXdYivYE1lOwCanWLCubpRbi+Jz0G8FQow9wkTXTAoidFnxjsyU9LNN25EODiOhOV\n\tjmLdofkogMCGS6Vdx1RtHVcB+6AoNn/dLYS5RFVw=","From":"Umang Jain <umang.jain@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Sat, 23 Oct 2021 16:02:57 +0530","Message-Id":"<20211023103302.152769-3-umang.jain@ideasonboard.com>","X-Mailer":"git-send-email 2.31.1","In-Reply-To":"<20211023103302.152769-1-umang.jain@ideasonboard.com>","References":"<20211023103302.152769-1-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v6 2/7] android: post_processor_jpeg:\n\tReplace encoder_ nullptr check","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Instead of simply returning if encoder_ is nullptr, fail hard\nvia an assertion. It is quite unlikely that encoder_ will be\nnullptr in PostProcessorJpeg::process() so, be loud about\nthe failure.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/android/jpeg/post_processor_jpeg.cpp | 4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)","diff":"diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\nindex 699576ef..49483836 100644\n--- a/src/android/jpeg/post_processor_jpeg.cpp\n+++ b/src/android/jpeg/post_processor_jpeg.cpp\n@@ -102,9 +102,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,\n \t\t\t       CameraBuffer *destination,\n \t\t\t       Camera3RequestDescriptor *request)\n {\n-\tif (!encoder_)\n-\t\treturn 0;\n-\n+\tASSERT(encoder_);\n \tASSERT(destination->numPlanes() == 1);\n \n \tconst CameraMetadata &requestMetadata = request->settings_;\n","prefixes":["libcamera-devel","v6","2/7"]}