Patch Detail
Show a patch.
GET /api/1.1/patches/14292/?format=api
{ "id": 14292, "url": "https://patchwork.libcamera.org/api/1.1/patches/14292/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14292/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "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-7-umang.jain@ideasonboard.com>", "date": "2021-10-23T10:33:01", "name": "[libcamera-devel,v6,6/7] android: post_processor: Drop return value for process()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "ffa9416c1b566d1a33dbc2e9a9e130e3c10dbf96", "submitter": { "id": 86, "url": "https://patchwork.libcamera.org/api/1.1/people/86/?format=api", "name": "Umang Jain", "email": "umang.jain@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/14292/mbox/", "series": [ { "id": 2652, "url": "https://patchwork.libcamera.org/api/1.1/series/2652/?format=api", "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/14292/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14292/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 DFB3ABDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 23 Oct 2021 10:33:23 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9670C64871;\n\tSat, 23 Oct 2021 12:33:23 +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 E69DD64870\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 23 Oct 2021 12:33:21 +0200 (CEST)", "from perceval.ideasonboard.com (unknown [103.251.226.213])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 98D5D547;\n\tSat, 23 Oct 2021 12:33:20 +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=\"vQntXnz2\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634985201;\n\tbh=9EcROADsZ0dnUpkC4C3yBGBKmTVRHri3V27iz+omevo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=vQntXnz2BZeB64gtbyYyLMXxpS/fhgk9UK70ac6cySMfUCMwdmaPhJZXTAPiI2OUw\n\tBZPiNM+Cdxk1vS3WQccHvrnpIH0Kl5Z716mYb7OZlkAuJPUoHHN5KAGTfFA8L1zi3z\n\txhrx4IqbokHFpTvEtULg9hRC/eUd+OUOiqS10zMc=", "From": "Umang Jain <umang.jain@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 23 Oct 2021 16:03:01 +0530", "Message-Id": "<20211023103302.152769-7-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 6/7] android: post_processor: Drop\n\treturn value for process()", "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": "PostProcessor::process() is invoked by CameraStream class\nin case any post-processing is required for the camera stream.\nThe failure or success is checked via the value returned by\nCameraStream::process().\n\nNow that the post-processor notifies about the post-processing\ncompletion operation, we can drop the return value of\nPostProcessor::process(). The status of post-processing is passed\nto CameraDevice::streamProcessingComplete() by the\nPostProcessor::processComplete signal's slot.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_stream.cpp | 4 +++-\n src/android/jpeg/post_processor_jpeg.cpp | 6 ++----\n src/android/jpeg/post_processor_jpeg.h | 2 +-\n src/android/post_processor.h | 2 +-\n src/android/yuv/post_processor_yuv.cpp | 10 ++++------\n src/android/yuv/post_processor_yuv.h | 2 +-\n 6 files changed, 12 insertions(+), 14 deletions(-)", "diff": "diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp\nindex 4e275cde..45d0607d 100644\n--- a/src/android/camera_stream.cpp\n+++ b/src/android/camera_stream.cpp\n@@ -194,7 +194,9 @@ int CameraStream::process(const FrameBuffer &source,\n \n \tdest.srcBuffer = &source;\n \n-\treturn postProcessor_->process(&dest);\n+\tpostProcessor_->process(&dest);\n+\n+\treturn 0;\n }\n \n FrameBuffer *CameraStream::getBuffer()\ndiff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\nindex cbbe7128..9d7523cb 100644\n--- a/src/android/jpeg/post_processor_jpeg.cpp\n+++ b/src/android/jpeg/post_processor_jpeg.cpp\n@@ -98,7 +98,7 @@ void PostProcessorJpeg::generateThumbnail(const FrameBuffer &source,\n \t}\n }\n \n-int PostProcessorJpeg::process(Camera3RequestDescriptor::StreamBuffer *streamBuffer)\n+void PostProcessorJpeg::process(Camera3RequestDescriptor::StreamBuffer *streamBuffer)\n {\n \tASSERT(encoder_);\n \n@@ -199,7 +199,7 @@ int PostProcessorJpeg::process(Camera3RequestDescriptor::StreamBuffer *streamBuf\n \tif (jpeg_size < 0) {\n \t\tLOG(JPEG, Error) << \"Failed to encode stream image\";\n \t\tprocessComplete.emit(streamBuffer, PostProcessor::Status::Error);\n-\t\treturn jpeg_size;\n+\t\treturn;\n \t}\n \n \t/* Fill in the JPEG blob header. */\n@@ -213,6 +213,4 @@ int PostProcessorJpeg::process(Camera3RequestDescriptor::StreamBuffer *streamBuf\n \t/* Update the JPEG result Metadata. */\n \tresultMetadata->addEntry(ANDROID_JPEG_SIZE, jpeg_size);\n \tprocessComplete.emit(streamBuffer, PostProcessor::Status::Success);\n-\n-\treturn 0;\n }\ndiff --git a/src/android/jpeg/post_processor_jpeg.h b/src/android/jpeg/post_processor_jpeg.h\nindex 92385548..43fcbe60 100644\n--- a/src/android/jpeg/post_processor_jpeg.h\n+++ b/src/android/jpeg/post_processor_jpeg.h\n@@ -22,7 +22,7 @@ public:\n \n \tint configure(const libcamera::StreamConfiguration &incfg,\n \t\t const libcamera::StreamConfiguration &outcfg) override;\n-\tint process(Camera3RequestDescriptor::StreamBuffer *streamBuffer) override;\n+\tvoid process(Camera3RequestDescriptor::StreamBuffer *streamBuffer) override;\n \n private:\n \tvoid generateThumbnail(const libcamera::FrameBuffer &source,\ndiff --git a/src/android/post_processor.h b/src/android/post_processor.h\nindex 4ac74fcf..5ec71c93 100644\n--- a/src/android/post_processor.h\n+++ b/src/android/post_processor.h\n@@ -27,7 +27,7 @@ public:\n \n \tvirtual int configure(const libcamera::StreamConfiguration &inCfg,\n \t\t\t const libcamera::StreamConfiguration &outCfg) = 0;\n-\tvirtual int process(Camera3RequestDescriptor::StreamBuffer *streamBuffer) = 0;\n+\tvirtual void process(Camera3RequestDescriptor::StreamBuffer *streamBuffer) = 0;\n \n \tlibcamera::Signal<Camera3RequestDescriptor::StreamBuffer *, Status> processComplete;\n };\ndiff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp\nindex 8e77bf57..1ac7995a 100644\n--- a/src/android/yuv/post_processor_yuv.cpp\n+++ b/src/android/yuv/post_processor_yuv.cpp\n@@ -49,21 +49,21 @@ int PostProcessorYuv::configure(const StreamConfiguration &inCfg,\n \treturn 0;\n }\n \n-int PostProcessorYuv::process(Camera3RequestDescriptor::StreamBuffer *streamBuffer)\n+void PostProcessorYuv::process(Camera3RequestDescriptor::StreamBuffer *streamBuffer)\n {\n \tconst FrameBuffer &source = *streamBuffer->srcBuffer;\n \tCameraBuffer *destination = streamBuffer->destBuffer.get();\n \n \tif (!isValidBuffers(source, *destination)) {\n \t\tprocessComplete.emit(streamBuffer, PostProcessor::Status::Error);\n-\t\treturn -EINVAL;\n+\t\treturn;\n \t}\n \n \tconst MappedFrameBuffer sourceMapped(&source, MappedFrameBuffer::MapFlag::Read);\n \tif (!sourceMapped.isValid()) {\n \t\tLOG(YUV, Error) << \"Failed to mmap camera frame buffer\";\n \t\tprocessComplete.emit(streamBuffer, PostProcessor::Status::Error);\n-\t\treturn -EINVAL;\n+\t\treturn;\n \t}\n \n \tint ret = libyuv::NV12Scale(sourceMapped.planes()[0].data(),\n@@ -81,12 +81,10 @@ int PostProcessorYuv::process(Camera3RequestDescriptor::StreamBuffer *streamBuff\n \tif (ret) {\n \t\tLOG(YUV, Error) << \"Failed NV12 scaling: \" << ret;\n \t\tprocessComplete.emit(streamBuffer, PostProcessor::Status::Error);\n-\t\treturn -EINVAL;\n+\t\treturn;\n \t}\n \n \tprocessComplete.emit(streamBuffer, PostProcessor::Status::Success);\n-\n-\treturn 0;\n }\n \n bool PostProcessorYuv::isValidBuffers(const FrameBuffer &source,\ndiff --git a/src/android/yuv/post_processor_yuv.h b/src/android/yuv/post_processor_yuv.h\nindex 5954e11b..39ec7994 100644\n--- a/src/android/yuv/post_processor_yuv.h\n+++ b/src/android/yuv/post_processor_yuv.h\n@@ -18,7 +18,7 @@ public:\n \n \tint configure(const libcamera::StreamConfiguration &incfg,\n \t\t const libcamera::StreamConfiguration &outcfg) override;\n-\tint process(Camera3RequestDescriptor::StreamBuffer *streamBuffer) override;\n+\tvoid process(Camera3RequestDescriptor::StreamBuffer *streamBuffer) override;\n \n private:\n \tbool isValidBuffers(const libcamera::FrameBuffer &source,\n", "prefixes": [ "libcamera-devel", "v6", "6/7" ] }