From patchwork Sat Jun 22 15:31:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50076 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:ae71:0:b0:482:c625:d099 with SMTP id w17csp1128638vqz; Sat, 22 Jun 2024 08:31:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWs0EeqbqOkRkfYRaFawustXWKsDXa8IYJGIpwNDZCB2TjDt1vrk1YY4x0wqGKIBjFbi2dE2JVlZ8V9I7/jGN0iIrih8XG7meybzQ== X-Google-Smtp-Source: AGHT+IFmz1h1RQ27t9INoInLgsHYOcMM+RKNdnDjng3tLkyqJwYqPZocGgFoyoKpZgZKJpBrb++z X-Received: by 2002:a50:d552:0:b0:57d:4d2:83fa with SMTP id 4fb4d7f45d1cf-57d4bd53811mr252870a12.9.1719070304009; Sat, 22 Jun 2024 08:31:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719070303; cv=none; d=google.com; s=arc-20160816; b=Tx1u39FbZqyWG5crg7C2D000cZidUxSWefELuLjCqWE0emxELGwOMmN1EFFHztIRLG h+A+A9kjbxdf+JW4/5+yALyVL3p05WCoURcezhgt20JXvuWfr+Lp2qMjuNuVWfZDQVUW I3u++DuLryiPu6B3krgFmGFKraZOrumLYgeS2z11uXtbRhdyRLBLk4+RTKCmprQpGKq1 ZhIVQsdQsXlqZKT8tK3NaYqtbIm9be5g8QfqpPX9JiHbJZbYoqPuG2yMuKUlbGUc3ADT enEdnMqKLOZa9zd/z/mqZqf/oeYh7DMYB0WMh3G5KO2A7lc+N11ycJow2kijp3jo9OLF 46UQ== 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=CEthkLACo+eF3l3na1oSoBrDJu4wVlZo28YoZ/MDUKw=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=F5hwUL7FrixR6EmgzjltT2ZHpxz+5OyMCgq0j+T7B5aztNYKtSaUhF7JkHZ+gLtZ8A BTKZQTpCH+QhCGfOZsNnSEvZH7P3qBtKx6zz8RMGNulcnDQEDwrPj6XejsOHlanRjXhx PjqJ/Zx0eJ+yuNlF5nFiP1q39a+lk7OP2k4qORDleFU1xnDfi5gwIi+IOe0DcLeRaxaG gRAvQLxpK41pwJZgPYH/7zYc1FY5V1jpXWhKaPnrqvBp4+tva4+xvXl9zr2kKxA0Zya5 mn+BD048xcnjWxYxprE+/olqV+JHXKrc0wAQkfjyFbbG95EQJ8lqKUI65Qb94QOQaSoz XYgA==; 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=XiYbU7eF; 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 4fb4d7f45d1cf-57d306b6844si1844303a12.341.2024.06.22.08.31.43; Sat, 22 Jun 2024 08:31:43 -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=XiYbU7eF; 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 4D41468CE05; Sat, 22 Jun 2024 18:31:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B790368CE05 for ; Sat, 22 Jun 2024 18:31:32 +0300 (EEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-70436048c25so2775486b3a.0 for ; Sat, 22 Jun 2024 08:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719070289; x=1719675089; 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=DFM9oymuwxeddWUAQDTqjBGjjo/+oHy445a4in6g7oE=; b=XiYbU7eFJhhfpLDapYjgRMHUes94+hxt8OKP914w22Ytwt8qwddVjlOFk49GSf9VS2 q2CBnidkyRuizH6XV2RRv/fxTPbSYucyf+2O/AjXnVllh9dMjphLQhCPnWieFt7aQwLD GudKG0XNCqGRCoEmSBwQZbbPoQ0Si00T7QAz3iSX8CdX3TYjUv+nufVATrtg1kt1rkWF cbYVm+31kDGvwAqPlMhyrXJb9IsgGLaVXsvZn6s98LuDrutaTiRflWHK/71L7emDlVYa gqD4URWaR+v5zLBCgN5KSPOG0fDvQtT4r0XysTLKEt3jrABRPXtSmBD1I4HIivIIMaR7 t0fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719070289; x=1719675089; 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=DFM9oymuwxeddWUAQDTqjBGjjo/+oHy445a4in6g7oE=; b=W0mMFXdyJ7TPYK6qIX4vNuY0fYoJN0W4M8N/i6CEBfgtfbi7jJbs+RlBOXI/Rr/MC7 jd/gYJzr+dTwknF/HjVrdW7BvwnwZN8Ad42cYKC68Mnujv1bt5R5pjaejwxDktFTsM+n 3P13dAu87RT0O0lG+SK2ruEFTzBRfv9GgH80bmBxtsr5ExaLnqrfPIh/T2mPr0FNd1dV +h2TPbyyIMWb8ytPKDMPlXhPvHZynJOriurgW/gSZCqmWtNmtk4oRN+cR+M03oYe5fVU L/TMt93cqpD7sBZZB1JZ/GltwxRmIkRp0vMJ3SUsWTLTls9O2vLhBseB5M4CguwdDQzs yKqg== X-Gm-Message-State: AOJu0YymqYx0/Uf0dyT6wClO68w9TwMSTlXRImx/di3fN167yP9QeNDQ MreoGMgT3AiR5ysZfGDYBqcXlvKHQXRH6aVtE+euoh5LtyoHryosjJxedA== X-Received: by 2002:a05:6a21:99aa:b0:1b6:ed32:4613 with SMTP id adf61e73a8af0-1bcee665fa4mr1395255637.2.1719070289012; Sat, 22 Jun 2024 08:31:29 -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.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 08:31:28 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sat, 22 Jun 2024 12:31:15 -0300 Message-ID: <20240622153122.6220-1-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/8 v3] avutil/stereo3d add a Monoscopic view enum value 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: 59zrcel+m//a We need a way to signal the frame has a single view that doesn't map to any particular eye, and it should be the default one. Signed-off-by: James Almer --- Now updating all the fate test... The 3D ones will be updated again in the following commits once ffprobe is adapted to properly handle the view field. libavutil/stereo3d.c | 3 ++- libavutil/stereo3d.h | 9 +++++++-- tests/ref/fate/matroska-spherical-mono | 2 +- tests/ref/fate/matroska-spherical-mono-remux | 4 ++-- tests/ref/fate/matroska-stereo_mode | 8 ++++---- tests/ref/fate/matroska-vp8-alpha-remux | 2 +- tests/ref/fate/mov-spherical-mono | 2 +- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/libavutil/stereo3d.c b/libavutil/stereo3d.c index 19e81e4124..0c0cad127c 100644 --- a/libavutil/stereo3d.c +++ b/libavutil/stereo3d.c @@ -68,9 +68,10 @@ static const char * const stereo3d_type_names[] = { }; static const char * const stereo3d_view_names[] = { - [AV_STEREO3D_VIEW_PACKED] = "packed", + [AV_STEREO3D_VIEW_MONO] = "monoscopic", [AV_STEREO3D_VIEW_LEFT] = "left", [AV_STEREO3D_VIEW_RIGHT] = "right", + [AV_STEREO3D_VIEW_PACKED] = "packed", }; static const char * const stereo3d_primary_eye_names[] = { diff --git a/libavutil/stereo3d.h b/libavutil/stereo3d.h index 00a5c3900e..77340f72b2 100644 --- a/libavutil/stereo3d.h +++ b/libavutil/stereo3d.h @@ -143,9 +143,9 @@ enum AVStereo3DType { */ enum AVStereo3DView { /** - * Frame contains two packed views. + * Frame is monoscopic. */ - AV_STEREO3D_VIEW_PACKED, + AV_STEREO3D_VIEW_MONO, /** * Frame contains only the left view. @@ -156,6 +156,11 @@ enum AVStereo3DView { * Frame contains only the right view. */ AV_STEREO3D_VIEW_RIGHT, + + /** + * Frame contains two packed views. + */ + AV_STEREO3D_VIEW_PACKED, }; /** diff --git a/tests/ref/fate/matroska-spherical-mono b/tests/ref/fate/matroska-spherical-mono index b108596350..aa17e9c624 100644 --- a/tests/ref/fate/matroska-spherical-mono +++ b/tests/ref/fate/matroska-spherical-mono @@ -3,7 +3,7 @@ side_data_type=Stereo 3D type=2D inverted=0 -view=packed +view=monoscopic primary_eye=none baseline=0 horizontal_disparity_adjustment=0/1 diff --git a/tests/ref/fate/matroska-spherical-mono-remux b/tests/ref/fate/matroska-spherical-mono-remux index eec41b77f3..75a9b73a37 100644 --- a/tests/ref/fate/matroska-spherical-mono-remux +++ b/tests/ref/fate/matroska-spherical-mono-remux @@ -27,7 +27,7 @@ DISPOSITION:forced=1 side_data_type=Stereo 3D type=2D inverted=0 -view=packed +view=monoscopic primary_eye=none baseline=0 horizontal_disparity_adjustment=0/1 @@ -56,7 +56,7 @@ DISPOSITION:forced=0 side_data_type=Stereo 3D type=2D inverted=0 -view=packed +view=monoscopic primary_eye=none baseline=0 horizontal_disparity_adjustment=0/1 diff --git a/tests/ref/fate/matroska-stereo_mode b/tests/ref/fate/matroska-stereo_mode index 26c325b20e..e35425ae76 100644 --- a/tests/ref/fate/matroska-stereo_mode +++ b/tests/ref/fate/matroska-stereo_mode @@ -132,7 +132,7 @@ TAG:DURATION=00:00:10.000000000 side_data_type=Stereo 3D type=side by side inverted=0 -view=packed +view=monoscopic primary_eye=none baseline=0 horizontal_disparity_adjustment=0/1 @@ -152,7 +152,7 @@ TAG:DURATION=00:00:10.000000000 side_data_type=Stereo 3D type=top and bottom inverted=1 -view=packed +view=monoscopic primary_eye=none baseline=0 horizontal_disparity_adjustment=0/1 @@ -170,7 +170,7 @@ TAG:DURATION=00:00:10.000000000 side_data_type=Stereo 3D type=interleaved lines inverted=1 -view=packed +view=monoscopic primary_eye=none baseline=0 horizontal_disparity_adjustment=0/1 @@ -189,7 +189,7 @@ TAG:DURATION=00:00:10.000000000 side_data_type=Stereo 3D type=interleaved columns inverted=1 -view=packed +view=monoscopic primary_eye=none baseline=0 horizontal_disparity_adjustment=0/1 diff --git a/tests/ref/fate/matroska-vp8-alpha-remux b/tests/ref/fate/matroska-vp8-alpha-remux index 06bcc4b4ba..814463eeda 100644 --- a/tests/ref/fate/matroska-vp8-alpha-remux +++ b/tests/ref/fate/matroska-vp8-alpha-remux @@ -35,7 +35,7 @@ DISPOSITION:still_image=0 side_data_type=Stereo 3D type=2D inverted=0 -view=packed +view=monoscopic primary_eye=none baseline=0 horizontal_disparity_adjustment=0/1 diff --git a/tests/ref/fate/mov-spherical-mono b/tests/ref/fate/mov-spherical-mono index b108596350..aa17e9c624 100644 --- a/tests/ref/fate/mov-spherical-mono +++ b/tests/ref/fate/mov-spherical-mono @@ -3,7 +3,7 @@ side_data_type=Stereo 3D type=2D inverted=0 -view=packed +view=monoscopic primary_eye=none baseline=0 horizontal_disparity_adjustment=0/1