From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 9B40548313 for ; Sat, 22 Jun 2024 02:41:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8F20268D722; Sat, 22 Jun 2024 05:41:30 +0300 (EEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3CA4568D667 for ; Sat, 22 Jun 2024 05:41:24 +0300 (EEST) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1f4a0050b9aso21524875ad.2 for ; Fri, 21 Jun 2024 19:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719024081; x=1719628881; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=V0SJv85We04NYVNfOvzvGaNuzHxlQI0Hgs9vKOXGeiQ=; b=Fk5mTBarR+2YFrZRztQ1OPsnjcz3uK6RNsNbi8U0ncvhPSUttMdeIJofGjM6SueGuP DrBMiUbvAxxbOAXzRVVIc9DSmOj4bWY/5sWl3Aw8RXjFts3GxA667knTpEcgFMAPrrB4 ieLKG298DQg3dNQSPAI9wXkY6CclG1JnY+luhBNkpHcoyqy5vqNTbHAOTKVEamd03PnM fJLOrQ0++7zPzhHi+dMxTIHWZzPFs+Knlt18UFd5T427HX1Le5V4XSJMPwMF8/DtmaX/ s02T6hJbliaQ9/PR2bAZnmasp+4FQm0nqO69e1LhHZn+GmzP/VJs4GYY8p3pdQff68iy uXJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719024081; x=1719628881; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V0SJv85We04NYVNfOvzvGaNuzHxlQI0Hgs9vKOXGeiQ=; b=HLXl8q9QarQHdgPFu4KUic21CCHv/4Qi34XZx9GmyokD24DfXH73n3nmqNMmtlhH8w 42RbF3jIlBobk7BkrmOFwDSOAHa7QjFgbEi+w/Jmx8nZ3CffB6+dpdMKcR2xvjqCtDZl yF0HF7C80MjWeBRfptdjZAclNvWnMt6/WwbJEKk8VjQpL59wxY+RveK+B8KEfxaqRXyE YvUba9v5DHhMOZyrjeBf6OqCSP41xRHB2ibvVO+e//r/S/FI+15Vm9kkn+FJ6iXD2NEx jc6vOehuOjMyOtanwl5L2VTwNs7UkHBIjQK5iGdgkawRmD9veZNwnswPdgb8enyB3YpK Bv+w== X-Gm-Message-State: AOJu0YwGBoCvxNqraVOew1n3Qcjo2G3Tr9Uj0p92G34AVKKOjFak/usN Tf6tnTgj9Nsv4jRwO8Vr/ovSj3BtilJhZyaz/m3FKbvIrNyIbAmkuBxvEQ== X-Google-Smtp-Source: AGHT+IHwCJlKeo9dHy1qMlsXaiP6X04+mSqWUotUyKXq/ONU7sfzxrkNbvJyFFXAVeVk7fqUlAEaKQ== X-Received: by 2002:a17:903:1112:b0:1f7:4021:50a4 with SMTP id d9443c01a7336-1f9aa45a79dmr114803345ad.43.1719024081026; Fri, 21 Jun 2024 19:41:21 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbc3185sm20920285ad.289.2024.06.21.19.41.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jun 2024 19:41:20 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Jun 2024 23:41:11 -0300 Message-ID: <20240622024111.6598-1-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240622012531.5523-1-jamrial@gmail.com> References: <20240622012531.5523-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] avutil/stereo3d: add a Stereo3D type to signal that the packing is defined by the view field 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Given that a video stream/frame may have only one view coded, or both packed in an undefined way, and as the values of AVStereo3DView and AVStereo3DType may clash (namely if type is AV_STEREO3D_2D, then AV_STEREO3D_VIEW_PACKED would be invalid, and if it's anything other than it, then only AV_STEREO3D_VIEW_PACKED would be valid), this commit adds a new type value AV_STEREO3D_VIEW that signals the user that AVStereo3D.view contains information about the nature of the stream, with the added constrain that AVStereo3D.view should be ignored if AVStereo3D.type is anything other than AV_STEREO3D_VIEW. Signed-off-by: James Almer --- This is the only way i could think of to work around the fact AVStereo3DType and AVStereo3DView just can't work well together if we want to keep AVStereo backwards compatible. libavutil/stereo3d.c | 1 + libavutil/stereo3d.h | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libavutil/stereo3d.c b/libavutil/stereo3d.c index 0c0cad127c..e8e5030db9 100644 --- a/libavutil/stereo3d.c +++ b/libavutil/stereo3d.c @@ -65,6 +65,7 @@ static const char * const stereo3d_type_names[] = { [AV_STEREO3D_SIDEBYSIDE_QUINCUNX] = "side by side (quincunx subsampling)", [AV_STEREO3D_LINES] = "interleaved lines", [AV_STEREO3D_COLUMNS] = "interleaved columns", + [AV_STEREO3D_VIEW] = "view defined", }; static const char * const stereo3d_view_names[] = { diff --git a/libavutil/stereo3d.h b/libavutil/stereo3d.h index 77340f72b2..e3af519e03 100644 --- a/libavutil/stereo3d.h +++ b/libavutil/stereo3d.h @@ -136,6 +136,14 @@ enum AVStereo3DType { * @endcode */ AV_STEREO3D_COLUMNS, + + /** + * Video may be monoscopic, or stereoscopic where either the + * packing is unknown or only one view is present. + * + * @see AVStereo3DView + */ + AV_STEREO3D_VIEW, }; /** @@ -207,7 +215,8 @@ typedef struct AVStereo3D { int flags; /** - * Determines which views are packed. + * Determines which views are packed. This field should be ignored when + * @ref type is set to anything other than AV_STEREO3D_VIEW. */ enum AVStereo3DView view; -- 2.45.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".