Cover Letter Detail
Show a cover letter.
GET /api/covers/19006/?format=api
{ "id": 19006, "url": "https://patchwork.libcamera.org/api/covers/19006/?format=api", "web_url": "https://patchwork.libcamera.org/cover/19006/", "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": "<20230915-libyuv-convert-v1-0-1e5bcf68adac@baylibre.com>", "date": "2023-09-15T07:57:24", "name": "[libcamera-devel,RFC,0/7] android: add YUYV->NV12 conversion via libyuv", "submitter": { "id": 153, "url": "https://patchwork.libcamera.org/api/people/153/?format=api", "name": "Mattijs Korpershoek", "email": "mkorpershoek@baylibre.com" }, "mbox": "https://patchwork.libcamera.org/cover/19006/mbox/", "series": [ { "id": 4023, "url": "https://patchwork.libcamera.org/api/series/4023/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4023", "date": "2023-09-15T07:57:24", "name": "android: add YUYV->NV12 conversion via libyuv", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4023/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/covers/19006/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 689B7BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Sep 2023 07:57:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D887462916;\n\tFri, 15 Sep 2023 09:57:30 +0200 (CEST)", "from mail-wr1-x430.google.com (mail-wr1-x430.google.com\n\t[IPv6:2a00:1450:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8519A628D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Sep 2023 09:57:28 +0200 (CEST)", "by mail-wr1-x430.google.com with SMTP id\n\tffacd0b85a97d-307d20548adso1730976f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Sep 2023 00:57:28 -0700 (PDT)", "from [192.168.1.20] ([2a01:cb19:8704:be00:4f55:bd9d:611a:6c8e])\n\tby smtp.gmail.com with ESMTPSA id\n\tm2-20020a056000174200b0031fe9a47a87sm2506942wrf.112.2023.09.15.00.57.26\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 15 Sep 2023 00:57:27 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1694764650;\n\tbh=3SdiyO1pw58kqEjFRk+FHmHH3cxV+dL3L5UsMOla668=;\n\th=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=DzWo8kq5BusJMqXVfGSWCx1oxvICyxUKv46zMF2N183ag2Z71dK7tihi6/ju0EYdu\n\tt2iivcjlsmxz17V5aNxzvizwrXHWL0MqyvjX1ui8dmRY9jPbWf33KEs1bC5r/uWL0k\n\toTbRtfFapKaddJHuEbxGk/zpPtS2dGPRhLgnifCRGr5F+ieJay/nKx5iuJOBz0NggE\n\tjTdOLlon1d3+VUzmC9BfSbyjTkr5F+OlEEg0V13m+PNW+FLLI80sELiKwvaYhE1z7F\n\tYmxjucFGyW3eXI+IHGN+GKwMaSlhj3Ihb6xq6JYp5PpiWww2MYXXDtSku9651XH9Jz\n\td9YIQEeQ5GmiQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1694764648;\n\tx=1695369448; darn=lists.libcamera.org; \n\th=cc:to:content-transfer-encoding:mime-version:message-id:date\n\t:subject:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=JAs6y7nr8Bf0vaOzekou9Pww6kWBxfb8lW+XzGjSqvc=;\n\tb=JJ6FlN6lsf7l1l5PpADww934At38zpVw7jEBa/foJgs8jLyfFkYnnA9F7z5kMiJFiG\n\tp2oRlTnl0AwJSPQFpZOh4GW9Tpe+bdpoHXN9FH+u5hp492BG8En4nkM1vfmF8s6DbE88\n\tQ/GVbEwE2CTWX6NiPkNBPeSoEBE1kQF6KJSav9K/LYIdcSqS31tLltt6+VbgHIub5ip0\n\trUuqbL3UWTt4n0Ymp9LMn+NEq25uRfWoZSrxmHoB7TFYzD0TQwTvnPcuY1ibwukMGRMG\n\tecuNJXvWt+EvL2/aNltq7XgfJ/HMNnRzwmCMGO7D5Cos702sTUOuPU3NiRWuku4mlNK9\n\tTgHA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=baylibre-com.20230601.gappssmtp.com\n\theader.i=@baylibre-com.20230601.gappssmtp.com header.b=\"JJ6FlN6l\"; \n\tdkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1694764648; x=1695369448;\n\th=cc:to:content-transfer-encoding:mime-version:message-id:date\n\t:subject:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=JAs6y7nr8Bf0vaOzekou9Pww6kWBxfb8lW+XzGjSqvc=;\n\tb=dQuo3CxltLn5IkuHOhR4tZXrNnm74n0C2ui1yf3u0zrjXXHyxKkiFs+Ghi1ON1Q4OD\n\tOW4J234oFLiCdzjB9WlaTzDa2cFKVvgvbylUcYOH0uxv5ViW85Pp9o6VlacslZQX2PVV\n\t9raKoorILnZuCammeBCHzjd0RyzsUBVt58gKfMyaMM+FHVk4aFpp4Dxxx0JWelZYx4a2\n\t3o/xUC8EQVTmOxbhFg1cUETf2+GShks9F9fg1/XfJcw400J7nDGAmKfqNrjaf1ybHVbF\n\tffWfn+6lMowzhCPoDexsLV/7MUDBl4Kaev2Zyq4d5jE/Ki2NIanPTssTX6c4l69iju01\n\tfhxA==", "X-Gm-Message-State": "AOJu0Yxt2U12PY2dHR0LRJm6qbt6MYCjgFPurFZ5KRJmHvDHZzUn3CT0\n\tVyH1rH77koiWJU5QgrsuEYIfgA==", "X-Google-Smtp-Source": "AGHT+IF5bdVg7Oru8qo/5niLxqtpKvxdyoKR++iWqoNVCCtFXKtdGNvIEdLVJN1jVhk7bxe51pPH8g==", "X-Received": "by 2002:adf:ef0e:0:b0:31d:d58c:9432 with SMTP id\n\te14-20020adfef0e000000b0031dd58c9432mr737083wro.3.1694764647499; \n\tFri, 15 Sep 2023 00:57:27 -0700 (PDT)", "Date": "Fri, 15 Sep 2023 09:57:24 +0200", "Message-Id": "<20230915-libyuv-convert-v1-0-1e5bcf68adac@baylibre.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "X-B4-Tracking": "v=1; b=H4sIAGQOBGUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE\n\tvPSU3UzU4B8JSMDI2MDS0MT3ZzMpMrSMt3k/Lyy1KIS3bTUZHMDCyNjE+NUEyWgpoKi1LTMCrC\n\tB0UpBbs5KsbW1AE1L5PxlAAAA", "To": "libcamera-devel@lists.libcamera.org", "X-Mailer": "b4 0.12.4-dev-6aa5d", "Subject": "[libcamera-devel] [PATCH RFC 0/7] android: add YUYV->NV12\n\tconversion via libyuv", "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>", "From": "Mattijs Korpershoek via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Mattijs Korpershoek <mkorpershoek@baylibre.com>", "Cc": "Guillaume La Roque <glaroque@baylibre.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "On some platforms, it's possible that the gralloc implementation\nand the CSI receiver cannot agree on a pixel format.\nWhen that happens, there is usually a m2m converter in the pipeline\nwhich handles pixel format conversion.\n\nOn platforms without pixel format converters, such as the AM62x,\nwe need to do software conversion.\n\nThe AM62x platform:\n* uses a CSI receiver (j721e-csi2rx), that only supports\n packed YUV422 formats such as YUYV, YVYU, UYVY and VYUY.\n* Has a gralloc implementation that only supports of semi-planar\n YUV420 formats such as NV12.\n\nThis series add support for software conversion using libyuv.\nRight now, only YUYV->NV12 is supported.\n\nThis has been send as an RFC because:\n\n1. I don't have much media knowledge, nor C++ knowledge so this is\n probably not good enough for libcamera's high quality codebase.\n\n2. I'm not sure that transforming the \"main Type::Direct\" stream into\n an Internal stream has no side effects.\n\n3. I'm unsure what to do with the gralloc size in case of conversion.\n Right now, we always allocate HAL_PIXEL_FORMAT_YCBCR_420_888 in\n CameraStream::getBuffer(). This should be adapted both on:\n - the gralloc capabilities of the platform\n - the conversion (if any)\n\nThis has been tested on a AM62x SK EVM board with an Alinx\nAN5641 (ov5640) sensor. In Android 13.\nIt might work on BeaglePlay with the same sensor, but I have not\ntested that.\n\nBoth preview and still capture are functional with the\ndefault com.android.camera2 app.\nNote that video recording is not supported, because that would require\na similar conversion from YUYV->MJPEG which I did not investigate yet.\n\nI would appreciate some feedback. Thanks a lot in advance if you\nhave a look!\n\nDepends on:\n- https://patchwork.libcamera.org/cover/18995/\n\nSigned-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>\n---\nMattijs Korpershoek (7):\n android: yuv: separate source destination in length check\n android: yuv: loop over each plane for size check\n android: yuv: prepare support for other pixel formats\n android: camera_device: support when no Direct stream is found\n android: camera_stream: add add explicit input configuration\n android: yuv: add YUYV -> NV12 conversion\n WIP: android: add YUYV->NV12 format conversion via libyuv\n\n src/android/camera_capabilities.cpp | 90 ++++++++++++++++++-\n src/android/camera_capabilities.h | 4 +\n src/android/camera_device.cpp | 9 +-\n src/android/camera_stream.cpp | 57 +++++++++++-\n src/android/camera_stream.h | 5 ++\n src/android/yuv/post_processor_yuv.cpp | 156 ++++++++++++++++++++++-----------\n src/android/yuv/post_processor_yuv.h | 12 ++-\n 7 files changed, 270 insertions(+), 63 deletions(-)\n---\nbase-commit: 58e501c71c47e57f02afde1bd296a037038cd6d5\nchange-id: 20230914-libyuv-convert-fec7082343e4\n\nCheers," }