Show a patch.

GET /api/patches/14308/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 14308,
    "url": "https://patchwork.libcamera.org/api/patches/14308/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14308/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20211026072148.164831-7-umang.jain@ideasonboard.com>",
    "date": "2021-10-26T07:21:47",
    "name": "[libcamera-devel,v8,6/7] android: post_processor: Drop return value for process()",
    "commit_ref": "05862a7e35b708812f7cb6e641f7a7c1c10efea3",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d39815bbcda6089fe422d7f4341d269e38e26de3",
    "submitter": {
        "id": 86,
        "url": "https://patchwork.libcamera.org/api/people/86/?format=api",
        "name": "Umang Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14308/mbox/",
    "series": [
        {
            "id": 2654,
            "url": "https://patchwork.libcamera.org/api/series/2654/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2654",
            "date": "2021-10-26T07:21:41",
            "name": "Async Post Processor",
            "version": 8,
            "mbox": "https://patchwork.libcamera.org/series/2654/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14308/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14308/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 63F2BBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Oct 2021 07:22:09 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1C8B964874;\n\tTue, 26 Oct 2021 09:22:09 +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 8E3A864878\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Oct 2021 09:22:07 +0200 (CEST)",
            "from perceval.ideasonboard.com (unknown [103.251.226.211])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7AFB43F0;\n\tTue, 26 Oct 2021 09:22:06 +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=\"vdajPFDj\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1635232927;\n\tbh=3nkEn2L9FkJicy6yOyHHIRt2i804WchpsL4UOJkoPlI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=vdajPFDj5v4wKY14lq30okX8L4SJ+Xq9eW2NhL+9bzXiLVo3hRymDFrpphIzMUY+d\n\tMtNjh6WBzF8WnpLApn1SZslrhCkMgi08ZKSE9KT2hDwRpHmrbqng2SQ8BgIUhPH8lL\n\trunJnt7u2tNlutfGjZIKiRBupcvToc5bZe6+hpRQ=",
        "From": "Umang Jain <umang.jain@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 26 Oct 2021 12:51:47 +0530",
        "Message-Id": "<20211026072148.164831-7-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20211026072148.164831-1-umang.jain@ideasonboard.com>",
        "References": "<20211026072148.164831-1-umang.jain@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v8 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 dac216d6..fed99022 100644\n--- a/src/android/camera_stream.cpp\n+++ b/src/android/camera_stream.cpp\n@@ -191,7 +191,9 @@ int CameraStream::process(Camera3RequestDescriptor::StreamBuffer *streamBuffer)\n \t\treturn -EINVAL;\n \t}\n \n-\treturn postProcessor_->process(streamBuffer);\n+\tpostProcessor_->process(streamBuffer);\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 5e8c61fc..d72ebc3c 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 05c4f1cf..9f883924 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->dstBuffer.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",
        "v8",
        "6/7"
    ]
}