{"id":13443,"url":"https://patchwork.libcamera.org/api/1.1/covers/13443/?format=json","web_url":"https://patchwork.libcamera.org/cover/13443/","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":"<20210823131221.1034059-1-hiroh@chromium.org>","date":"2021-08-23T13:12:11","name":"[libcamera-devel,RFC,v2,00/10] Add offset to FrameBuffer::Plane","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/1.1/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"mbox":"https://patchwork.libcamera.org/cover/13443/mbox/","series":[{"id":2386,"url":"https://patchwork.libcamera.org/api/1.1/series/2386/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2386","date":"2021-08-23T13:12:11","name":"Add offset to FrameBuffer::Plane","version":2,"mbox":"https://patchwork.libcamera.org/series/2386/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/13443/comments/","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 74D13BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Aug 2021 13:12:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9C920688A6;\n\tMon, 23 Aug 2021 15:12:35 +0200 (CEST)","from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com\n\t[IPv6:2607:f8b0:4864:20::102e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BAB0C68892\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Aug 2021 15:12:33 +0200 (CEST)","by mail-pj1-x102e.google.com with SMTP id\n\tj4-20020a17090a734400b0018f6dd1ec97so1303238pjs.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Aug 2021 06:12:33 -0700 (PDT)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:184e:5d20:8fcb:dfcd])\n\tby smtp.gmail.com with ESMTPSA id\n\tj4sm18596891pgi.6.2021.08.23.06.12.29\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 23 Aug 2021 06:12:31 -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=\"kefk4LrC\"; 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=GYzZ2zP74d2r6LbhP3aN/mamEvSqtVsaUW9i4hQJyoA=;\n\tb=kefk4LrCpfNc1hCtJZEAyMR5T3P7ytTXFcoZ6wTRGcNy/OoYDGCwV3pbnBlh+tFwSv\n\t/Ab2OcS/A+f1ma67wgwrUfVVx5Umm7kcQIVmZc931vyuUv5JMZpeAcDW0AckHa/DRWqB\n\tOa//5lSiXRI92BMOdWFEHe7mw/PIdGPg8GNhY=","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=GYzZ2zP74d2r6LbhP3aN/mamEvSqtVsaUW9i4hQJyoA=;\n\tb=TYPkA+OssfkOrLTyt7m+VMJ6/OF+pd6EXtcFR8Uc2b0kk6aG9327fmy3T1ZhwQu0L+\n\tEBy7mSH6/ZXzVqiM8EI/yFJ6EmG/3Bby0YLBnqdWdzevPJ/Oo9zq2KC/RkbmV6A/TAqr\n\t1EXLJyzOvJkePHyvdCEOgSrZhrkcCdXZ1hJgB9Pfs0Ero7jORHDccUhj8h4ZO+QlX+lQ\n\t4TWK+j8h7dVlfAFRKqOT/AtcwBIBnfMcK0IwlMkM3ZFXFp0L1G8Q7OjJCxY2NecfeeCB\n\tJqV7M2Qz1JJPkUq9irlK5a6HI8ozMJ85jBi9dIfUcdqaH/6j4IwreKnLgLb4dANcu2Cz\n\tYa0g==","X-Gm-Message-State":"AOAM5302WZys6o58fdBOVt50rXM8gCW7bfNS2D2hzcy9zAcP6I7Dd7+D\n\tOWg5cEIlHR1rvM6eBbTWDhwUWSbcK6F3HA==","X-Google-Smtp-Source":"ABdhPJw0182j4C5rOIlWb1Xi3LsN5+BvDzRH+jSdamBzra0gx/uGAjJsR71BmhxUFNMFZxteuHl4tQ==","X-Received":"by 2002:a17:90a:d590:: with SMTP id\n\tv16mr19912342pju.205.1629724351859; \n\tMon, 23 Aug 2021 06:12:31 -0700 (PDT)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 23 Aug 2021 22:12:11 +0900","Message-Id":"<20210823131221.1034059-1-hiroh@chromium.org>","X-Mailer":"git-send-email 2.33.0.rc2.250.ged5fa647cd-goog","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC PATCH v2 00/10] Add offset to\n\tFrameBuffer::Plane","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":"Since FrameBuffer::Plane doesn't have an offset variable, it is\nimpossible to map the FrameBuffer::Plane correctly. This series fixes\nthe issue by adding an offset and aligns some code of mapping and\ncreating FrameBuffer::Plane with the new offset.\n\nOne of the pateches fixes V4L2Device to make a returned FrameBuffer\ncolor format planes from v4l2 format planes. However, V4L2 API doesn't\nprovide a way of getting a dmabuf plane offset, so a multi planar\nformat e.g. V4L2_PIX_FMT_NV12M is not supported with this patch series.\n\nThis series must be applied on top of the pacth series whose id is 2384.\ncf.) https://patchwork.libcamera.org/project/libcamera/list/?series=2384\n\nChange in v2:\n- adress review comments to v1\n\n\nHirokazu Honda (10):\n  libcamera: framebuffer: Add offset to FrameBuffer::Plane\n  libcamera: ipa_data_serializer: Modify (de)serialization for offset\n  libcamera: mapped_framebuffer: Return plane begin address by\n    MappedBuffer::maps()\n  cam: file_sink: Use offset in mapping FrameBuffer\n  ipa: rkisp1: Use offset in mapping IPABuffer\n  qcam: main_window: Use offset mapping FrameBuffer\n  gstreamer: gstlibcameraallocator: Use offset in creating a buffer\n  libcamera: v4l2_videodevice: Create color-format planes in\n    createBuffer()\n  android: camera_device: Fill offset and right length in\n    CreateFrameBuffer()\n  libcamera: framebuffer: Add assertion to detect offset is unfilled\n\n include/libcamera/framebuffer.h               |  12 +-\n .../libcamera/internal/mapped_framebuffer.h   |   5 +-\n include/libcamera/internal/v4l2_videodevice.h |   9 +-\n src/android/camera_device.cpp                 |  47 +++---\n src/android/camera_device.h                   |   6 +-\n src/android/mm/generic_camera_buffer.cpp      |   2 -\n src/cam/file_sink.cpp                         |  22 ++-\n src/cam/file_sink.h                           |   1 +\n src/gstreamer/gstlibcameraallocator.cpp       |   4 +-\n src/ipa/rkisp1/rkisp1.cpp                     |  31 ++--\n src/libcamera/framebuffer.cpp                 |  31 ++--\n src/libcamera/ipa_data_serializer.cpp         |   5 +-\n src/libcamera/mapped_framebuffer.cpp          |  76 +++++++--\n src/libcamera/v4l2_videodevice.cpp            | 147 ++++++++++++++----\n src/qcam/main_window.cpp                      |  16 +-\n src/qcam/main_window.h                        |   1 +\n test/v4l2_videodevice/buffer_cache.cpp        |   6 +-\n 17 files changed, 309 insertions(+), 112 deletions(-)\n\n--\n2.33.0.rc2.250.ged5fa647cd-goog"}