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 6EF9448C85 for ; Sat, 22 Jun 2024 15:31:51 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0732268D5E8; Sat, 22 Jun 2024 18:31:43 +0300 (EEST) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1922B68D58F for ; Sat, 22 Jun 2024 18:31:34 +0300 (EEST) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-70666aceb5bso508874b3a.1 for ; Sat, 22 Jun 2024 08:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719070291; x=1719675091; 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=MPT8n3A5PxLRxV6XWPhMF95hXHDwX7JhnTMf6wTtJs2/1kl4Hzknxshv26/iZmfOPX F0AoM6KHGMLhzXStncXeZRzI6sICftIbwxjOMvZml/+PArtq1ayZhzs7JmDc+4UdfNLv a2C32toS0q1Ehzi740IhgV6YvqvCzFhXp5H8bi7uHevgRI9Qhj7OABiX7oqofOX4HPZ5 lMC4euA6E1kEIM9vSWPtjtK9vMOOGUX0Q2P7XPiSY0wogEjEgj2Ivo8YD4+NBNxG06nl hF0Y5JuwFENMqIcIVROau4TiN9cOe3AKb41AlQE3BfuyENRXNDdQDNtxy1sFJPWxND5w GPEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719070291; x=1719675091; 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=qfoqoAKaBJmps/SYRI264MMf8E5nYT1UVmEx2mPD56M20zthigRnPZhNkPEzi34fLx 79HE0mxGRatl+OZPPhafxoJdEIyj74TyMB0l4yVO037PplH8Gn2ttIBegku4gvcZifIP 9KwIezmxSunBWaaGIMWDWU70xcE3YbPWJRsPMc3nPjKWgctv100Pm8gZDZyAgRls4fiN LIF4qlYoKKBVmXp77Ror4D6F1xGgdIyIUCmHGgIn9iDHSxbpQhbnTuh5Mh7lnEUxquKD 1Oh00YEnb2w9lOulBGgkYQIHKBlIAJS97xTAytIHV/wukaNMNdfFaT2kgT0DuDkSYQje QNQg== X-Gm-Message-State: AOJu0YzGg8hyy89+ORHZuHVm+pUEGBvWC1LVO8yQNO8seb5BtKI45Tfn Y6z9+m0pZh/UWE+3gx27qQr3oh1xESTmbTXNfTVmwY4x0Sp7UV8vIRFLMw== X-Google-Smtp-Source: AGHT+IGMuQrhYduljlvp7hDU9A9cWuYIO/PAZHoinbY24sN2hwR6lWfBSnPNHvmU7AmblmxVKR4B4Q== X-Received: by 2002:a05:6a20:aea8:b0:1b6:bb61:3782 with SMTP id adf61e73a8af0-1bcf7fd13admr109591637.39.1719070291248; Sat, 22 Jun 2024 08:31:31 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7066ac98fc9sm1164709b3a.193.2024.06.22.08.31.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 08:31:29 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sat, 22 Jun 2024 12:31:16 -0300 Message-ID: <20240622153122.6220-2-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240622153122.6220-1-jamrial@gmail.com> References: <20240622153122.6220-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/8 v2] 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".