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 8FED24248A for ; Sat, 18 Dec 2021 17:24:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CE3C368AF80; Sat, 18 Dec 2021 19:24:01 +0200 (EET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073083.outbound.protection.outlook.com [40.92.73.83]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2D52F68AF51 for ; Sat, 18 Dec 2021 19:23:55 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NhtGvQz3174D+8sAMuzSdNMneIAgnxG1G8g45k8HnngbxPVEeS54j2UOF2N6b/0Ao1cEmdRqmfyg2beipL00xW9rKxgSi22NZIuP6OxIf8T1HpwnYGdE0FIVTF9KodkgByziql+73UkwXReFMEqnqQnBDWBxkMweONkA2JwA8CRDBE2Vz5T2zPfElQJnuuCORBxqxfgb5wRHWZVPd1GzgQKMLTRWZvcz0ywmOVyHPA4KnaTxe7Ku/LpavKZ1lnSYvCCLDfzKVUn3gfBPxd4EOXhlPJqyoIFV8Cx2Y5qN+X7rdjg2EpV7TKhmYqWdlEVeIm6iVkxti+NZSn54Ajb+Gw== 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=ip9ZsXh3uMH4UAuI+f2XbfcNsakCZNCNJeBNdecDq5c=; b=hOTU3UUWaXe7e7jLXHPjS2kwTK+epZBDp2LnFb49SBnMHVepZk/kQdd6G72WBMAGET9YU1HFkH4h/+h/KUCi5VHjKL4CxNw4wqAlBCnfke9g3bJZa8zH6h2xUghAEzcu+kMvpokNkVW+J7vW9oWwqKoURqBwPumTL9npQNLfmQjlgGYtGS+5+pgA/UuS/VMuyvH1zCx4smkFat0bzVMc+M11entnzcmCqQqm2fMsIGopqFJkRlKFSYNqZGk+PFTFo7c0t9Y8BfcyLaUql2TxG/e6ZI1T80WHJtaLIZQZVVGxHL3X8wnCPl78xws/nLlZoOXOaaauIIgsTTBJiyZN9A== 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=ip9ZsXh3uMH4UAuI+f2XbfcNsakCZNCNJeBNdecDq5c=; b=Uwc/4r71RzRSR/hm8p6DLi3mah8DdWEIqAohNTVbG+1CcdayAbMbfRitZ36JsHHE3GEB5Vru/O6QkG1MFYC5/6jXSACIUvUtNuhWbSrRhQX2+rR2FHbtny3s5gTrgy5hvko00wPou0NR2omgRM/AJk77QRwFaljziaid4EaMUV6taaiuGeS7J5slKX+ITk/3YuLwvxhEMpe0rTe1ggCuSfymeEkJM4ophXqJPvX5OR6vN90SjMTTJ6A1nxZPMWq4AKiXyX/+PoFKiSI7TzhFz3uyI1agxHeG7mTACIakcvXXFZIjiY5tr5DWD2IvOCrgpMtNOb2eMqIEc6+Z01yzLQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB3767.eurprd03.prod.outlook.com (2603:10a6:209:31::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.18; Sat, 18 Dec 2021 17:23:54 +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.017; Sat, 18 Dec 2021 17:23:54 +0000 Message-ID: Date: Sat, 18 Dec 2021 18:23:53 +0100 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: From: Andreas Rheinhardt In-Reply-To: X-TMN: [83MV5GUQ+S4hMWhTnk59EGcV2lDcPyO8] X-ClientProxiedBy: AM6PR10CA0095.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:8c::36) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ffee57c3-0247-4c5c-8283-08d9c24b2a77 X-MS-TrafficTypeDiagnostic: AM6PR03MB3767:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DlCxHYkweIlIaYL6PoFWcvdd6muEy6weIXjs+3TqbcWeT8IS/kMM+FCghpjNsFHGtdn9xFkrjS5CEhBg+lGRjxXKjtL+tVBnLiA0/xifldEVCrxt6gdttrmOkuKvPO1JhLQXx9GCV1iZX/l42u2xXxi5iqjqROiQxcunlVNOfz8NgU4uyk9F5jCrUlsd3EC3ImvgIPIQ2x6fJo+mgNVqNCF5zcWkFMnM8IRFPd3qJGQmVZXlX2IJReeP71UlDoU3xhT6w6PPY23QxoTAM7tdNSWhy6B4A+piiF55zKkfTPjz7HExrNpDPiOiV7cSCG3hau876t7n27p9SUhh5IJ3b7T1zP134J3FNEX29/eaCu61VoFhMhSk13NY68gCFSVfQvMQuxxOpA5eymNSXIEeph4qyx68RybTJl5OEzMn8QQ66CslFmt5/iQQ4rgEMkQaBoHa7e/1OlRgaN1mw0r8gPydRi8Yclk6ReKOIYNL+qWkQZLfvjvJIJkL0oYBdhzLpBamOul2gkHcymkcisO7hCJU9MQwyWhKzZp7ET5GaynJUIj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dkaGVl?= =?utf-8?B?aWhZNGc0L1dqbVhTMUtIMm9zVStFN1htbDg1TDVCRlFVZGZqditSUmFvL1o5?= =?utf-8?B?Q0FrTkx5dWVmbzBYUWdCZDdhczloN3hiam1WL0J2YUl4bVlQNEx5ekxUcG5m?= =?utf-8?B?YjNld3NlU0ZJUnNWWnVibTU2bndiMndlZWl4SWsyYlZPM2hQdjlRcDB2V3V5?= =?utf-8?B?VXY5cmlYSFFnLzVvQ0dIaUtsTDh6YzdvZUJNdU9QS2JLYUcxeWc3eWNjeWlW?= =?utf-8?B?RTcyRmhoT1pjZkw2eTRjL1pvWWNTTVdtMmN5N0xCSlc0eXcvN3Q3dGtMd0F5?= =?utf-8?B?MHB5MFAzTjVUS0NQSWRGV1huUmhIUng1bEFMUzdnTHVCcTRPc0ZRWkMyZzZB?= =?utf-8?B?N29KWWE3OURVZGRHRDlIY2cvRXc3U3Zwc1FmQm85THY2c3F5V1ZJejYzRXVR?= =?utf-8?B?TjZKd1NnS2tRN3d5ci9HVDBWWENjWG1mdTNoWnJXbWowM0dudklPOWttOXQw?= =?utf-8?B?SmcrVkRJbDdTMnNKR2hqWGJiWitpTkVIcDBFdmpqWDlBRHZlQT09?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffee57c3-0247-4c5c-8283-08d9c24b2a77 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2021 17:23:54.2790 (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: AM6PR03MB3767 Subject: Re: [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 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: Zhao Zhili: > --- > 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 > a) This change brings the documentation in line with actual behaviour. b) This bug has been introduced in e4fe535d12f4f30df2dd672e30304af112a5a827: The mov demuxer did not abide by the documentation of the format of the display matrix side data (it had an incorrect transposition). Instead of just fixing the mov demuxer to abide by this format (which coincides with the native mov format!), said commit also negated the degrees in av_display_rotation_get/set. In case of av_display_rotation_get() this fixed a bug, in case of av_display_rotation_set() this introduced a bug. No one seems to have thought to actually test whether av_display_rotation_get() actually returns the degree. c) There is a test for this (libavutil/tests/display.c). It does not perform the test just mentioned; instead it has the current behaviour hardcoded in its ref file. d) The rotate_override stuff in ffmpeg.c compensates for the weirdness of av_display_rotation_set() by negating the degree. get_rotation in fftools/cmdutils.c also negates the degree, but it seems to do so deliberately in order to return a clockwise degree (both callers expect it that way). e) av_display_matrix_flip() is equivalent to multiplying the matrix with a diagonal matrix (with diagonal entries +-1) from the right; given that applying the displaymatrix corresponds to multiplying the coordinate row vector with the matrix on the right, this means that flipping is applied on top of the display matrix (i.e. after the transformation specified by the earlier display matrix has been applied). This is in line with my expectations of what it does given its documentation. f) Yet it is not in line with how it is used by the H.2645 SEI parsing code: According to the H.2645 specs, the flips should be applied first. Flipping (regardless of axis) first, then rotating by phi is equivalent to rotating by -phi first and then flipping around the same axis. This implies that the code in libavcodec/hevcdec.c, libavcodec/h264_slice.c and libavcodec/h264_metadata_bsf.c (when creating side data) leads to correct results if there is exactly one flip; without a flip or two flips, the sign of the degree is wrong. This is the reason for the issue in your other mail [1]. g) The code to create an SEI from side data in h264_metadata_bsf.c is incorrect. h) I don't know whether the exif rotation code is correct; same for android_camera.c. - Andreas [1]: http://ffmpeg.org/pipermail/ffmpeg-devel/2021-December/289488.html _______________________________________________ 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".