Message ID | HE1PR0301MB21546412F1D0E07372CE90088F439@HE1PR0301MB2154.eurprd03.prod.outlook.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:5014:0:0:0:0:0 with SMTP id e20csp3459736iob; Sun, 25 Apr 2021 15:39:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws11NVshxP/KyhQTkTve95EXNFJ/6vPflttkPd2ZDLNp8oo0LJYaRIQr9TGPhOGfxwhSzg X-Received: by 2002:a17:906:478c:: with SMTP id cw12mr15603891ejc.5.1619390370687; Sun, 25 Apr 2021 15:39:30 -0700 (PDT) Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x5si5032530edd.464.2021.04.25.15.39.30; Sun, 25 Apr 2021 15:39:30 -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=TCMSXaGq; 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 7906F689F19; Mon, 26 Apr 2021 01:36:19 +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-oln040092064099.outbound.protection.outlook.com [40.92.64.99]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 386AF689E94 for <ffmpeg-devel@ffmpeg.org>; Mon, 26 Apr 2021 01:36:17 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KdzzUgVy49lkrN3vrCtsc4sTMeZJFomuJQTmLrurw7W+8qKNvLX2y8mv7nnM344vD0FEVe1SEFaYOzjD0o214Cshx2mO/U3mGO1P8/JroJBDpBj7ii4r5GZrHJSWXQMMt3OTtR0dVDQ3m3KdSg3QQy8aH/TUsHzQnqhEf2tkQQFvsCMIYm2DpYrgPBb2bUcmBtmBVdJ89+zjymgTaky19arU7ta2G6uKJFkKVAOIsZvjF9DQraJgG4GL+oIkScaEESF53Pnf8On2/G9+03mEKT4YE2O40d2Tp8eK2KL8OJ3wBHYIeV/Ktmet8EYyHWk63ICdBkjkM7+vFFQsfrQQNA== 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-SenderADCheck; bh=8tkH9s/ocBaTwPzkGdE+X1egGt+e+U0lmxHHtzX5vfA=; b=MMyXc4HpKVGahF4ydFcbXopN5qvoUTx5cUl7j6E00fKi3Eg0wMoCRw7NVG3v/8iB9gFLcxIAHE8FSNtSqsp0bp5EsXcKNmUpkKyNDVv4iPa5H4/EjqKQwI6jelrOJXedz6TShO2MiYCxWbhuqdJgT9WmZglyyGCl246DhIkMoSfd+f4tQFJxT7dKFyaaxE24TxRPGuO42Qu/ONZM9nMVTLKORInqo7hLIQ10vLYkcO6g2FaTfQkNf9CyPFpD96xaXE9n0GPIDFnzSDyeEMKI9+ggJBVt9C+n6d2m4F5DU0VVrPnJFmKKOxqLrWW7uPlIDQSs0O99A5X5pB65jpwQRA== 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=8tkH9s/ocBaTwPzkGdE+X1egGt+e+U0lmxHHtzX5vfA=; b=TCMSXaGqBSebO7ikJwZSXxKcs1kvuONFEjXebWEmpwyY/kMXcm2ABKwZPzJtYLbHaB02xygqvJx4ssECu6m/NV06QPr3S9xTfR/4Zq2wEni2tX+cu1laux2Lv86//EYd3ui6/FqgezpIZr6oGaLPQIVycYEEnIV3Bxh+BiLpOCZ8qf/Y8HoslNNmtiXWclnn4Zxmnrf2Kxr/mlaubW/uYFi7SP/82Fekq2B0sfOCEs2LN5u1mUK98Pu5sID4YAgUtl7nnj/GRgjzAFVr3AoNaCicNL53zDQAmorWl90cnijNOrAwaj2kLXvX+5hg7Jb6ceNyR0oApVdrhntlPqNm/Q== Received: from HE1EUR01FT054.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e18::41) by HE1EUR01HT237.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e18::397) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Sun, 25 Apr 2021 22:36:16 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:7e18::4b) by HE1EUR01FT054.mail.protection.outlook.com (2a01:111:e400:7e18::317) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Sun, 25 Apr 2021 22:36:16 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:25E2262486621BB2177AA5C0FD3B5DBAF5BCF4A0E81D911C44800DD0C03468D1; UpperCasedChecksum:E31DD5CF119F64D5DC571982900589C1AF661AD17C607A905DD88C2F3D428934; SizeAsReceived:7585; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4065.026; Sun, 25 Apr 2021 22:36:16 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 26 Apr 2021 00:34:44 +0200 Message-ID: <HE1PR0301MB21546412F1D0E07372CE90088F439@HE1PR0301MB2154.eurprd03.prod.outlook.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <HE1PR0301MB2154D98403AA87DB5AA09D088F439@HE1PR0301MB2154.eurprd03.prod.outlook.com> References: <HE1PR0301MB2154D98403AA87DB5AA09D088F439@HE1PR0301MB2154.eurprd03.prod.outlook.com> X-TMN: [gZpOpj4HVXECMvXWBV3IqE/roSeGV8cb] X-ClientProxiedBy: ZR0P278CA0100.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::15) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210425223448.130684-29-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.193.248.86) by ZR0P278CA0100.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.22 via Frontend Transport; Sun, 25 Apr 2021 22:36:16 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 49c5d6aa-4d03-4008-c872-08d9083a89da X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UKBTepCewFwVSkfoADfkQpyLSgPZ3++pmPQkBV3P2RHO+gHqqduv/mkcxV7e2awExU6LuPNH93EIxihnpS4/HMWxcVeAHk8rXSd++n7uCsK2Ma3ZT/wdU+OE309psr1E1nndYkzNT3wOtqhiGzyT99uEQ8T2vek5f1vHkIi86lL9vxPHud8lbSqncF89tPRmm+2wsxjYlbfNXQG7Hkk2swaWrwa5VweAqZU2M9z0LPYWf3NI3ry8NqWRg7KzwhlKUTVjK9ROMwE1u0zLShDZAqTwkvmlrStk2DlWSslS09x1DEIscJRyU69HUBsPO7JEDFoa2RRB3eAff8WnrTaKbrGBZ0ABWh8iKr6MusmTxNSsP51qLB9Retba78D2SKggynsbXKT5vM0q1DqUA5xpTDOHIjT/41U4IE49PW267fiAVrcCkDQ6PmXMT3RMmi1g22Wirtm/NK6ECjEhm4gO9wWL9VSNdMFfhH5Kz1cvm8Xjp4tQioPP1zUcP75MbB3zTIEigeCz2ekezoRytYSloRFLEVGqQE71OGzoJO3e2monU1BfiIuISmSbtZc4MOdqudeY0PN/gKj9/VkTnKrWenyFFg9I1PdSq6U5WihRJBoPj5ze9OK5QNe5Gh870jjZi3zQaljKfQTyhlyuqR3VosTEO2+Nv0DaSzKadSkqWa72w5qR7xPaDY6UAdu08vYWTSX2TRWO/s6wg== X-MS-TrafficTypeDiagnostic: HE1EUR01HT237: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vjoZFxduZxowhc1TVu4na6zWZTFlJhLC1q5bbbwLMrowuaeoZd5pVggm7GvWsvnKiQv5MTwRUffXB09/xrXQF9b4AYP7o6vk6ZLTCHYChORHD2CHz4g8AdIL+ENmm1gxwVe7dJn4FVlw8djG1SqDDC1QTFdlEEPVBMr6V1d8W0ymcOKnAMitiZ3k1tHzTT4wm/vmho8fffxDssyShSDQrY+Wv8zNhBCBgskvvJZFwxFX8KvAhd1CTJHhc1zTJwofeR91hxHJGG/nKaKzuixvXNfMDknVw7ivF9wyQWhnRwzxSEGWJLfehLs3F5CGOsS2WifRwpEF90RbdmFU7FE8DZ4F+v8nWWhhan/KYfG1T96He408b5fzkFucxgjlmvxfCjPF/IMX9r56KyQ34OPRkA== X-MS-Exchange-AntiSpam-MessageData: JDBuWeFPA573x5KnUpxtaZikU+QVEipJXEqOPsbqvjCLw+NdVq7d0kNl1/40xv83jwRwr4AqFOYujRm3F9Zoa1521/sRRlPo3YNvP+GU76SE0UGVAPi7EcvE+7z1PbRc231P5zb3JGlhYzYsMeX1ww== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49c5d6aa-4d03-4008-c872-08d9083a89da X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2021 22:36:16.5667 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR01FT054.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR01HT237 Subject: [FFmpeg-devel] [PATCH 30/34] avcodec/libvpxenc: Avoid copying packet data X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: L7vbW09KuDBK |
Series |
[FFmpeg-devel,01/34] avcodec/adpcmenc: Avoid copying packet data
|
expand
|
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | fail | Make fate failed |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | warning | Make fate failed |
On Sun, Apr 25, 2021 at 3:39 PM Andreas Rheinhardt <andreas.rheinhardt@outlook.com> wrote: > > Here the packet size is known before allocating the packet because > the encoder provides said information (and works with internal buffers > itself), so one can pass this information to ff_alloc_packet2() to > avoid the implicit use of another intermediate buffer for the packet data. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > Will get rid of this unnecessary level of indirection in storeframe() > after the bump. > > libavcodec/libvpxenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > lgtm.
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 3f36943c12..f852642ce8 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -1185,7 +1185,7 @@ static inline void cx_pktcpy(struct FrameListData *dst, static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame, AVPacket *pkt) { - int ret = ff_alloc_packet2(avctx, pkt, cx_frame->sz, 0); + int ret = ff_alloc_packet2(avctx, pkt, cx_frame->sz, cx_frame->sz); uint8_t *side_data; if (ret >= 0) { int pict_type;
Here the packet size is known before allocating the packet because the encoder provides said information (and works with internal buffers itself), so one can pass this information to ff_alloc_packet2() to avoid the implicit use of another intermediate buffer for the packet data. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- Will get rid of this unnecessary level of indirection in storeframe() after the bump. libavcodec/libvpxenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)