From patchwork Wed May 11 15:40:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 35734 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a17:906:70c2:b0:6e8:af56:9c41 with SMTP id g2csp3261175ejk; Wed, 11 May 2022 08:41:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiSkfenyP10DgD6gEfOGrt2x3wf51kZMSMKnA80VavBvFCtplwv9TuT6jPyu5hQ1pbNobR X-Received: by 2002:aa7:d8d2:0:b0:425:e22b:35c0 with SMTP id k18-20020aa7d8d2000000b00425e22b35c0mr30003496eds.181.1652283685937; Wed, 11 May 2022 08:41:25 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u2-20020a509502000000b00425ff2bcb8csi2403378eda.527.2022.05.11.08.41.17; Wed, 11 May 2022 08:41:25 -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=@outlook.com header.s=selector1 header.b=HWu45IFv; 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 E074C68AD28; Wed, 11 May 2022 18:40:51 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-oln040092064016.outbound.protection.outlook.com [40.92.64.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3087B68AD28 for ; Wed, 11 May 2022 18:40:43 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AkucqsoySSWtBR06SZNHmcRQSV1Ea+K94gWM7AcIuMd0by5gWU72B6xoAvb25MwfS7nMEA2+N6AhNDu+Fe4BLr0CFWx8T1mLaTiasbdknNJDQ14ku2U3qeQZEQWiLSATuor4aCv8QQ3qMkxDRx3ywynhjXvVYPpsxsQ+K1IEaQyk2FryYhQBr21CVtLkBsOfiBtxjfIIivT/HDEVTy2LaZnB5gqA0l8ayAENCAjqG1O965wEZYDOMjCnWrg37g76zGKq7kptQAzstehztdOZ/Q7jZ1U0KV4ptrFMy3xIyKEaXGG8vf7V/fzxkiLvLb4JhQllpTpyii3xqVqqOobe7A== 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=4XkhQCP/I1W4m/OIm+RdLhzquG60He/LZBCZ6Dx3pc8=; b=LxS9kTrNrk0RJox+uSFCgDuACFayLkSC5odxpfUPv9s44zbTWshCOKhbPQM3gja4RqMY8D/FH/OjWTdCEhOLLzwLpQQjoiW5/hFYw1ZtIYJN6uo//BLcm33AbDGvQGM09btafMLguWMTmBv7FcSxfF8RkV9osxdRVnMlCB1A5MI6J8PWzPtbOGsM11ZVonam9AyNVTRndY4vbUPVvcD/3wa7Pv+v9aj4uay/VoavMGUBdlqNF1+/hU1dd65ND8L4i0vipWj64kfavOgx6Gc7Lk6KqUhnNqa5u97YXm6IDvWBBLsZrF65VJHty5Qr3LVeaz3qMANnh8iASdNQUI72kQ== 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=4XkhQCP/I1W4m/OIm+RdLhzquG60He/LZBCZ6Dx3pc8=; b=HWu45IFv++JUvoJ1YM+Eltx4hSnCcRIghuftExZvdaUAWP+pHJmwuaXIlDb0louQaXx2u3FoG3id5FLi9maRbVa6yZnsJlC7jOXigM0pkXR/XgeMYQ+MJMtAv107YySI9BSbjuqK+yGVpdrsO6W1CYxoxJveiY1oTDEYViheL/VIxXYoc7NIbODTnE0jzSlX3fUrbYBVrwuUN2tyPYkIrLGRTcWKf4ZNpNoDUdxqkR3k5RHQ2ah4qWBdOwpYkOyeZCVutRRqAtwN7cCOJcfP3nu3Su4Utt/IErB5Wz4CRI7JxgJCf/BJaRxulh2Hkak59SE1iZW2aZ7k29gcwTTr/A== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by PA4PR01MB7534.eurprd01.prod.exchangelabs.com (2603:10a6:102:c5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Wed, 11 May 2022 15:40:41 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c%9]) with mapi id 15.20.5227.023; Wed, 11 May 2022 15:40:41 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 11 May 2022 17:40:32 +0200 Message-ID: X-Mailer: git-send-email 2.32.0 X-TMN: [eyPSYTtn8muwesxJVlQfy439ho7Ket2u] X-ClientProxiedBy: ZRAP278CA0014.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::24) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220511154033.814820-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9a07293e-1ea7-434f-88ff-08da33649a92 X-MS-Exchange-SLBlob-MailProps: +LiGfBxqLEtOq11dBndvwNG52fGNPT+6erk89ANjuCXkaZvCj9w5tliAtnqljeOnFH0KjFDMp0bouDi+8SkOyooLiNM7Llqv8Qt7sqT8tI9FAo+FyRz11auN/Hk3qfKcrso0DyMRtnv0Z7h+ntyXycwsKuAi0UwwgBYRFwfJTbImpzGEs83TpzTBSVHV/d44rlZyXWzLflt28rSFIEH9LernR96a3CgPHfdhBORdegzaItUPgCFEHvMFm5vAm4Nu4ETjGgXmETWIPf2ojvOu+JHX/6lB0tSWI3OX0DmYEMcy33Ua/6Sw+D6l+25pmyFVshFjyYf1TS1hnW2ye7iqKuDekNJCH3tmh1kW2Fj22yHrhDuWNI2DbdxdWADEJqRPq4aeYJCSYVrmhYgxrv7kPutwennvdaqDn6V3laxtykXbt0NF44eNM8WCYCJf1ELHH9pQGKmhff4SKKmwRs9zadM2SvBmpZQoBaWJ13r+ps5dxbMLlH5wENMKHdTuNIpPlP/gaikLFNsf4P86M4yM6Fe5IfNJ9leDgIWzZ8Y90rc7AY4k7rrC53/dXv1MqGn8gylQa2Y1YaksNoVk4J977g5gU7hBI1B9+Y5UU6JpHBGSmlw8HEz/nst5iOQcR1BBPl0Q1JywVfhVeyXLZvAZUAbcGPxrfXeAINfi9w7YohG8jgz6DVV0Ol62FYPw3NlYzu/oBWzoCe0wGu6NA2II26se7/XmyvAIUfA6ouPBb6lnNxWHufTh4KW4PYo+K5LZda3I6NqnZdSaGYHWPAOoCoBBa7eTBnyM X-MS-TrafficTypeDiagnostic: PA4PR01MB7534:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: scxadwe5B/csz+w7YXzu9aDL9RircBOPckztMzCwfmNSpyY7su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.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a07293e-1ea7-434f-88ff-08da33649a92 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2022 15:40:41.4230 (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: PA4PR01MB7534 Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/wrapped_avframe: Don't attach FrameDecodeData unnecessarily 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: OfL4AKgpdNpP It is unneeded, as this decoder does not call ff_get_buffer(). Signed-off-by: Andreas Rheinhardt --- libavcodec/wrapped_avframe.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libavcodec/wrapped_avframe.c b/libavcodec/wrapped_avframe.c index 3af007d478..06c274eed0 100644 --- a/libavcodec/wrapped_avframe.c +++ b/libavcodec/wrapped_avframe.c @@ -98,12 +98,6 @@ static int wrapped_avframe_decode(AVCodecContext *avctx, AVFrame *out, av_frame_move_ref(out, in); - err = ff_attach_decode_data(out); - if (err < 0) { - av_frame_unref(out); - return err; - } - *got_frame = 1; return 0; } From patchwork Wed May 11 16:17:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 35735 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a885:b0:7f:4be2:bd17 with SMTP id ca5csp28685pzb; Wed, 11 May 2022 09:18:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzK6ta9OK4OdQeQ3hkuS9tfwSQsgViAnawb5LH3zuQPQBlHDTVnys8QocRsd6y4VtFmdcex X-Received: by 2002:a17:906:4fd5:b0:6f8:5aa9:6f13 with SMTP id i21-20020a1709064fd500b006f85aa96f13mr21288860ejw.267.1652285922563; Wed, 11 May 2022 09:18:42 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ck26-20020a0564021c1a00b00423fc9d80ebsi2606243edb.338.2022.05.11.09.18.19; Wed, 11 May 2022 09:18:42 -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=@outlook.com header.s=selector1 header.b=a0tGvZxw; 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 D945368818E; Wed, 11 May 2022 19:17:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2027.outbound.protection.outlook.com [40.92.89.27]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 034DE68B2E6 for ; Wed, 11 May 2022 19:17:46 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cjOE7kYrf0WecssDqmxz3ofFIKB4UgdiEqF+fj/AeeePC1UhsbBAmzbYAurpUJSUyHw5+hgbg+u+5iaiRZ3G5jQKTUAA3rjqKYAhDNrxkWuvY6xKPvQ95Ft1aCiakjtpGZzrrqOFheG7GEKwlYbGQFmA3At8T8TiinwkYCuDv2ksKCbAX6sr58vEuRAg5RP9QnxHabJc5q8XhD8cLN47y4u0pBYLHfOpneV1+F8eQnN3iz6QNHQ7/kS+Xo66CepyMUpYZklngLXjvEe10LD5IE1GvH3DQPze8vrSo4kSVY0Nve5NUYFuRY7x2swsqNwnkY/JFWmgW/qkMO+2NVEJOA== 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=epGMkG0wnvB58+czMsOfMpums4u2zmhpAcNyXz/MF+k=; b=hQhyY2EbswNFXPQkiKP/fV9yvmQ6es4eOaD1VmheXvwzdoVyivY7ihbCUBNC3+J/O/nW8HNfsmsmmgrYK+7MlywkpxXGyWdLhY/ly9exMHfRjG0ajVZEPUkuTAMlrgVeB+a+hCGQyiV9hoDjMibSrJ3UqvSAVnzlGp0+uoaIFRYRr2qXuPGLdaemCkggCvh4IIgnUvxFakcedK+wSc+VUiATykIX5eWyZxzxCKrODeEzai9MXr2Uo+u6RdkzkzOmDAqA4A2YowMsLdE/tYDBnlA8Ifx1s5l/HU8Wpkd1ZKfVpiT5MVH0NSVpgQd9c8X0TTjl1fDTGw69UEVKfLqFIw== 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=epGMkG0wnvB58+czMsOfMpums4u2zmhpAcNyXz/MF+k=; b=a0tGvZxwxkIr5iEpkZ9UiVmtA8W9hTFGB5nwRh3GJ2jDne1HYKhXFVD9dNXDjuIebpaFMimaqNHVWDFqrXZy7K5hnEWMG59rKtJ5gM3oOJ9YDBXB/A5GMy/In0O3yuDdbdhQAz7jbfo7X1DXvaZMCf3xQKiMRsM6iBVJwE/mcPjdZMsa0B1YVJPSkO3gncJclLTwkB1V0FQQjXISrAwjOiPCXnNCx7OmR7xgJJJpCpyWar3U+Mc2cDEi5E/CnEYGj8qtRIstf/uXPbVXqzwSbAYK44L4luaCfoba0J9aheC1B7tVuXYnhk6tMXl322hHAr9Hbj6n8/3twDzOpVpnDQ== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by AM4PR0101MB2130.eurprd01.prod.exchangelabs.com (2603:10a6:200:54::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.21; Wed, 11 May 2022 16:17:44 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c%9]) with mapi id 15.20.5227.023; Wed, 11 May 2022 16:17:44 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 11 May 2022 18:17:36 +0200 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [iPYbqC8fWZ6JUhp+s8h4G12+lRM05HoR] X-ClientProxiedBy: ZR0P278CA0156.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::6) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220511161736.815366-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 57db3596-c916-4709-7d24-08da3369c77d X-MS-Exchange-SLBlob-MailProps: +LiGfBxqLEtOq11dBndvwNG52fGNPT+6yPSbbr4JCDJ1W3ShfqWNxo+73bR2U2dxFnSFZoqJp8r3qxVGFeXck+er+J9rPr4CxYZyhPT8OcEBHRZlDCXBY+LM+LTkDgaML//JUCQVMO6RaEjoVUbLqc28yU5q9b7PcUpzVLRUOFyO3EojoKztjGkSaMLUCqacuXtG4h07S1Rlza62EYYpTC0vGMJDHPscqL37Nnp4zoambwFKbiiQjSibircurn7vBCcch0xrMxVK5n4hC4Z3oTfD9eGTt5fprsRPh3EiWC3BSXh67LzwsU6wB4JTkOiG59qwIZnygbHZQDCCxKm75HcWH13BAdhQXer/i0dGaqkhCOW8I435On7BWLkzoG3ZniiMxdEcnOllu2sdRyi3hZx7SEmAbkIAg11I+vfNyhDV8mHqiZEBCLcFjsXxY7mzq2b4NYUgOqAB510JKssrcSOwZocRfFhoOPeorGqc0TKY9vrfXdhZ5C1IQy1WaznP+JYE98L4N/RMFsYxrK0tOmcJt4nHZ7rRLgnp4Fbe6WfLlfuKdLZ3O8PeboXo1qKWZLp3r1xCaUI5GkH5WO1gUNT9slYmJsyJArXARy9oHqQRVLTSYrHf15KHc7BkhxqT42OYTWFS+ujqIPwDQ0zP4i2sCQ/f/zJc2AXiv7axMx67/sYqZU322KunMlI+zqwEQn6QLqtNvkyw86viUQ1AP4GaMm2jj805rMIa0sLpi6ZJJIHeWetbktOlsonq4pTGSUjvdI2LTxI/oa15PL8QmRs58jwSqZJB X-MS-TrafficTypeDiagnostic: AM4PR0101MB2130:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SArxIjCOVjWHnCY4AZZUvez+Vvw8HQnrpJkuttB/ObIi0NBms6gsYcPhpTsobfuc5XfqDqLTNAN89HQ/7S4W2cEAHZPOLx5CSjqwi+adUe/Yij569dBoSXZT+9OyFRF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I+A7ROIwjHi+fI/fk3JL+yHK8l2iQP97P7KZlCPNsThbW7JyQO6UZYR94yOxcmfcYNH/YGgkPS39H2Itsmo9pP9CweSZL5S7DAmZXkzpCclyKZTNvcHE8qf3zJkYojPCUaYIgXbn1SP3hOzlNqt7AI6wOdIe9E1igoEsv8cr3ONOP/sQek3311FLy2vrKF9FHPica8p2ny/SnmkIsfL4zMUEUxNKDlmfemtAIHkpl4mI/PD6snLBxx04w7qRgdwjcuxUuEo8BINOzdkWofuMsLogcmQOPNybheERChmSHCsbn4XffHBtlqy4J0Ke4mArttoSDFsXIc1gHv0K0iKeRL3aVe8f7BjpnMl3J8V9YbmISIjmLW4WTQkq3gZSRnJ+9wlkfvjorl/jKFEacodyyeSSSciZbQqSEamg5vKlraF5ATZmMoRO8iThf0S7RDdZW5q/fHDdsB/60SU/fwrPEFXfTDlWwCWSg9o5u84QwQx2gPwHPAPJUNnHGLnl0Gu9/dUXpfiAs7C9SRp30wM3+4+UGb4S4iaUPorLugA/sanpEz5XfhjwOAfoAirinuuAONhf36oY8L6cRCqSPjWMySXzaIybeHhamo6TZ17OZKzOQIz7WYFT0T5eZgEYhk0VkRsIL+YENRRM84aGPzIDoZ/jwSk4ui1HbHe8COeLD3XHZoh1OYVwrQ+8pN3roFSVe8wNcKv8nnPddYrOHySKeFhQW7cv2f55j8/JdTsMUHjBZWI+u5bG3upMcHXhJaZ+4LiUCPo2xVdNRbyj2BvQRtyLhoEWzsI3KGkrz3zt9xwqhRipoy+k0cKR1Wkxod/NCW8MtR7Ki3zztiJ/KxN5rH6EQTJ+7LVvgue3abFK7gIdFGsLydxoRKWaSsN6SX+jtpxNWJ8mN6Q5nZyjQMNkATGksVm6dz7gg2kjQoTplxHQI2QyTKJsJmmcRJ7alu0CprSZ6N1PenyDSWRA6afdDUOerXZ5SQmxg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57db3596-c916-4709-7d24-08da3369c77d X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2022 16:17:44.0943 (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: AM4PR0101MB2130 Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/decode: Don't allocate FrameDecodeData if it is unneeded 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: PdgtS8oYjrPU Currently, every call to ff_get_buffer() allocates FrameDecodeData, although only very few decoders (those that might use nvdec or videotoolbox hardware acceleration) actually need it. This commit addresses this by adding an internal codec cap to ensure that FrameDecodeData is only allocated for codecs that might need it (i.e. for which there is a hardware acceleration that might actually need it). Signed-off-by: Andreas Rheinhardt --- 1. It seems that this has even been allocated for some encoders before c954cf1e1b766a0d1992d5be0a8be0055a8e1a6a. 2. Given that the videotoolbox hwaccels call ff_attach_decode_data() themselves, they actually don't need the generic part of ff_get_buffer() to allocate it for them; in particular, one could avoid adding the flag to the prores decoder. I can modify the patch in this way if desired (it would also necessitate modifying the assert in decode_receive_frame_internal()). 3. Unfortunately, I don't have hardware to actually test nvdec or videotoolbox, so only the "it works if allocating it is certainly unnecessary" has been tested. It would be nice if someone could also test the other part. 4. One could of course set these flags only if the relevant hwaccels are enabled at compile-time. 5. Unfortunately, it seems to be too late to call ff_attach_decode_data() from ff_nvdec_start_frame(), as it is called after ff_thread_finish_setup() might have been called, so modifying the frame would be a race. 6. Maybe the following would also work: Add a caps_internal to AVHWAccel and only allocate FrameDecodeData if the hardware acceleration currently in use needs it (as given by this new cap). It should work (hopefully) and would be cleaner. libavcodec/av1dec.c | 3 ++- libavcodec/codec_internal.h | 5 +++++ libavcodec/decode.c | 16 +++++++++------- libavcodec/h263dec.c | 6 ++++-- libavcodec/h264dec.c | 3 ++- libavcodec/hevcdec.c | 3 ++- libavcodec/mjpegdec.c | 3 ++- libavcodec/mpeg12dec.c | 6 ++++-- libavcodec/mpeg4videodec.c | 3 ++- libavcodec/proresdec2.c | 3 ++- libavcodec/tests/avcodec.c | 15 ++++++++++++++- libavcodec/vc1dec.c | 6 ++++-- libavcodec/vp8.c | 3 ++- libavcodec/vp9.c | 3 ++- 14 files changed, 56 insertions(+), 22 deletions(-) diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index 1c09b1d6d6..291ba94a36 100644 --- a/libavcodec/av1dec.c +++ b/libavcodec/av1dec.c @@ -1250,7 +1250,8 @@ const FFCodec ff_av1_decoder = { .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP | - FF_CODEC_CAP_SETS_PKT_DTS, + FF_CODEC_CAP_SETS_PKT_DTS | + FF_CODEC_CAP_FRAME_DECODE_DATA, .flush = av1_decode_flush, .p.profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles), .p.priv_class = &av1_class, diff --git a/libavcodec/codec_internal.h b/libavcodec/codec_internal.h index 5df286ce52..cefe3fdd1a 100644 --- a/libavcodec/codec_internal.h +++ b/libavcodec/codec_internal.h @@ -73,6 +73,11 @@ * internal logic derive them from AVCodecInternal.last_pkt_props. */ #define FF_CODEC_CAP_SETS_FRAME_PROPS (1 << 8) +/** + * This decoder might use FrameDecodeData. In particular, ff_get_buffer() + * shall allocate it. + */ +#define FF_CODEC_CAP_FRAME_DECODE_DATA (1 << 9) /** * FFCodec.codec_tags termination value diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 264fc66a81..33c97c41a6 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -548,10 +548,10 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame) frame->pts, frame->pkt_dts); - /* the only case where decode data is not set should be decoders - * that do not call ff_get_buffer() */ - av_assert0((frame->private_ref && frame->private_ref->size == sizeof(FrameDecodeData)) || - !(avctx->codec->capabilities & AV_CODEC_CAP_DR1)); + /* the only case where decode data may be set should be decoders + * with the FF_CODEC_CAP_FRAME_DECODE_DATA cap */ + av_assert0(!frame->private_ref || + codec->caps_internal & FF_CODEC_CAP_FRAME_DECODE_DATA); if (frame->private_ref) { FrameDecodeData *fdd = (FrameDecodeData*)frame->private_ref->data; @@ -1460,9 +1460,11 @@ FF_ENABLE_DEPRECATION_WARNINGS validate_avframe_allocation(avctx, frame); - ret = ff_attach_decode_data(frame); - if (ret < 0) - goto fail; + if (ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_FRAME_DECODE_DATA) { + ret = ff_attach_decode_data(frame); + if (ret < 0) + goto fail; + } end: if (avctx->codec_type == AVMEDIA_TYPE_VIDEO && !override_dimensions && diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 1f9f3e5e95..8160b394e2 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -769,7 +769,8 @@ const FFCodec ff_h263_decoder = { #endif AV_CODEC_CAP_DELAY, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | - FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | + FF_CODEC_CAP_FRAME_DECODE_DATA, .flush = ff_mpeg_flush, .p.max_lowres = 3, .p.pix_fmts = ff_h263_hwaccel_pixfmt_list_420, @@ -791,7 +792,8 @@ const FFCodec ff_h263p_decoder = { #endif AV_CODEC_CAP_DELAY, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | - FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | + FF_CODEC_CAP_FRAME_DECODE_DATA, .flush = ff_mpeg_flush, .p.max_lowres = 3, .p.pix_fmts = ff_h263_hwaccel_pixfmt_list_420, diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index d80bc6b17f..a7190dbfc5 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -1099,7 +1099,8 @@ const FFCodec ff_h264_decoder = { NULL }, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_EXPORTS_CROPPING | - FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP, + FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP | + FF_CODEC_CAP_FRAME_DECODE_DATA, .flush = h264_decode_flush, .update_thread_context = ONLY_IF_THREADS_ENABLED(ff_h264_update_thread_context), .update_thread_context_for_user = ONLY_IF_THREADS_ENABLED(ff_h264_update_thread_context_for_user), diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index f782ea6394..df5822f365 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -3890,7 +3890,8 @@ const FFCodec ff_hevc_decoder = { .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_EXPORTS_CROPPING | - FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP, + FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP | + FF_CODEC_CAP_FRAME_DECODE_DATA, .p.profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles), .hw_configs = (const AVCodecHWConfigInternal *const []) { #if CONFIG_HEVC_DXVA2_HWACCEL diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 32874a5a19..aee4871346 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -3027,7 +3027,8 @@ const FFCodec ff_mjpeg_decoder = { .p.priv_class = &mjpegdec_class, .p.profiles = NULL_IF_CONFIG_SMALL(ff_mjpeg_profiles), .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP | - FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_SETS_PKT_DTS, + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_SETS_PKT_DTS | + FF_CODEC_CAP_FRAME_DECODE_DATA, .hw_configs = (const AVCodecHWConfigInternal *const []) { #if CONFIG_MJPEG_NVDEC_HWACCEL HWACCEL_NVDEC(mjpeg), diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index e9bde48f7a..53c14a7a04 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -2877,7 +2877,8 @@ const FFCodec ff_mpeg1video_decoder = { #endif AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | - FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | + FF_CODEC_CAP_FRAME_DECODE_DATA, .flush = flush, .p.max_lowres = 3, .update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg_decode_update_thread_context), @@ -2910,7 +2911,8 @@ const FFCodec ff_mpeg2video_decoder = { #endif AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | - FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | + FF_CODEC_CAP_FRAME_DECODE_DATA, .flush = flush, .p.max_lowres = 3, .p.profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles), diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index e2bde73639..99d85495ea 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -3678,7 +3678,8 @@ const FFCodec ff_mpeg4_decoder = { AV_CODEC_CAP_DELAY | AV_CODEC_CAP_FRAME_THREADS, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | - FF_CODEC_CAP_ALLOCATE_PROGRESS, + FF_CODEC_CAP_ALLOCATE_PROGRESS | + FF_CODEC_CAP_FRAME_DECODE_DATA, .flush = ff_mpeg_flush, .p.max_lowres = 3, .p.pix_fmts = ff_h263_hwaccel_pixfmt_list_420, diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c index dba64a2489..64a38a2a14 100644 --- a/libavcodec/proresdec2.c +++ b/libavcodec/proresdec2.c @@ -882,7 +882,8 @@ const FFCodec ff_prores_decoder = { .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context), .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS, .p.profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles), - .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_FRAME_DECODE_DATA, .hw_configs = (const AVCodecHWConfigInternal *const []) { #if CONFIG_PRORES_VIDEOTOOLBOX_HWACCEL HWACCEL_VIDEOTOOLBOX(prores), diff --git a/libavcodec/tests/avcodec.c b/libavcodec/tests/avcodec.c index 08b5fbede1..1ed7eb0a90 100644 --- a/libavcodec/tests/avcodec.c +++ b/libavcodec/tests/avcodec.c @@ -20,6 +20,7 @@ #include "libavcodec/codec.h" #include "libavcodec/codec_desc.h" #include "libavcodec/codec_internal.h" +#include "libavcodec/hwconfig.h" #include "libavcodec/internal.h" static const char *get_type_string(enum AVMediaType type) @@ -146,7 +147,8 @@ int main(void){ FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_EXPORTS_CROPPING | - FF_CODEC_CAP_SETS_FRAME_PROPS) || + FF_CODEC_CAP_SETS_FRAME_PROPS | + FF_CODEC_CAP_FRAME_DECODE_DATA) || codec->capabilities & (AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DRAW_HORIZ_BAND | @@ -170,6 +172,17 @@ int main(void){ !(codec->capabilities & AV_CODEC_CAP_FRAME_THREADS)) ERR("Decoder %s wants allocated progress without supporting" "frame threads\n"); + if (!(codec2->caps_internal & FF_CODEC_CAP_FRAME_DECODE_DATA) && + codec2->hw_configs) { + const AVCodecHWConfigInternal *const *hw_configs = codec2->hw_configs; + for (; *hw_configs; hw_configs++) { + if ((*hw_configs)->hwaccel && + (strstr((*hw_configs)->hwaccel->name, "nvdec") || + strstr((*hw_configs)->hwaccel->name, "videotoolbox"))) + ERR("Decoder %s has videotoolbox or nvdec HWAccel, " + "yet these need FrameDecodeData.\n"); + } + } } if (priv_data_size_wrong(codec2)) ERR_EXT("Private context of codec %s is impossibly-sized (size %d).", diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index a7d556c378..8ea9903350 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -1212,7 +1212,8 @@ const FFCodec ff_vc1_decoder = { FF_CODEC_DECODE_CB(vc1_decode_frame), .flush = ff_mpeg_flush, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, - .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_FRAME_DECODE_DATA, .p.pix_fmts = vc1_hwaccel_pixfmt_list_420, .hw_configs = (const AVCodecHWConfigInternal *const []) { #if CONFIG_VC1_DXVA2_HWACCEL @@ -1250,7 +1251,8 @@ const FFCodec ff_wmv3_decoder = { FF_CODEC_DECODE_CB(vc1_decode_frame), .flush = ff_mpeg_flush, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, - .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_FRAME_DECODE_DATA, .p.pix_fmts = vc1_hwaccel_pixfmt_list_420, .hw_configs = (const AVCodecHWConfigInternal *const []) { #if CONFIG_WMV3_DXVA2_HWACCEL diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index f521f2c9de..37fe4cb611 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2967,7 +2967,8 @@ const FFCodec ff_vp8_decoder = { .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | - FF_CODEC_CAP_ALLOCATE_PROGRESS, + FF_CODEC_CAP_ALLOCATE_PROGRESS | + FF_CODEC_CAP_FRAME_DECODE_DATA, .flush = vp8_decode_flush, .update_thread_context = ONLY_IF_THREADS_ENABLED(vp8_decode_update_thread_context), .hw_configs = (const AVCodecHWConfigInternal *const []) { diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index fee79fb45b..244dbe8aa6 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -1878,7 +1878,8 @@ const FFCodec ff_vp9_decoder = { .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_SLICE_THREAD_HAS_MF | - FF_CODEC_CAP_ALLOCATE_PROGRESS, + FF_CODEC_CAP_ALLOCATE_PROGRESS | + FF_CODEC_CAP_FRAME_DECODE_DATA, .flush = vp9_decode_flush, .update_thread_context = ONLY_IF_THREADS_ENABLED(vp9_decode_update_thread_context), .p.profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),