From patchwork Fri Jan 27 14:05:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 40140 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3ca3:b0:b9:1511:ac2c with SMTP id b35csp1372562pzj; Fri, 27 Jan 2023 06:06:17 -0800 (PST) X-Google-Smtp-Source: AK7set/H42SwEp/TF1m720dRDzELzVoJECeL0AefZNOlCdgWLtNK0vrp0Q6pOlvXdTYNxt3r2isk X-Received: by 2002:a05:6402:2b97:b0:4a2:fa0:e9f0 with SMTP id fj23-20020a0564022b9700b004a20fa0e9f0mr1530771edb.32.1674828377278; Fri, 27 Jan 2023 06:06:17 -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 f25-20020a05640214d900b00499b2eb6a0csi5207113edx.348.2023.01.27.06.06.16; Fri, 27 Jan 2023 06:06:17 -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=IwyXbMVh; 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 0A8C368BE15; Fri, 27 Jan 2023 16:06:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01olkn2030.outbound.protection.outlook.com [40.92.64.30]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D172468BE17 for ; Fri, 27 Jan 2023 16:05:58 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cscyUOoQ/93rmVKQKLPLiZTugKBC9F8YbHePhK1VOgieTLxLkUvyE/vyUi5870pqsy84ahFInU9wkrH56U+kaNJDcsBQlrTk1GTPzHF7rCUWv9SDnTJnEXMkA+RYyePT4YZcpgperAzXrp21wO8tcarPvmDHpRHkq6Bnsmmtv4hUEZmafDnjaikyWnQoaUcFUga6Se+nx+HVNkDSDWTi7afhhOshWvdJLBpg3rd5B4BMkEixQXSUftsRQ26LWNRGzNcxDNHSATqMsyF1F0UWUiBuardIqQMxuWndFLyvqJPnUcvkerywLn6QWCvgrqzPxxnaA0cUtQpWu/czXAgQwA== 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=Bmhfa6Q++5iemDDQ2eN6Cwa54/Nh3ZM5Oj2rGvy0iHo=; b=leal/OVnGZWrguPshYZRz3IV/w8eDpZznpo5rMAno0u4A6NdygjLlXkk982xf+rkpKveRtO1C/hhItPWe3a7XRTfu0dUCeaWcgm0gpglfYBFslwq4ZD2UVtrao/FZg6lqJGaAX+k001l0Ptg7oxDoCnFY8tPlK0V+AlejbCk6EcRoktN5KVx9K5e/plSA1iAvf+s0i5HdvM1sDDlgRDeGnv0njeprYP4w48Vdha00SBX7QrhVqkJgYV7IfIWZie4ocWUUkYgzLyqvQKUcHUV/1dDh3A/7h9luwQZY6yEprNqaVfiK35bjnqz+OBp2x6juRITgqWv9He5A4fmaq73Xg== 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=Bmhfa6Q++5iemDDQ2eN6Cwa54/Nh3ZM5Oj2rGvy0iHo=; b=IwyXbMVhUl58RuxSSAaltuT+ATvVH4DjHcNx7wB1iIPRrypQSh/72yIz9iCjJiS2C+7f4NEGTxC4jffq/1+lRYFHtMXulVBZFeGAhHf2MFi5PcN0DV08RXtkXJ3h4lFtaJA79g4a9OzMnItIki7Fc7kVEsCvXVzJxDBlxrsZXpaC3bBEXWTYi9OZStD8mWcvvn1pjT7aGEIw77eOkxB/QkoTVvZLVxpvdg3QjvbR9Mkx9oWtXRZrUjW+vpUYpBeXnpehJWFAPD7tHWwWXboXsxcfCC9fwILXfsPeFFcsep1KWs2fbDV8oi0qh3phdYDhuMNgS26u7ZRegU/lvMEJlg== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS8P250MB0741.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:539::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Fri, 27 Jan 2023 14:05:55 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::a65f:2ae7:256a:ab96]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::a65f:2ae7:256a:ab96%7]) with mapi id 15.20.6002.033; Fri, 27 Jan 2023 14:05:55 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 27 Jan 2023 15:05:57 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230127140600.2831578-1-andreas.rheinhardt@outlook.com> References: <20230116133840.512-1-jamrial@gmail.com> <20230127140600.2831578-1-andreas.rheinhardt@outlook.com> X-TMN: [tFw42GG/97/a9IpwfgacFoqZBeGLJRbG] X-ClientProxiedBy: ZR0P278CA0164.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:45::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20230127140600.2831578-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS8P250MB0741:EE_ X-MS-Office365-Filtering-Correlation-Id: af9d86e6-c5d2-4cd5-79bc-08db006f9b45 X-MS-Exchange-SLBlob-MailProps: feAVlmA1hHWlOSagzVRxqnsqSmj0ilpuA2007RcTfzDrboTRZ5zAOttrdmHP7w+zSwMzYIsxURtOEKQa2JscBEZJyS+D1mX6miJHFs2Adl6KZEEazAjHLgAMxm+ynHApTcgh0lwUgbbbXa7jd9973gAV3tDwbLbknXlV2+9JXTbk8hDVfXv9UvrDxrGNdO6W7Po+kxTsD2qLK6dcPuXnTdsNrlzDOjWaujcY84vwIxqjrCx0P6pwUf/tPepIKiagAJ7TyQcXosfo05Cm7ORq1nOrGZCrQVYR7CEvmegq8OQHmH3gqsjURjsPngIJVe4vnPWcNbpsP6LwYgsDWFXWykGQbwqeczglVYvJIYJWtwXSb6CDlAXxFiwonI1AsH7mN8LE60YCYE/X0KWH8JjF2TmV4nFNNSKpPpIwovmDVHhj5zX2AJY91JpipBABqZzE7zPCNJQK+TaFBKT+W/tLhpY2oF87yvO7fVLXNnjTykBcUpdrkVbVXwK5PX1lD8lMDLZW3OODeQuWIRh3FEQXSqu0Oq/AtiZU3tBpuK8wGi35zmY973XYmXZerMHVtxK0Vi+IGbPAV4ak1HGwO00olJwJcMBmxz5TxuYDA3QKQHNvoJLSF6oigFaAFFk9iASAG1oBYNXKXaPZH0ZhOkUXso5XSwSs4db2vwvusxeO6YTsPb3g+qfrS4sAoyWOBNkH6fqSRMiZsNcBFTIGLJ+DEQ== X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4Pc+6m2E+mY7QCvb1kqadMilT++67MENOgHBzAPm45q2KoPG76nRhzFFIMWYF3hux2Hca7GH/NKUw65SHELHnK34tHl7C91deRSQl5u3LntJAeAXEjlcw/F553D6D8/xAZcWLZ2aJZ2NqMpXKnWjv1FHfq9IA7WG12R78SINA7BeHBPmi8XBLHGU50pr6a995K2qTUVregVbRJOSmMqWTcTNKZqfezyLjrFwnrgWcctoWLRXT2Q2en/UHt56jkeeKukV9MX2jZRHwEAR5eoqWHY4eYCOhjyt8Z2BrExJ2RzJ5ACpcelNG18lT5MWqGw+X0aMenhrLLyN2aWT+7GkTrI+y9X7pHxhdTNJouPf7d6iKXJKKCsK7Jflq1BRMXPpNmAZZ5bdgE1/ZmKWzAvK8dY02G/o3jDBUHBFhNwAMD9d9vsWW+epne9y0OWMDRNwydjvxk9zCN55d3ADSZaF8xAEJEOUUMbkswnWMxLOccibz5OseyY81GZl1F0kQapFLhHmOZUCg5Kz3zIBjAxjpscrBmKdYDezHgIyrug04twKGxSiGpbfu2Up0pxusrY8qYaOBmF6yjbljvazPpKoCdob/Bz406eV505RB3Dpi5B3OJqUwysMkMTh6PnsWumpCE+0Bs+4T2wxXCTI+A4DYKrYPoIlwWWqDm+RG1wnuII= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: thtsdz8FTeUs+X1waeaR6qOo+T7dv+AJmpa+qEKfXBhI+SgsnBXCjzFDzwtpuYhoDa6akSvGcS/jp+vc80iV5XlHLtdKow7JUiPLKXdUvODiI7U+4ISvEz8RBjqk0tywG3hJkWA34rzGv/6XL6vUKBAGyedWA4l9cHIwEI5NBzvmQU6ooOgV1o4c7IE402ViZz2WED/983IJsxzxG8RmurGSJ2hL8FiQL+ElwEdq70ZSCIm7I9XllDh6dr5o7BZ13tuMXNTtn8v4NNjvsfjj2BVkKN4+oAt7ktXNy0X15vWLWBjBtBb+5jeHF1W9nzB9yeDzuuq6qEfQ5tNCgE+NhtlwJuzvQE+bMdsPWkFVDGth72cOpzTl1ExSqMd4pswAHopQtbOFljMNEn+Bwt9w8mHPjry7/u1WpG53tkc2VtyZQXqhdS/qWtTQA6mxZOw/9ZXe+TZBziyF2RI0KzlpBiNNmgtgHk6eNSbFLU0kRNzsH8fbskQcDwcM3WBG+p4VDGB0UENYALLlapX/InZE0zoopClTJS+/V98gDa3fVSn7C1FvUoYShuLZ4U9PtqdO3fREa3S5BbRF8I6GzCKXDwDil9vHWkcew5ep9fHhNYidX7TDJPqsJU25snou61vf8UCTPHm4mP1bjf06SPpxoeo0GOB+NfW5TIvdevws7f7Ie924EGucQjukfgK8vWAj+woP9uHTF1bn5WR/RI+ol0omzSBTE+9wRttpav4NwM8CNHNcSlJMv4+JWRHr68ZJkShcrYx0mt/SbWAd4VTNp9ANLs/f0e0y7yL+9yY/LVe7gzM53vHs/OnTmDYbMLFDNKnUdgY1048DNe8na7XUSu/43BAuUzsZPfTseZ1BOiquZ6ZbZtSHwwyEfL1xDqni8c/Q6rf1E3BelimwQKigOD/KyGd3hUogsaSoYbl8yhULEk1GC4vgw+3ZFCFhnpPyD2YQjgcM0tIrc1w5DxYiphLcrieIbuwkG6kEkEyg3D5MR4ALc+PMgPe5hPwCpt58K2a2NuS+62EO/nz2qBM1TVX0WB7nwN/MYuE/DO91/Do4UPSfa06jbShdeC0iqxEsRI+m/GAz7aylq0z+3uXc91mReoOIKCuRuOeCtqFlzCNn4uaOcWpc7Id8RbP1OigegzvITW5I8lzIoZB3kp8J03Za8CkMHKy/zBibtJkFN+XImVxyR+OXX6ElwmA2ZUdMX/37yZGGG1G9EkENh2U+Q3iKedVaeYUA3HId0lKir+vkh4/PyRmMzWQUqGCIc8GeGz7UIP5e55KLeVDLlQVAV7E+IlBQRJOQj09u7OysBBc= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: af9d86e6-c5d2-4cd5-79bc-08db006f9b45 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2023 14:05:55.1479 (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: AS8P250MB0741 Subject: [FFmpeg-devel] [PATCH 28/31] avformat/avformat: Move codecpar up in AVStream 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: idWCFV9t87gg It is the most commonly used field and moving it to the start e.g. allows to encode the offset in a pointer+offset addressing mode on one byte on x86. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 020906c94d..38578a08e4 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -960,6 +960,17 @@ typedef struct AVStream { */ int id; + /** + * Codec parameters associated with this stream. Allocated and freed by + * libavformat in avformat_new_stream() and avformat_free_context() + * respectively. + * + * - demuxing: filled by libavformat on stream creation or in + * avformat_find_stream_info() + * - muxing: filled by the caller before avformat_write_header() + */ + AVCodecParameters *codecpar; + void *priv_data; /** @@ -1095,17 +1106,6 @@ typedef struct AVStream { */ AVRational r_frame_rate; - /** - * Codec parameters associated with this stream. Allocated and freed by - * libavformat in avformat_new_stream() and avformat_free_context() - * respectively. - * - * - demuxing: filled by libavformat on stream creation or in - * avformat_find_stream_info() - * - muxing: filled by the caller before avformat_write_header() - */ - AVCodecParameters *codecpar; - /** * Number of bits in timestamps. Used for wrapping control. *