{"id":12107,"url":"https://patchwork.libcamera.org/api/1.1/patches/12107/?format=json","web_url":"https://patchwork.libcamera.org/patch/12107/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20210426030224.2255533-1-hiroh@chromium.org>","date":"2021-04-26T03:02:24","name":"[libcamera-devel] android: CameraDevice: Skip post processings to unsuccessful buffers","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"4f506ad0afee03b13281c22625d4a973e276554d","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/1.1/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/12107/mbox/","series":[{"id":1974,"url":"https://patchwork.libcamera.org/api/1.1/series/1974/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1974","date":"2021-04-26T03:02:24","name":"[libcamera-devel] android: CameraDevice: Skip post processings to unsuccessful buffers","version":1,"mbox":"https://patchwork.libcamera.org/series/1974/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/12107/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/12107/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 CFDB6BDC91\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Apr 2021 03:02:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0737468881;\n\tMon, 26 Apr 2021 05:02:33 +0200 (CEST)","from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com\n\t[IPv6:2607:f8b0:4864:20::42d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5931E605BD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Apr 2021 05:02:32 +0200 (CEST)","by mail-pf1-x42d.google.com with SMTP id q2so6036456pfk.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 25 Apr 2021 20:02:32 -0700 (PDT)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:56d0:a14c:fac3:5bc3])\n\tby smtp.gmail.com with ESMTPSA id\n\tp126sm9966561pga.86.2021.04.25.20.02.29\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 25 Apr 2021 20:02:29 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"lnE2uELy\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; h=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=wL4y5vpF1628BgbYGtyNF4JqIvnn2Qlk2KsQFYCqwnY=;\n\tb=lnE2uELyg6RMPNAOqb0d72798FOj9/3A63ipHx6k+0uxNjxEsMvxoo0Ka46mdd2jLE\n\tGTVd9nw5XNBulxMg7+ExlALlbOd4PrGdwWSPCXQSaVhOUAwoJkiECMkJQ/9vfAzBe0BF\n\taBpKUHdGCXdfXI+6e0CNbDMeLib2EVOft+6OE=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=wL4y5vpF1628BgbYGtyNF4JqIvnn2Qlk2KsQFYCqwnY=;\n\tb=ZIAVr/If05SBM3cX3NRm4gr9WHl8Zsy0A7rTb3GyQ2W46l3KjdPMkF0ITaciWDRql+\n\tAagolS6DkOhaLQ/13PMEzYQfFC1mzti3QXUOwHTU4q3JPQSB55K8JAK2vWCEiigPuSpL\n\thlOqGMWjDyOLfFpct5jzagHFzlOrV5417Wux40Zb9vEzuzgTvTdNES0GUCgIkJhzar5i\n\t5MxviS9KXhOAjokYwWFmtFVMG0tJzmkhD6daHd8A4CtyJ8oQC6TUILTGkjjn/b9+uCz7\n\th5oMnLKSJGSzLT+hwq6jhnWy9udlGssaXOtl8nho7Mp6CFJKr9iABqTlB9J5tuQjoNur\n\tvFCA==","X-Gm-Message-State":"AOAM5328hLloAfJnQt/xor9hSCWmCfIRe+74jyj1qaR7Q7148Ykyp8lo\n\tpCQaUDbevBVYvCUB+L9DIPgvW02mu7/UlQ==","X-Google-Smtp-Source":"ABdhPJwhaC9WnfKyB1zQBok2kyjFHvWTGsI+irV+U+hfY4ia2EordAWSGRYSYbkiJJi0Cnl2KFlr0g==","X-Received":"by 2002:a65:6242:: with SMTP id\n\tq2mr15064915pgv.277.1619406150332; \n\tSun, 25 Apr 2021 20:02:30 -0700 (PDT)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 26 Apr 2021 12:02:24 +0900","Message-Id":"<20210426030224.2255533-1-hiroh@chromium.org>","X-Mailer":"git-send-email 2.31.1.498.g6c1eba8ee3d-goog","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH] android: CameraDevice: Skip post\n\tprocessings to unsuccessful buffers","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"This skips executing post processings to unsuccessful buffers as\nthey are meaningless.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/camera_device.cpp | 9 +++++++++\n 1 file changed, 9 insertions(+)","diff":"diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex a71aee2f..abb06810 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -2064,6 +2064,9 @@ void CameraDevice::requestComplete(Request *request)\n \n \t/* Handle any JPEG compression. */\n \tfor (camera3_stream_buffer_t &buffer : descriptor.buffers_) {\n+\t\tif (status == CAMERA3_BUFFER_STATUS_ERROR)\n+\t\t\tcontinue;\n+\n \t\tCameraStream *cameraStream =\n \t\t\tstatic_cast<CameraStream *>(buffer.stream->priv);\n \n@@ -2076,6 +2079,12 @@ void CameraDevice::requestComplete(Request *request)\n \t\t\tcontinue;\n \t\t}\n \n+\t\tif (src->metadata().status != FrameMetadata::FrameSuccess) {\n+\t\t\tLOG(HAL, Debug) << \"Skip post-processing because the \"\n+\t\t\t\t\t<< \"buffer is not filled successfully\";\n+\t\t\tcontinue;\n+\t\t}\n+\n \t\tint ret = cameraStream->process(*src,\n \t\t\t\t\t\t*buffer.buffer,\n \t\t\t\t\t\tdescriptor.settings_,\n","prefixes":["libcamera-devel"]}