Message ID | HE1PR0301MB2154D1D2F3257F34097085F98F439@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 e20csp3457827iob; Sun, 25 Apr 2021 15:35:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjrMCrkbf86HLza2jkDW60VGJOuOsEMElP2lfEWSZBUNh+8SX1uFt1OpR4W+bwJpH3LlMX X-Received: by 2002:a17:906:3d41:: with SMTP id q1mr15267611ejf.282.1619390134541; Sun, 25 Apr 2021 15:35:34 -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 g6si11094837ejy.703.2021.04.25.15.35.34; Sun, 25 Apr 2021 15:35:34 -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=GAdbAbj0; 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 D70F168825A; Mon, 26 Apr 2021 01:35:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065047.outbound.protection.outlook.com [40.92.65.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 816BF680CDE for <ffmpeg-devel@ffmpeg.org>; Mon, 26 Apr 2021 01:35:12 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HLM9weu7kZTcYk7LxN7ZNM45fTiL/gz5sn6gVvEx40NvXotPzj4tsIBRG/xfVMTWFwakNnBOO1HVKUkhj0tiUbU15ySUQT24Vmof8tAxLL3vsw0dOVQnCWJe+AYd+ZXcdK3fIRF2RrrwqlMJkmV0CkAS/L1gslyD84CTDxqx/pN5BXFyXxpSQUUK9SqguPXwBMfKYaZf/MYFg/Jcz8XoGmTcIZUItHz/AUQfnjKB315+z1GiGsHO8bvcdlqmdxtXSrM0RsO0XmEoYqUtzPagMkDahKI+FAVdskQIbSpC4Yj5REQv84nuRzp4H+Zg4B34b0Qc65oUTUPZPTKYCV1I7g== 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=t9nifGL1GXQx6TyeJlJjKLHfwNMeoa/fwS0Uuivsfyg=; b=ZolBrYGvxfeLJ5m7pNhQcMVjKIjPSAQ0eiCfpMdqq/OdOrKPASuq32IEhFXxeHidKCVxncnDu8ppj39nD4jRF9TUT4lRwxhWm7k9lgHmCimyry14hzVvw0u+9meH92hmsJA95mTwvCKZF/UIVG7Afg4wFmiTEB/0sFCaKJBPBPIkhV5HtpMu+NGwnSR+BNDvZ16Zl8VSjzOQSj1Ptv0zA09qkrw5xPREnBiOQqHd1TmbR18kPYov/bAI6k0zTd2VSXNieSPdSIhngqfeHowf9yNa8mIjtqDZlp+WOwrBEfAfUJfqv0Yb3RATRwHDJVcWxf3eejKYLCd0LdjV83LEgA== 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=t9nifGL1GXQx6TyeJlJjKLHfwNMeoa/fwS0Uuivsfyg=; b=GAdbAbj0dKtc+MlBNf56Ni1REdEhhC1/lRnSz+19MZ5FWEtduTj24HDVOdf7YYNkOwxfkgwCU8FjN64J7CMbtYRu1lR4LitnvOSvthBfz0u3vXfVFWZr6u0I+DrjnCFP5nX77j1zrqNsn1jBUUyQpYInUd7glBuUCs0RK+GASJx0T6M+AA/NjpoWUdfAa4I2hPDfYmMVKptjXzgk8NDM1c8CzeCbxM17A9uibtDxXP+5tXHPZHWIfUa+aIHNWTNlahPXp5g6ns20SpGnT4YQ31nU77kZlpuFyBC+L8QTy8KIaVAP+55/mWGKtVj+iOm9YktyBqcn7JOkJpWPhiq8ew== Received: from HE1EUR01FT030.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e18::4c) by HE1EUR01HT016.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e18::351) 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:35:11 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:7e18::44) by HE1EUR01FT030.mail.protection.outlook.com (2a01:111:e400:7e18::170) 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:35:11 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:2C6CB995B2D7CD08B9C8BE280E8CEC3E88CCA28DF6CF3E01DC03DBC92B31B699; UpperCasedChecksum:2B12E709B60792DB17D06C9346F9394F3DC95CD7DC702071D5FB1F46ED808D71; SizeAsReceived:7571; 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:35:11 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 26 Apr 2021 00:34:18 +0200 Message-ID: <HE1PR0301MB2154D1D2F3257F34097085F98F439@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: [eACg2galiuGB0AgSFV0Nq4xkdPmd3R2G] 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-3-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:35:10 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8bb27921-8255-4df3-9485-08d9083a62e2 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNWJWQ5lR/nEnbarXZJSK/i4ioRHOXMcivVN9yGKoXmGZRB0BwRU1Pml+HTvRy0X4M1G9eUtoFT+dqbZVO/74i4j6olWDL4d1PN73NfVbdYltUHjVHounkT8vHjZXR+ywBtoJcCphjw4D/7duhVc59yTbGRr3Ebc58/5I805iK2LWM7lNACio5IHrdmud8TWgGStvsscIONZb4LYMPwipMkzhjcVR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zpc08wBvoinKbSENncu0HuIjQ2qWBNbPyruy2MjVEvrzPBYWh1Y+uUG3Sz0KMWSDGaKYFX6OFq06fnzCk6zpyqb9oGbhVl1GWxstDg539rzLtcFLNxwg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bb27921-8255-4df3-9485-08d9083a62e2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2021 22:35:11.1846 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR01FT030.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: HE1EUR01HT016 Subject: [FFmpeg-devel] [PATCH 04/34] avcodec/bmpenc: 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: YF8r7py9xErN |
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 | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c index e829d68475..867a53bd12 100644 --- a/libavcodec/bmpenc.c +++ b/libavcodec/bmpenc.c @@ -118,7 +118,7 @@ FF_ENABLE_DEPRECATION_WARNINGS #define SIZE_BITMAPINFOHEADER 40 hsize = SIZE_BITMAPFILEHEADER + SIZE_BITMAPINFOHEADER + (pal_entries << 2); n_bytes = n_bytes_image + hsize; - if ((ret = ff_alloc_packet2(avctx, pkt, n_bytes, 0)) < 0) + if ((ret = ff_alloc_packet2(avctx, pkt, n_bytes, n_bytes)) < 0) return ret; buf = pkt->data; bytestream_put_byte(&buf, 'B'); // BITMAPFILEHEADER.bfType
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/bmpenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)