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 6F7E84A17D for ; Sat, 22 Jun 2024 19:59:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2F24068D4ED; Sat, 22 Jun 2024 22:59:40 +0300 (EEST) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4E6FE68CE20 for ; Sat, 22 Jun 2024 22:59:34 +0300 (EEST) Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-652fd0bb5e6so2320883a12.0 for ; Sat, 22 Jun 2024 12:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719086372; x=1719691172; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=865qcTpn/HgRAp3OyxzlRmujB8hFp93eivQH9eAjQx4=; b=mwqmur3G5dmUo3J6vceqBYdcnDylpobEx/piZxXu0ygROsXR0YOqKq/G6Y4Np+UAN0 1VvY/YHyCMx+wM0fHQBADPBTE1DaVKPsXB4T4iWLjNXfGr7y6lk+SPL5JKa4f2EKSR+O P1lQ5TXHVOLAPLy+3aVoxVduJeinM+oJ8QXAIlEKSxg+Hkj7kXyRzfUnvgdrnaHPkK42 gLRJ3tK1+zkSMfqY3e9Rw098pUYCCfhijrZMTznN4qwpPkWbMvPUvn/f3+mdisMrV8eZ 3TZEkbJANTl9iZjnc5hDTRkvve04B2/j/06CBTTkLPBl6bz51D2MSVjSQ29MOIoCei+V r8Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719086372; x=1719691172; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=865qcTpn/HgRAp3OyxzlRmujB8hFp93eivQH9eAjQx4=; b=K7xMLlQBx6Fv/Pb2Ew4pySHqwi5rVdqb6ktdvqiVb9M/nnE8hxnIe6TPioCEUzUL17 NZBKnVt+HIUikmQLDOMFnQ4zBFEtJUXNIvuE0NfJBgz2lA8KaWpBAW4pR3nHD5xTfCOA cnO3EJIz4rIJgB6lC2eFF/v3RtJo6xJkXkT6NhDg7qFAFyhAEF5lsXRpyF1B3fG3TJpf cRdRjMEb4E6ZLG28fyvrshpm4SHG1nSxZ+YxnJGQXJ7lALvSKyWTA2WzCATbE5zUSkfW uQ93ytC4Kurx/VSB4W2LoN7KIIw4qIIZKlgDRSmtlGf+s6n3v7K9QkehaIc6D0fPafSX q8JQ== X-Gm-Message-State: AOJu0YzHBbSrGORE/I44JVt8IwQi7TWF1B7WkF8Ue1bGYoV2654rKyPY RbJ/IQ4rXG4CFfq6RCxzrKLrCNqw6oQy76TaF1skr4bIMkAQwOFRjpF2dw== X-Google-Smtp-Source: AGHT+IG9/exb6fJBSZfKOKmMgcG4GAvtAIp0jbihaRsP8etJsEx/MS69wsVB7rkbpxSQAj2LbQPnFg== X-Received: by 2002:a17:902:ec8e:b0:1f7:3d0d:4d0 with SMTP id d9443c01a7336-1fa23cd7cf4mr9281965ad.25.1719086371588; Sat, 22 Jun 2024 12:59:31 -0700 (PDT) Received: from [192.168.0.16] ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbb2b06sm34464085ad.262.2024.06.22.12.59.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 22 Jun 2024 12:59:31 -0700 (PDT) Message-ID: <9e1e83d1-6091-4bac-9c06-a313b605e6c6@gmail.com> Date: Sat, 22 Jun 2024 16:59:42 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: James Almer To: ffmpeg-devel@ffmpeg.org References: <20240622153122.6220-1-jamrial@gmail.com> <20240622153122.6220-2-jamrial@gmail.com> Content-Language: en-US In-Reply-To: <20240622153122.6220-2-jamrial@gmail.com> Subject: Re: [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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 6/22/2024 12:31 PM, James Almer wrote: > 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. And this is also not ok given that type == AV_STEREO3D_FRAMESEQUENCE can (and should) go alongside view == AV_STEREO3D_VIEW_{LEFT,RIGHT}. Plus the fact AVStereo3DView has been around for a while, so the inconsistencies (like type 2D and view packed being default) are not new... I'll look at this a bit more and send a new set. > > 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; > _______________________________________________ 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".