From patchwork Sun Dec 12 09:26:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 32300 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp3999108iog; Sun, 12 Dec 2021 01:26:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3Y0S6k7w4HpIaY4R5zXz7VZMKYJFqaDSgfhTlDfIkLIk8AnYchMUG7+NRBEt8J71VFelB X-Received: by 2002:a17:906:3a9b:: with SMTP id y27mr37125248ejd.563.1639301183302; Sun, 12 Dec 2021 01:26:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639301183; cv=none; d=google.com; s=arc-20160816; b=xroFKaj+xhXtzhJlPrKlTEcjfD/4jLfPSC5Sc4Jfs3a1+xfbukzeOSF7jjyBfkrkPZ 1ft3J8hlnQnlEa+EoFX8XTtLcE13nG/zDzBtmM5n7E1xgoK0+bfzRXxDHvPiX9+QBKd7 pnXt4pofjace34b/OvbXPSuN+1KKH2oprEs8ooLTvbMOXQgfrAZVHn+nu+IMhLwUV8Jj d4lp0UDNQxfDGP5ZBQrmxV0E6znQ/3LdnyLduhq7smlPDranDI7TZuSSg0kOqDRB5BeE bDkORNY0N1auJacA0xJJQcITLdHtbYFSqtrlrVeRuQLyjm0fcFFdCxcamFZhtjk+Xceh 8Xag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:date:to:from:message-id :dkim-signature:delivered-to; bh=QrUYcupnDx/toSxt+XjRym4HSXPmRcDrI9T7EqqpFD0=; b=HrGVde8tHuWEs36+/h6cPj50Y3soinwv3XA9jL+Oon2hMNE39nCHhd+lHOpgvKXdmf jM1p3x7BDfG5B0uL0f7yY5dLAx96g3/+wo/7K3AMkl4x4dJ3zKecVHOvD92MppvbAOLM fydWUNmSOGFXbWLqmD1Q2VMXQoIY8/GxNuNXDCTRDjQAqRLdwljvY4iIzLiwuk3OIMoP UNOZTx/DBHEjn/OsHjY3vfQKhwXINJlRryi/sYQaskp8+PZu5v983qJJmcNtECaBKQ44 fYQJWGizgSqwB5pWGxyPLVEMk/clkVPEMot+oxrgD0MPVV9jn4Z7Cbz5KX5h15lnkuDr e2uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b=rsNwEbXk; 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=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f17si15840219edf.298.2021.12.12.01.26.22; Sun, 12 Dec 2021 01:26:23 -0800 (PST) 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=@foxmail.com header.s=s201512 header.b=rsNwEbXk; 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=NONE dis=NONE) header.from=foxmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E6BC768ACAE; Sun, 12 Dec 2021 11:26:17 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out162-62-57-210.mail.qq.com (out162-62-57-210.mail.qq.com [162.62.57.210]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C7C49689BEA for ; Sun, 12 Dec 2021 11:26:10 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1639301166; bh=BnPHs6dz5mBeusAQC/ulf+2pdZd427UIKWN9c6UUYPE=; h=From:To:Cc:Subject:Date; b=rsNwEbXkgi+pj5c18dQXPQaIWBjP+vBrDNRaGxfzEEEJQpnlTbpXuGwActNbhOljG yzar54mQB1AuSwphpX5IywCSk9nCsWmC97C9Bh/FCO1z7ZOyuMCZ5Vy8E+YnaHI7GM UK7Q/k3xyHoGS9tacAM2+8QgXiycmiiUEIS6s3RE= Received: from ZHILIZHAO-MB2.tencent.com ([113.87.129.183]) by newxmesmtplogicsvrsza28.qq.com (NewEsmtp) with SMTP id 6850B0F7; Sun, 12 Dec 2021 17:26:05 +0800 X-QQ-mid: xmsmtpt1639301165t98jgreel Message-ID: X-QQ-XMAILINFO: OLsBWtCIHsg6NS4XSlECnZZ1kMGIGP7CB1FDC2RNTQ2mtGt4upXonu47R+Czt2 vjaC/cyMYWmLdQHnI+4NunYEtMAJQ2PQSbeg/VY/ZCXlDHOGGlE8YI9HBAQsboTwdQj7KRLhbipH 3xMWvKmALvZFT3Zp8aIys+qg0qPXUGlKAw/R3UJpo3KG+81lQQOBkcJ18mHCWl1/xWCYldDuvV/1 qkjCwnXN31Uyiw5DK4GPjpDXCnXuYKggVveYjlmoD9HJuDul5KuDvuYhp/eNK4HFNRyweEgQs0Er yBijMgckNcYuvQUpAWsHjGWDi1nDqtI36o0cx/XaDjC7ux+nCOUHcGGkciKRRs+p/sfM+BT+NJv3 lIJvyttKlDkFXnIkZQM6Xx2LaaG/DlrcpCZYxcmj1MjHctR0aF5WseVug61dzqDWwb1xuvBLHWJ4 c6s9AaHABTrsf+DQlg6vYVvA5Di4W51A70Pedys2I2dQHFKH70Co0hDpEyQnQGM5Hti/XWfIlmo3 dnQ+Oc7WLdYr2oU2H3wJJ5L5zpgKkkVGsSzsbqbC/6GvgSEYvEduhJWS4uG8QPOcYikhlyfB9zHa X8YQTEVXuxnfOmlomHfwq9IsjAcPiqRXVjaXPsJ4KS+mrpbEXkmbKM6TmKbOSfpwHOIwrXudgwsd sR1yv/i25bgQUsLfyJ3xGk/OQpz0keja/3FC7dUJG6jpJcH4rmsYdnB8vWiYiZC9JgL239j4+c/0 wU5Uer/JyTk+rdkoKQlGmByUEeTztfyD/AAEqKyOcvec2gc9oECaXipwV56y0h1D6SpevbAI/R7b co2Ny865R0ArQ2qTgzqS8NLVvoayWX48kP5lsnlxYJOPNrt2PJjNNecXKGXu0eAUG6bv94lrtulp figdpSmGgIUTzHR9psh9a9h5cZ7mH9YQ== From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Sun, 12 Dec 2021 17:26:03 +0800 X-OQ-MSGID: <20211212092603.79164-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avutil/display: fix inverted doc 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 Cc: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: WIR3IoDumfU3 --- libavutil/display.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/display.h b/libavutil/display.h index 515adad795..d87bf68425 100644 --- a/libavutil/display.h +++ b/libavutil/display.h @@ -88,7 +88,7 @@ double av_display_rotation_get(const int32_t matrix[9]); /** - * Initialize a transformation matrix describing a pure counterclockwise + * Initialize a transformation matrix describing a pure clockwise * rotation by the specified angle (in degrees). * * @param matrix an allocated transformation matrix (will be fully overwritten From patchwork Sat Dec 18 23:07:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 32716 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp2958616iog; Sat, 18 Dec 2021 15:08:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4UjLdbM8F4RVEoDqT5CRDIZRnwR+8qwJ03EA2DY0hHQ9EMKjRYoQE79sOg3PCGizE9Wj+ X-Received: by 2002:a05:6402:1352:: with SMTP id y18mr6569941edw.224.1639868900552; Sat, 18 Dec 2021 15:08:20 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i24si7316297edu.443.2021.12.18.15.08.20; Sat, 18 Dec 2021 15:08:20 -0800 (PST) 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=@outlook.com header.s=selector1 header.b=sr7pr5gj; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2ADE968AF78; Sun, 19 Dec 2021 01:08:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2010.outbound.protection.outlook.com [40.92.89.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7D21F68A588 for ; Sun, 19 Dec 2021 01:08:02 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iBqpSbtXmHDgyBMlHJi2K/0O5rhfb8J5nLMCkpl1IdlfDT8vTZ2/OW/1MvWtKpoIG+KAWG0SX8dJ6xdTS2qmdja/D/qyeKGJD+BNHRjD7q6h9sZrDckwxKq2+RbYv5RmdCN2Tn0jpaXG5XY1lj3b1lLr1WoKZfYd4kJ5wOAS1cR4E+qgE07QW3GoMbZATvNinMJ9R0UbWgLw44Z355k3URez8eBIn3a3j3ODcwew4YnVhCX0mOKBpVbZ+Le/wrx00/0k9UGvY0QmM5TJsSJSCvehCU0DPcnzOJzVqmmfezD/gNwn7BoGsodnAIjAdn1lEwTSxfoLayhc5XkaIrMpDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YFMJqpjO2m3YFjZlqXeCcZ18nENhsmRYuiBMeUuH4iA=; b=Qe3HQ27hS+5J6oGT/W/ZLph5yLDMQnj5bY4kFT4VWlf5A43MifO7gXmfN80fHccvRx02DJipl+t0Cn6+usqyvBt4/MqK5VO6Aoq4YOXq0balq9b4fzPjMJj04+ORAWDrFOkVFlWW6uq0YRisjbncZIx5ZeOOhMaQlXzGsD9VceLVSfRnKNH4vBUVd8APtZjWhiMRMi1N26EkoyysweH8b/BY2zGNMH/HN+9OmtCgjGQE6IhLvsYJgTXZWt0NEDPGYGwqyRm7HfwWRl/HWjWjbD8TeVGjFX+YYld+T2oJohaXRAUX3JE2fmjYci65GrLnPZtQEkYgTMX9H7Y4Wd5eug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YFMJqpjO2m3YFjZlqXeCcZ18nENhsmRYuiBMeUuH4iA=; b=sr7pr5gjB5kDhdSdYeSluTgyP4hvXfWgM8ChoeRE5WhPCPM14lDdkODbMn3C9X5fQYlNcqvFWApLhYXhBww9OwhoPd9gk88mvZzA3OP2rQ5E+Haoxdz8Pln0Qgwg6HrYpVkx8oAiarfv3RrhVN3nsyfBF0Ckzb8TJbVUwgEVRGRykuF6/TNrmoupCRihMO9xl2t0NHsQxXlkiLVbB2yK6dr1P9iiUDW3/sL+YxA85ETyu2AVAYimzk37x2ovFwtgarFKSwWidkTgOa0L1DUevg49rPQ/ofX7LupknI9Uce2FPrYrpMdXCML9pjdF7u3+bKr5UPs72CM8kHqW4tK7wQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB3862.eurprd03.prod.outlook.com (2603:10a6:20b:17::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.19; Sat, 18 Dec 2021 23:07:58 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca%6]) with mapi id 15.20.4801.020; Sat, 18 Dec 2021 23:07:58 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 19 Dec 2021 00:07:43 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [CiqvTm2AlM91VRHCVaNPzcSe8XCw+j4h] X-ClientProxiedBy: AM0PR03CA0076.eurprd03.prod.outlook.com (2603:10a6:208:69::17) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211218230745.1227624-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7ce949e5-0e55-4aa1-941d-08d9c27b3b45 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UJ+cHfC79vTguh6WqLpD1ahtRlGxXkf6drEDHeYMoijlxJC3sjFI51ptD7p3AaVm3fQL5DgnvNrhmq/w8pfyNoTBBcEwJgeIAqtAbtLsKZZe3gyBepp8plu/JBLxseq6YkbL8mFlsy6eHETMmvTXjVZnNtRuhecgtJUXnM6lD28xu4r76VINHS/VSP0Fos9i1ldMOCWM5rTPfoGh+eluHsw8j42llYzlE8bPQ3lSn/aSqHQqKDDrwPuFancnoiebwr2BfCdw9Q9PnPfeSdBipl/8nUAfFQ+b387UHyiLb+YA1ezXzeCuHz5cLcA6bA9fRjbDbj5MJ6FDeFObOG4ou7U0SylW/OPM/R0KF1gyIbkrZMObhagKIVYvOufPJeMpetTNlmDkXd03jWQyszekwRtex3b/90cztIPgSNzGtPfQRAUfGrIXbbKrK4EuYyGNPetgks/TvJvf913VPx5ZK4Bit4YQteHgL/LhQbSnNUg43YveCZMeujWRTpFgfmAcjgEy+AqxUKsDD6rwVFHVr1p7OO+P5GjTabRSsv8xOudtxd0IOxyGT2RAdFpUU/sek+mCqT47m/Mqj7Zw97KAtjX5aooBlFAt45MSkiuE+xjAF81LXy1SEVet15KrW1gYlwVWpKy+k6EYpdq64TYrV1WHpuAv4+RWQgJIcb6+as1RIHC4EB+ZY01RAgiZfIni4CLzCXTcImV3Q== X-MS-TrafficTypeDiagnostic: AM6PR03MB3862:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l3DgIPkmszkd4bKeIJ9Zzkogn9XSXdvn5InRApNfBTSiQfbMqSYS6hZE4COt+M1DoI2D1Rx+Va7uSYzz1Of6h0asABd/jCl9IiuACViuylArX5A5XIXEaWtTg0EKeWEnsUNhBRlXiccn/k7KNO6TICvojXqPm7ZB8ly3lsq1o9QtYG5cASLBSu77G7mjjhEUUVxaD3H8Gap6nzrvUx155FYJSczcCRP3MwJrdaVZlG/Mi7SNAfklsBWN0WFCVLVBCSXSS4YUoD+78TSsB5YcWquEayqKh9R1Eu2p01+vaiwObar90N/3fzb3FmGIQy32REt1VVqXFwwadC21/Y9A1lWgg6A4Am7Q+Mf+irOgDhRH8MlLTLu4Bpy6RcRrATzWmUrK2EjOyHMstRypEd8d83BVZWjNG1shC1vfNE7jEeqUjhvhqY1+Pzim5rloGUfwT55tVwQQ0dPIuS5vBPqhqs9/AMs84FfDwemheOH318fmNTbmYgwoDhVs/VN76uAzJI/5Rx38i7FIIT0jH6GgSUcxKpGPoZqyJugC7fkp7+/5+z/HouK74A2DfJ1KrqJhRjcMy1PSEXHiW5M2W3htaQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?nCliIfUXb5bMLdxHvc6cF6D+2Cg0?= =?utf-8?q?fQ1RXfa5qHi3E1vi8OZ18pqO83OhJ9/51ZgdRIrRKNC762hMRF4AmEWsVEY28SlI5?= =?utf-8?q?5sBhzScM0V/u5v+t5KYDDdNh9mGlvVUZhxTutsM7VRRk8bW+Q2AfvO1v6UshCIlP9?= =?utf-8?q?k336GB2IMRJQpuIlcVqMPY4O4H1VnxcE0ggIEZ5xymamMPI3MRvq3wJkqfVLRQhPQ?= =?utf-8?q?wG9TtxqocWceziibiiYsxsZbEbHFW3PFF5U9cZd/WYGKcqWg+tram7nuDCLHZ6gnz?= =?utf-8?q?l6WTCTaovHD3wwoqsm0r5fRxwcTxWfHj6cHCzKQQ4QKh2ftICvlpUXx4iDfOOj5Hn?= =?utf-8?q?eDsMOoWwYIp1SSg1e6NldjnAwFaOgfpvFnx2NJmT1QthLH+bO32wuUcgBX/OGjes7?= =?utf-8?q?htcHSy6TU+5kcGuTuJkScighutTcT+3yW+5aLTdR0K4ONcDgRpz+Ua6CPxa5XUTeR?= =?utf-8?q?97W4U590EvdXWjN3GZyJIjLy7HHMw5xXGcjOv/eH0TxZ1pPA2jqRZSAm4/jQvdUJp?= =?utf-8?q?iGkhT2H7I6rqWN+D0hSzPezVjCTBWhqMwYM6VQRhGlQki4T45ypiMqf2kazjIpmUK?= =?utf-8?q?QvwNuveEP0EiNPec18TYDlnh2OwvFaoiOMpFLFHs8YS63irXH8cC9cyBXJPjwPk0Y?= =?utf-8?q?2X27YJ2ni/nCGHUDszEyPgQJmSkZSxnQ+nSNs3J2JnEWH2M4YSnjUqJ7LEb8PwBYO?= =?utf-8?q?cXsOaaGNySmMy4KDulT82San8y2ZONT2txJmu89ul0sKs95uQjYo3PDj5gSf3+zWE?= =?utf-8?q?I22bx1JnPwSMag8E0xrTaVT4hnZvfnisC6pIZ/cG/N6bb6sjYLH0ZbHdvERTDZC1l?= =?utf-8?q?5/EtBRT7pV2m5Ny4pB1qzSwXczggZxjWc8coVfG6JjM/CmYgLvZou/LW51w0X/pg1?= =?utf-8?q?X4R9E78Xftt2TAlybhtTfyhJvJ60DH+4gf0PPFmGxwEA=3D=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ce949e5-0e55-4aa1-941d-08d9c27b3b45 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2021 23:07:58.2848 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB3862 Subject: [FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg_filter: Fix autorotation 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: EUK6UlPXFCg+ In case of an orthogonal transformation av_display_rotation_get() returns the (anticlockwise) degree that the unit vector in x-direction gets rotated by; get_rotation in cmdutils.c makes a clockwise degree out of this. So if one inserts a transpose filter corresponding to this degree, then the x-vector gets mapped correctly and there are two possibilities for image of the y-vector, namely the two unit vectors orthogonal to the image of the x-vector. E.g. if the x-vector gets rotated by 90° clockwise, then the two possibilities for the y-vector are the unit vector in x direction or its opposite. The latter case is a simple 90° rotation for both vectors* whereas the former is a simple 90° clockwise rotation followed by a horizontal flip. These two cases can be distinguished by looking at the x-coordinate of the image of the y-vector, i.e. by looking at displaymatrix[3]. Similarly for the case of a 270° clockwise rotation. These two cases were previously wrong (they were made to match wrongly parsed exif rotation tag values). *: For display matrices, the y-axis points downward. Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 501a0acd61..8c929ab9fa 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -761,12 +761,12 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter, theta = get_rotation(displaymatrix); if (fabs(theta - 90) < 1.0) { + ret = insert_filter(&last_filter, &pad_idx, "transpose", "clock"); if (displaymatrix[3] > 0) { ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL); if (ret < 0) return ret; } - ret = insert_filter(&last_filter, &pad_idx, "transpose", "clock"); } else if (fabs(theta - 180) < 1.0) { if (displaymatrix[0] < 0) { ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL); @@ -777,12 +777,12 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter, ret = insert_filter(&last_filter, &pad_idx, "vflip", NULL); } } else if (fabs(theta - 270) < 1.0) { + ret = insert_filter(&last_filter, &pad_idx, "transpose", "cclock"); if (displaymatrix[3] < 0) { ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL); if (ret < 0) return ret; } - ret = insert_filter(&last_filter, &pad_idx, "transpose", "cclock"); } else if (fabs(theta) > 1.0) { char rotate_buf[64]; snprintf(rotate_buf, sizeof(rotate_buf), "%f*PI/180", theta); From patchwork Sat Dec 18 23:07:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 32717 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp2958744iog; Sat, 18 Dec 2021 15:08:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxs0G04lP3s081aw3Wm8oiDHQHLTYYuA3t0YICMxbNYOafi9UdtzdeHY7iEdIjk/900VbZB X-Received: by 2002:a17:907:94c3:: with SMTP id dn3mr7379902ejc.600.1639868910936; Sat, 18 Dec 2021 15:08:30 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n8si8910095edx.93.2021.12.18.15.08.30; Sat, 18 Dec 2021 15:08:30 -0800 (PST) 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=@outlook.com header.s=selector1 header.b="D+55yah/"; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3653668AEE0; Sun, 19 Dec 2021 01:08:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2010.outbound.protection.outlook.com [40.92.89.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9FBC968A588 for ; Sun, 19 Dec 2021 01:08:07 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MundwLGABtSTiOxJPdAxUBGQ2aA5Cg0Rn9uhThnwCxaEGMBkMk7GTzXs4zq2FdrAiQ8q+UWTWmQP7s6RmPSeTKaUFNzF6lhHqFNq8Os1+/KLn00f13DyqUDjObK9Tv4EJk/Vo2zq+wwodRTMuXimgqsfKiLEzEci7+qulBji6f1Fv59DrkJ5Q/m/ALIDaqlorG9Gg4g2iIyIiHd8kg4N+DZ1HY4m67wxVO5grfbw4RpPQeiuQQoj2SS3PzZuzmS4MX/sRoXufPwHCuTsFc8rWUFje4FxqIOqaauzKje2e8dVqmOoBlPBxrvDrbpcrvhYEfrKLXWGzw4F2ALtql0Nyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NhKDi6XvUr3FU4aEv3t+B2zS6/zpo7Q42URSPTJF1u8=; b=R1H+4Ftc2nSatoJ2J9qv/GNdjfz1lOLOem+PGstMD4JckLBUfdG+KBQwOmQv1JFjhs8FHbH6rZ0oKPHT3+/91qey7ATA9mZ7qn53VTttUyhGi1Rd7BkFgWDaypBUv1xGj56O1Voy4Z6IbscC//dBiwRV04j0XZTk1vbWgvNbZ8/QAGjAn7t++X4QCnsj8279AOLqX6YraMbj03wRJ1r2wj72j29D5/M7sMtIt8JeeUSILot/PiDTapGHaihz+H122FOW5l/1JEfBxZig/8ENpw0uJvSLnWdHwWZegQR10pgf+wDkxroAeBWg992cRmvYBgv/LJqeDF4EtIXukzjvzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NhKDi6XvUr3FU4aEv3t+B2zS6/zpo7Q42URSPTJF1u8=; b=D+55yah/W/HEOXvD9ej5h1l8CFrssmZ+Trpzw6gVHbMdO3j6kvqix3/Vr88n0lhdPIz/Yqrtoighd31IGShcskzGx28WfZvogzQyuwUiZCD0NfvqFi8QEU8vV9hVxvAaVGE5Hd3VSpzvL/DGR9GNKzYrtuQ0tOjeZtkJ0/OgItnl/q9JXNOYoBqBNcysvm76EhkAcNLKHMKGwIj6G8dLCvkbO9cVzUtbDxZTRxLR3lYXMm/pxG4fyy/paOoRc40Dh1p87VAsx8t0oxz0MKdukEunie9R1cvcZnQh2AkX2b4W5ajip+a8aqSAqJbCyQrcuH2RN6smUW8JJ4F5vsxO7Q== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB3862.eurprd03.prod.outlook.com (2603:10a6:20b:17::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.19; Sat, 18 Dec 2021 23:07:59 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca%6]) with mapi id 15.20.4801.020; Sat, 18 Dec 2021 23:07:59 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 19 Dec 2021 00:07:44 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [pohcJPAXUYP/nZwlvRZW6eAnOucLJz4Z] X-ClientProxiedBy: AM0PR03CA0076.eurprd03.prod.outlook.com (2603:10a6:208:69::17) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211218230745.1227624-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e330c9d9-7173-434b-b4eb-08d9c27b3c1e X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiR3EehW4kxQzdNcP2D/mG1JrzBuQwAbiLqSibOXQaF9EPITTU4tqnQ8zoRPZfdtUf/dDKGp6OIsups7P06xYyqrNKgNUVBkmC6RZWFzYLlPZ00Z6yEuv+NBIgwtfHyeMDP8odKvc3jNDDkcuEh9bYL6bfYfSvACyxrp7Yr1LP5AFV7p7iJirWkVLjp+M4RK7FRspFVma0SmG4pFo9y7h6wzd4mgjCWmGbrxDSzAJHDFMyM7ArH/f4gueTcXosmyb14a5/WuMmy0CH7tCUT1dAXKxp550pH5u1oNsAgiQD/pX9lbNBXQZO/HDlDMPpkK33STIIcieslqFm4Ar3gIXJ+qC7DiEEY2p07+CZHNDsTQUDoSLUTyrhP1IoX1q5NfK7GOIil0AYfQ4i8tRJmQuagbWjilOGUUdZMPlrKvbUKSd9r/QOwqzKDsm1Yut57Bf9I0cdba2oNUyXosVxmvKWeFQqP8NtrXC/4w/xxh4BDw77sGXXZbFGyEkNw4lu4jTXg54e82zLJu1BjgHV8b9g5C3FFryZfi6TCqvlQNjLHbxGzGu70rlAMdSc7KjBJLJauhQP49coiH9m+/XfS8OOv89b5FA2IttHn2ZIzPUhEy9+gUs4ASEY/uSXG5ksAp2tcVDMiCI0ryl5YjOgXeX9PFcZvXWfnOQsd1/aSS893HW6VQmoHVagCdE9CgOQyuLj4YFp5LYHiUXuxvHu5aYKEk7pnSzvHgPT3cFdavkt6jEx1E+Sc1cWDODRaYez2c5DA= X-MS-TrafficTypeDiagnostic: AM6PR03MB3862:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fuqP9wNGUHLLdCjB2/nUMQ+sgCI7GOndrCDrx/XEKspV6cypipuYsAqNY+YjhOHRx1PUx/1BebssquszYdBeCAMlFatiDbqQc1T0D4vEUTDn9Ja/ZGlzbst6RrGIOqA3WktZ+3xHAlwYZqmGtTRCIj9kU1V7eqWPMN2SpwnXBC/aDH4tbyl7uqULOPCphToFIZdzXVY7Dqg7FBqNSi0eSqZgrXCZjk9Qcf5RA7ieoJ4pWqLEJs7Wn0UMI6CIeHKpXbW1eLKSKgGti40CyOSup+wa9er0v5xU+b7oTVohP9wPtNq6195Y+J3vIGi/4HR0LZDzkl3a+s+q/4ZiGp2g1J5nMHshzprG9DF98R71iZydlqFH2ZC9hwTnsmPMiDP7d/Sr+ctTmorGrfjDs6G1OpQg0LPEZs1zmdSdtdRj+Wswq18LAAl6brP9rT3jlPs9yZgWMSXqcl2FrQue+xfJrl5g7DE0WWAowKy63K6vQ3slzNgm4hwAnY+nb9T16UBlYNezBABmJL9vG8CGsXQDcwuzXkbhB6JeuOOOkGmEQEudnT2yJP3mb6pzDjFblkkisrU8hsZRgrSsJNzGIIdmrg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8VBIIsCvTmlbLOJ1PY2/hPs2erEA?= =?utf-8?q?xPRCBGSwjBDiFcmhSRAa61x9ENichpdGAtH3lObahbX9GyvBCd0wFgQ/zv5+gTgqG?= =?utf-8?q?YwEAk2a2WjYItATcOihnbeEY8FnOzEul8TWszi13HxiijGunbC3TplWuGCCAIOXQm?= =?utf-8?q?b7q+HxN5ASKotIpAPr5Xc7qmSgIRI/+nA2aIc5U/1YmFcsXIEp6kUSjE4JxFJ0JpD?= =?utf-8?q?nk2wxJxecB+fpOn/ui5LkDXRnsgC8reIoqhbX774zkPxAXntVYwKTYM7oJzfSsA2G?= =?utf-8?q?mQe+rxrtQEhgCUCj2+pCrotJ+cnaFAw/F026M5KUr5KM4jcfCaW2XhjRk9ywZFEsk?= =?utf-8?q?T/2YZwzkZ8QeWsYimodsDN1cYrwTC3GeS9PbxRl78oRu4UvrttUvgp4bkFkRb3xhW?= =?utf-8?q?FVOXL/jflObsu/0KU+Q8OmsgoPGCoCn2mHOZHP8m11JWUG/CCwaOWr8KnSTsAW8QA?= =?utf-8?q?rnyhugqsdlYBMotUnR4E8ZwWDe15XhYwtLocXz2/hJ02Elij+3+uut5hsYFdsdjop?= =?utf-8?q?EHjHXl6nUsYqplb6sJk7JjADtTXJ0bNpkNWu1XtW6yN5BWPVDKxHWZ9OLichyhPKZ?= =?utf-8?q?r4zkbFHpnsH95MeCGl/ymwPoGbLm6LkTAKPAXuNcQdqUr51bgWgPQUA+rczKMcrFH?= =?utf-8?q?hpgrI9nENDt5PsVQdJpeeWXGqtjsTFyplNsQBBBvRJaLHfN+7U0DvUFtsA3aemdpx?= =?utf-8?q?miZQWe+lx1/JcrXvOW6HdpHR/eFddy9dOe3yPeEJlhc9TiQwHpXvJnbtL11NNYL2p?= =?utf-8?q?oIT6eCDuoEwnEqTWcqypehH8c7txFU+6XLd45SZk2AnLvuXMIX7evx37/Df6z5R5A?= =?utf-8?q?o89dvTRoLN+qt34SUPduZScwqueM73Hl7sbbINFcQBrwtgr0HXSV/ME4xTzAzlcce?= =?utf-8?q?0v94r1DBsxwVrXCrgzBDK8+C54AbY+Z520iXUwvd/nkw=3D=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e330c9d9-7173-434b-b4eb-08d9c27b3c1e X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2021 23:07:59.6921 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB3862 Subject: [FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg_filter: Avoid inserting hflip filter 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ypmHCsjDIO0Z The transpose filter has modes equivalent to "rotation by 90°/270°" followed by horizontal flips. Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_filter.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 8c929ab9fa..1f6cba2c04 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -761,12 +761,8 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter, theta = get_rotation(displaymatrix); if (fabs(theta - 90) < 1.0) { - ret = insert_filter(&last_filter, &pad_idx, "transpose", "clock"); - if (displaymatrix[3] > 0) { - ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL); - if (ret < 0) - return ret; - } + ret = insert_filter(&last_filter, &pad_idx, "transpose", + displaymatrix[3] > 0 ? "cclock_flip" : "clock"); } else if (fabs(theta - 180) < 1.0) { if (displaymatrix[0] < 0) { ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL); @@ -777,12 +773,8 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter, ret = insert_filter(&last_filter, &pad_idx, "vflip", NULL); } } else if (fabs(theta - 270) < 1.0) { - ret = insert_filter(&last_filter, &pad_idx, "transpose", "cclock"); - if (displaymatrix[3] < 0) { - ret = insert_filter(&last_filter, &pad_idx, "hflip", NULL); - if (ret < 0) - return ret; - } + ret = insert_filter(&last_filter, &pad_idx, "transpose", + displaymatrix[3] < 0 ? "clock_flip" : "cclock"); } else if (fabs(theta) > 1.0) { char rotate_buf[64]; snprintf(rotate_buf, sizeof(rotate_buf), "%f*PI/180", theta); From patchwork Sat Dec 18 23:07:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 32718 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp2958833iog; Sat, 18 Dec 2021 15:08:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5axspq2O5eoVcJ3sTTSo0175SQ6Jg6q6uYUeMdRvh5LmwJjZ8oKnaa6wVVCO2/iKbsm/1 X-Received: by 2002:aa7:d64e:: with SMTP id v14mr9195699edr.194.1639868921772; Sat, 18 Dec 2021 15:08:41 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id nc39si4982979ejc.119.2021.12.18.15.08.41; Sat, 18 Dec 2021 15:08:41 -0800 (PST) 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=@outlook.com header.s=selector1 header.b=s06VtFlR; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 25FA168AF8B; Sun, 19 Dec 2021 01:08:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2010.outbound.protection.outlook.com [40.92.89.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C5E3F68A588 for ; Sun, 19 Dec 2021 01:08:12 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AfKotmjO7ndk7qcx2Oc1JgR4Czb7xnv5jOmuzV1wYI7GEo6t/JTHce5MuRZGJ1vv3Fp/mh+6gxVxyKcbn5dlOB3tg1PwNsBLyZEeSqiFt0ftF+P39dRutPMXJWMt1W3gAsmV8B9RYf9yrz02UDICndWTRlz6XITObk0dQ6kDFtZYzJ90a7W77U3Epeit0w7eRnUnlZjKxoz2pgD1CnfudrU4xxbsl3NemgR3Cnt/yAHpmeer3wpx4VldYbzTrcynVcn6syu5Vf8QpU9ibyhpCRJKJZecuTse4IcxwVZTIAR2NFl/4iwRwJ1bOm4n7DZ+XYxKhDyke5Ms71PcB+cyZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xaa89tJ/iI38a3pZdaessgW5++Hj1+hCMDX1egysPrA=; b=cMtohV0/WwnDtJQGik9oPqjLvJ7+eSr1nrkR0u/IVuuifhPuxEf1HG/5S8RQGGpsDyPF/nAbK1v+tSl/KtJTy7dLo1SFolxnbH11YrgbBqquHzpSWf3wusfXVExs3ULlUvVn3shqL9j0BBgypiT2eilIuM/7DAUNqH8klhbDeMkNjgax+TEELFWUDtasBsStjxQNdGEv2CfeSlZR3WsyxW8S8thdgVzHA5wQz6qs9uLCGqbxoZ1uqdvk21zwoXxEbVYjFaIv3KnVkKtIdn8c2PsgS/VjCMRLat119HRE1pNbBNhh2gkDzhHEatUW3Zfx5io5sMe0daVIoUet9zTsrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xaa89tJ/iI38a3pZdaessgW5++Hj1+hCMDX1egysPrA=; b=s06VtFlRl/x/9/d2NSPjkUEAHEkH0GvD0CucHOfOK4cSOZKm2MjeSIiCCPR0l4jCOMZSjs+WCnFwpuPoNTT1CIQPL774OwMACscZFt0SyqiicPpeqqM7ybMbyrhvjWspTMS3u2fb1FDeNNtqKUomdfvLgU/rDr9fFgo+BYOubOTE1IN3ZsUlzuISHpDhzR/XUeka6qXeDL0XYrE07doyMgDaSDnZyVphZ2rrct5RY7l03IaHFE3MphfgA1sQPFIUstZIr6qD+natHgKA63/ad65O1LDR+ZFGyDPjAZ74+KdrDckXYBJqmyxA2BTxNvyBl/ODLjZbc+fXAnpUXEm5Og== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB3862.eurprd03.prod.outlook.com (2603:10a6:20b:17::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.19; Sat, 18 Dec 2021 23:08:01 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca%6]) with mapi id 15.20.4801.020; Sat, 18 Dec 2021 23:08:01 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 19 Dec 2021 00:07:45 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [WnkGDNmqlcDQTwT803sU3halMyWqTUuI] X-ClientProxiedBy: AM0PR03CA0076.eurprd03.prod.outlook.com (2603:10a6:208:69::17) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211218230745.1227624-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7dde0bd-4569-490c-0793-08d9c27b3cbc X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiR3EehW4kxQzdNcP2D/mG1JfHfJXIedYdZAqjnhifPwQxeDvABg1zAiEpxg0LzonpkzJh2TpoH0m4RWWDZXHxsQEzMjf6QL/W6IcHw3xNA4uPlcdRZW87h49soI1FJkiyldJSnKO6aa7XusqoV7N6gY9y+U+H7tdWv3KUyReqo43Gli6kyIDK9bSv9+COM47Zw0HBdEM3Ep9DRZsLQHQ7dMkF3DYHT1JPvvd6Jx+5YHAu9ktkMt4Lc3QsHOG3Y6On63U9fwKmwOPzvhAAA3tE48S7KFXGB9Umt+jL3qNE/b7VBWC3XzP0skjZbNqqUrXBMdiLaiY06vz8AGZZC7POXQMETbAh81tgmwX8SoBWWsdxHobOOChyAlPQnhdCLP7R0K2HUpuGM9orAfba5v4cNL7FmzDsP1YLZi6eJTroL4lqQxd8w/XpZUBK39QZqVrqY/8+t5VNocnqUmRlWeuyxrcvUUsDso3sr1ZGRWnOjDiSnA1iag8Lj1Gm/9XgDVCFqhAPzT/Uuhlo8wKsrUVwkMWxndgE2MNAAmrVcH+lJxm3+CPO51QEAI27ru6gJN5M1Y7LhUMf3Poy7eMwYdTHJWAZFsoR4XexZG2y/2iEsDbvgYHr6PGA60NRKHPfijlnt6C8NwS5qcK9ewvWjMH408qU+BqGbbv7OZy/6aU2dvdOdSTYevkmbNklpuKdvHBuJsRsLbKyHMtK7JpuhjhnzB2ewH86kVz9/A+m4xJ/8QrrliRYT0BR5oSSFPPi0ghlY= X-MS-TrafficTypeDiagnostic: AM6PR03MB3862:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I+uG8i6jlRFGPWb3/m6I1pXjwY9EUZf8zbpuH4aySG0ZFx/hV/s6X0tNVEkaDT3qz75rLBD4zLP+UJDFLQhmNVKEm47MWNQxNBXFomrgddV2QhsNL5e1b9KwdnEm9X2MPm956R9gMpRY7MgLZiESAMxjrRKBa6elHYORwQ00LhPl8SDerwx5AS1VZauRW0W/Xt4Syb36FwR5lKjUAx11FDyt3i7gNo96OmaFwPPxNwlv6T2cuaLiBAsGSASOTF094e538RjEpIBG6YFJaZVVzeYJ+g6Nl6MHkQSltcDNJwMK/fHFn/s1RI3sCX8yZnrNphV77cZD217vhma354f7yDKKM32kgI7Gyez3LEUNMV5ls89e21lnpLsIjrq3XgrhKN9PwHjwn0SUopa9la2pCeWtXc6NzeOkVpE2Qxjb+vhngHvXBUva951YNpXgyVDCFxSvlgoK/ABLWfInTkk3IdcJHvUEV1V0ryWAAahWJzuWoAHraedDryPcBW4fDmnl93gNG29H7gGztoqPy4g3/1CPrvBHPvMlm72V8U1+AnUL6IaJwfPFkH39ljKeEbkUAAV0AenLNmr0whioElLPBA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3MJ5cwS7TNAvZ3uU6ixU3FMrhPqakmlxiPzWHui7scdCLVSo9/94RrB59s1URJk1FfPxgJb0V6CAUNIac6r/lHlaaIlrIOv9aqzP3GhAEafwumB/uRHL+AzEAosIQmTHcS58R4YHO7G1R9C7Vx6ctBFf/2I7yalapszwg5K7u5QIiEzdwN98Fi7uTgsgUUkYEpajkQF/Ho8gzkWDK3WA7/embk3wJQbvbpv/L19HVkj4BdQkJ2LtjQrVgGUQt5vQTQW4J1I12AcnzE/ed5tdGCZ8HmuxB98AlnzXfy6/8nZExD2p379yfJ0upfC/ZLX65YaSmtvcbLRUN16pbfUyP95LP1FwZ5fp2uj013Uj4jL+9Es/52PQr0Lnicp3MD2tm8+wG8AP1fv1rZKvvH8t0rwCnbMik+IT4NGFbXjyfYD4Cm92rGjlls5imyn9VFg2B2dPlQnhxhaKf8sgao1klNctmx9AGZGAyvFew7VJTwT0ekjNjwZ+V+uBmkQD3Xsbl4xBTlUs9oEiG2vXrzYDi6/YiFa8uO1gd7rznfzoqqQlJ3/JMJ5bttZCER8Hnm/FAOGXrG/CgxVH6DphaNBTHHLWc4+4kV8FXiK6KrcOVj4tXmxTWPwrS6Lishiovnvo2Dr3o2MtRWuM7SwsWPu3yFJxzQWgPlKZJNmjGRacf8Bt3h5G7GZ3VZwxiR3aHm1vLVsfAd6FmVBMu2B2nQuTQvcto+VuUKq7ZhW1c+nNZwdV+4cadvwQGtnECa9PZcMH7wLoLY4t65xs+GWSwca6Y+gQIPx2RnvxZpr2dG3ol7s2QjeHcoFxkdVS5bb3O82epXXrcF0MR03vmtjwsRixdK3mlYv6n7SIDu8yET3G6uk3WxJot/wVqnjw65xE0MdX3hWAZfAoYlkwFwU/tTNglR2/GUiS6fFBojyFs9BzpqwMv8/vlMRle8K6QNhwOlCMF3DuFSAHRXaIGjo/+/liBw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7dde0bd-4569-490c-0793-08d9c27b3cbc X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2021 23:08:01.0513 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB3862 Subject: [FFmpeg-devel] [PATCH 4/4] avcodec/h2645: Fix SEI->display matrix transformation 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: xZdRTZJhGJ3m The earlier code did not account for the fact that av_display_rotation_set() wants the angle in the anticlockwise direction (despite what its documentation stated for a long time); furthermore, the H.2645 spec wants the flips applied first, whereas our code did it the other way around. This can be fixed by negating the angle once for every flip. Signed-off-by: Andreas Rheinhardt --- Maybe the common H.264 and H.265 code could be shared one day? libavcodec/h264_metadata_bsf.c | 15 ++++++++++++--- libavcodec/h264_slice.c | 9 +++++++++ libavcodec/hevcdec.c | 10 ++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c index 452a8ec5dc..8c5d19c5a8 100644 --- a/libavcodec/h264_metadata_bsf.c +++ b/libavcodec/h264_metadata_bsf.c @@ -341,15 +341,24 @@ static int h264_metadata_handle_display_orientation(AVBSFContext *bsf, SEI_TYPE_DISPLAY_ORIENTATION, &message) == 0) { H264RawSEIDisplayOrientation *disp = message->payload; + double angle = disp->anticlockwise_rotation * 180.0 / 65536.0; int32_t *matrix; matrix = av_malloc(9 * sizeof(int32_t)); if (!matrix) return AVERROR(ENOMEM); - av_display_rotation_set(matrix, - disp->anticlockwise_rotation * - 180.0 / 65536.0); + /* av_display_rotation_set() expects the angle in the clockwise + * direction, hence the first minus. + * The below code applies the flips after the rotation, yet + * the H.2645 specs require flipping to be applied first. + * Because of R O(phi) = O(-phi) R (where R is flipping around + * an arbitatry axis and O(phi) is the proper rotation by phi) + * we can create display matrices as desired by negating + * the degree once for every flip applied. */ + angle = -angle * (1 - 2 * !!disp->hor_flip) * (1 - 2 * !!disp->ver_flip); + + av_display_rotation_set(matrix, angle); av_display_matrix_flip(matrix, disp->hor_flip, disp->ver_flip); // If there are multiple display orientation messages in an diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 4467882775..c21004df97 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1305,6 +1305,15 @@ static int h264_export_frame_props(H264Context *h) AV_FRAME_DATA_DISPLAYMATRIX, sizeof(int32_t) * 9); if (rotation) { + /* av_display_rotation_set() expects the angle in the clockwise + * direction, hence the first minus. + * The below code applies the flips after the rotation, yet + * the H.2645 specs require flipping to be applied first. + * Because of R O(phi) = O(-phi) R (where R is flipping around + * an arbitatry axis and O(phi) is the proper rotation by phi) + * we can create display matrices as desired by negating + * the degree once for every flip applied. */ + angle = -angle * (1 - 2 * !!o->hflip) * (1 - 2 * !!o->vflip); av_display_rotation_set((int32_t *)rotation->data, angle); av_display_matrix_flip((int32_t *)rotation->data, o->hflip, o->vflip); diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 46d9edf8eb..3aa70e2245 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2769,6 +2769,16 @@ static int set_side_data(HEVCContext *s) if (!rotation) return AVERROR(ENOMEM); + /* av_display_rotation_set() expects the angle in the clockwise + * direction, hence the first minus. + * The below code applies the flips after the rotation, yet + * the H.2645 specs require flipping to be applied first. + * Because of R O(phi) = O(-phi) R (where R is flipping around + * an arbitatry axis and O(phi) is the proper rotation by phi) + * we can create display matrices as desired by negating + * the degree once for every flip applied. */ + angle = -angle * (1 - 2 * !!s->sei.display_orientation.hflip) + * (1 - 2 * !!s->sei.display_orientation.vflip); av_display_rotation_set((int32_t *)rotation->data, angle); av_display_matrix_flip((int32_t *)rotation->data, s->sei.display_orientation.hflip,