From patchwork Wed Jun 26 11:19:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramiro Polla X-Patchwork-Id: 50156 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:ccd2:0:b0:482:c625:d099 with SMTP id q18csp363689vqv; Wed, 26 Jun 2024 04:27:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwxxfK5SRuwFSFcEiJ0LHYeZXJFerBg1hBT/KpPTGPmyncEvmnSmHDdeAfE/U0/xQeAXvdry5GNjSq4DTJL4HsNWcYHXbyYXsCow== X-Google-Smtp-Source: AGHT+IEL49NQ06tDh4spcK0JbYeWExMJrWsMuJS7bIRv48TpmBWiqnWXlwjK+ZW9GDyTmRfz8Tlx X-Received: by 2002:a17:906:4ec3:b0:a6f:4804:d41a with SMTP id a640c23a62f3a-a7245c80ab8mr722491866b.55.1719401269554; Wed, 26 Jun 2024 04:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719401269; cv=none; d=google.com; s=arc-20160816; b=yzxqHyLCJGx/L320ypYLBpHmwzNy4arOfIIeg2GACjaSnA9WnA29jRki96SI+AwxSO d803G8mHtc5VqqxE/JKCu9oZq+jYBBLiul/fXnRegq5EXBPFOVuQBeJZcD42SQsCfIa3 jziHHTPqL1hXLs1XxC4lFSlUlBsPvxuG2RocahEJomvfvjxd2QY9p7JUOggBUPILdR6V 1Mce1oz4jTNLlhiArU1pgamtwN/rZ0NbQ6O0mggJR76Ex85E3yWgJq1LG5vmbpzseYSb eVL9GwXgu0iV+vU7dJFHPfFT+n40Tb+XdLq81Rz/uZ+2JlneOTJXNqv/yDFcne90FaxA c/Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=9Xxx5Dv7FthdrFcf+jp6XM05VOLFPskxyWkKVulwOCs=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=ZM/CIGSy76B8QtoJRdZIwvCBnGWetK3nuF+loKeD+/yCz+kb4kRKltBmUJm9lTCpAl IdZcslwBv3eItZP2pbovfcL+AHllFadkmR4ohtbYcsgNyn8TQLLpIiRbYw5g+dCyxx51 /wfH9jrwSxO+rhpjrGcKFyuY42yo3leODX1omuzZdxYnlQXSaUYp7WcWDULkMDRuW+aA GwH4Gqs9BSBbHcRBOfNlUO6ECglFfHAolqPEwlwFAElvFeDsvkZ9vUUrCHRkCM+wRSok oNiHISHH2CDml0w4wbhW49beTYUdAC1ryzYY+o9Ml3hUaUEoub3vafVoiT4tfsYYz3BZ L2Ew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=jgXHmRso; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a7246fa0f77si375454066b.146.2024.06.26.04.27.48; Wed, 26 Jun 2024 04:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=jgXHmRso; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3DAA868D3FA; Wed, 26 Jun 2024 14:19:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 715A168D26B for ; Wed, 26 Jun 2024 14:19:31 +0300 (EEST) Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a724598cfe3so523474566b.1 for ; Wed, 26 Jun 2024 04:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719400770; x=1720005570; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=z0JHrsBOlCi72gE0P1VVgj5Z3dXemeuyfUgs/7Eqh4E=; b=jgXHmRsoOInody/5zWxfkSIr/U1N4tIA6+ELFNasvYmzNxOif4E0TcC0V6dwJxZsS3 1xTPuY/tDROXsOhJO1iW9Ml3uT1Ad+ID8h6l4ip2CZnJuE5YACSa3cjUm55cHeIi2dVm ybNcDgkeAVbuvKladtwy1rZOWLnRxO2d0Fjyq0164moiKctwpPWCKJkQO5y7goo56R6j osS+pYUcXTH7fJ3JUY8CwNveP0QRPlej7H77ln7VleKEhl7No9sF86czGHtKnos9zBA/ hsG7UOk81NY6+5Df9sXlshYd44ZAStSkUtQUqaMIcZ8b4p/O0YddAp5+TSj8i99MxQPY AtAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719400770; x=1720005570; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=z0JHrsBOlCi72gE0P1VVgj5Z3dXemeuyfUgs/7Eqh4E=; b=T48bCaeEgKa+8eSk3y0OlfMeePmWnyWbalfRxiwpa21ZtNZoth1PNyQPMo5j1DvMvl daZiC5mbNgOxafPMc/8+Zp+g4NFHBjL6ew2CeVl3e/Rm0bwqdU2P5URfaEO4xbukqZ9U J+xpgtUB3wkdbVjvr/1YU0o4UcCPgYSoeAK99T+5JesW8eFjLz535EGWpVVIp+nLTXG9 vx90xWStdxFnqPuZ9VWUD2K0lm2ve45WfUCoLoOrGfXOsH1lNeqWpPat9Msij9HZtJ+U pzUan5gvUdycdlvdfKu/gU+2nD1UOWAd8W9BIlNcDJr+nv1FTmZ+6k7H1GyHUOeHd6p0 Q/Vw== X-Gm-Message-State: AOJu0Yzs7BafjxvsrY1TotBKh7+fnn+Ev+SU+ha2eCn9dkCiRkWhUE8u Y3qbZecaHRVZsINHuxxNmC/ybIx5qUSau8YoH3wW4b4fFsTfmL6ZXSVclw== X-Received: by 2002:a17:906:9c85:b0:a72:8eb1:874a with SMTP id a640c23a62f3a-a728eb18931mr129152066b.22.1719400749705; Wed, 26 Jun 2024 04:19:09 -0700 (PDT) Received: from diode.lghs.lan (108.133-178-91.adsl-dyn.isp.belgacom.be. [91.178.133.108]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6fcf56ef19sm603714166b.210.2024.06.26.04.19.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 04:19:09 -0700 (PDT) From: Ramiro Polla To: ffmpeg-devel@ffmpeg.org Date: Wed, 26 Jun 2024 13:19:06 +0200 Message-Id: <20240626111906.255191-1-ramiro.polla@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2] avdevice/v4l2: add NV16 and NV24 pixel formats X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: gZgKV9/a5jqu --- libavdevice/v4l2-common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavdevice/v4l2-common.c b/libavdevice/v4l2-common.c index b5b4448a31..ebfd2b6d8d 100644 --- a/libavdevice/v4l2-common.c +++ b/libavdevice/v4l2-common.c @@ -50,6 +50,12 @@ const struct fmt_map ff_fmt_conversion_table[] = { { AV_PIX_FMT_GRAY16LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_Z16 }, #endif { AV_PIX_FMT_NV12, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 }, +#ifdef V4L2_PIX_FMT_NV16 + { AV_PIX_FMT_NV16, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV16 }, +#endif +#ifdef V4L2_PIX_FMT_NV24 + { AV_PIX_FMT_NV24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV24 }, +#endif { AV_PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG }, { AV_PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG }, #ifdef V4L2_PIX_FMT_H264