Message ID | HE1PR0301MB2154185F500120BD442BC88B8F439@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 e20csp3459855iob; Sun, 25 Apr 2021 15:39:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiKn8j8hadbwGvzmYFeAdZ2WW+ic+JZ4qmR+hH9tMt3ThqqniB1WBKqXV4dHPOoQCqm1WC X-Received: by 2002:a17:906:578a:: with SMTP id k10mr15561087ejq.425.1619390389001; Sun, 25 Apr 2021 15:39:49 -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 jg32si12245745ejc.26.2021.04.25.15.39.48; Sun, 25 Apr 2021 15:39:48 -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=nSyqA5UU; 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 F2255688342; Mon, 26 Apr 2021 01:36:23 +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-oln040092065036.outbound.protection.outlook.com [40.92.65.36]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3AD8A689F27 for <ffmpeg-devel@ffmpeg.org>; Mon, 26 Apr 2021 01:36:21 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LZp63bUHicN9rF0FX7PjWOtm4W+cKOgzufN1x7gsYFh4s2mt45SpHyjq+AnwRnYIgtUCJvGlmS0FphCIfag2AZWuK9fNSdf12/jaH4Qw3B9t4ZZP0Dz38l7ri53XSyHbszu0E1bp2FWUYu1InX0WDAUn12STFHG1wDSGaTyh8BmqUaHO4V1iqjh8h99EcmD5WsEyiF5ROFlbT4IMrinvctjRScK8gXaB8aa3ix0ioARWRcVjU2HGhYaQG91ZAzWSBgPdKyBRmPQGn5umhpvRiwNu2rzl55lJhDE0tSDRjhZQJrjd32bEI543EqLFaj24oIorFat83WcKpr5kTQ3gPA== 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=H79JdfYxvpu1EppDJ6NWj+crLhz5A6xC22vZIzy9RxQ=; b=ksir6tvyedge8uKHYf+SNAF9Q4YiXAURN5ipPRyj02aw7Bs8IqaIiyBfhkcjhgMwaEVOcpZ8dJ43t1+E74AMMjLvnACZmcJGKGtAPvrFhniP/4Wqct08NESNr16JrKNrsjFFEBElD03Aana7C+XQz/3PNSCp4WWJ2V8vDQAn3NQylt4Pp1RYkfuwbKbYjgrlulCEfUhzmypS4ykjcLdtdS+o68njJdUwZ9PAhIUZDz4yfaCxQOIeSLy1Hm/0q/2IfVXAdzYm+/vjPXyMNrcZdI+TNZGiiXclNuJjLtRaQcoaWAK9pEMoeXxySbpoj3z1hHUGMqxE01ypt8kF8ZqFVg== 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=H79JdfYxvpu1EppDJ6NWj+crLhz5A6xC22vZIzy9RxQ=; b=nSyqA5UUvQ1uOFMrQSuGHTslg6ZRy5Ib6P2jaT9eGAUQ77U2ONnsVRi+Z+tunJ34GPMZ4bpNKh3bUTukJtrmxqcH0e+pUDXrG295jUBK5loRTjpMlLexrL8z3NrDs09mhDgLOd0PcsIQnN1HSAQvynYqJ0iPaqe43JU2a95hjzVIZzkCZL0yei+5bWebDThSaHPY8c1fQsQRnOhwMUNffAntA+2hMvR7whD3NREfpKEo4VGsc1lhNyT921ICPNEoVSmCc06pV2+/1P5ft0rK7rktdiC2PU089fOr9R4jGmS+zW0Vi+7DE17rpqR91NuoKyMAAQ6a1FZLAybfmarXfQ== Received: from HE1EUR01FT054.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e18::44) by HE1EUR01HT186.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e18::438) 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:20 +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:20 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:5022C092F599ADC62E6B1E8D13D8F4ABFF3B62A3C0E5A6331B882622B376272D; UpperCasedChecksum:4329EEF480D9A0D23360D0FA89E3B06354A540E98ADFC9A2BC8B65C4B1659961; SizeAsReceived:7743; Count:50 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:20 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 26 Apr 2021 00:34:46 +0200 Message-ID: <HE1PR0301MB2154185F500120BD442BC88B8F439@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: [v/X5EDozL6zzqVEOdr/fitWtthXCfpgC] 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-31-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:20 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 50 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: cddeda9f-9e1d-4b0b-f6bd-08d9083a8c4b X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UKBTepCewFwVSkfoADfkQpyLSgPZ3++pmPQkBV3P2RHO7xRyNENVDAu864Q52QBWUphg9JJRabE/R8MkEowv86t0LST8ZWozI178i1Ium5/kq5ryU+9G6EehhvqZBuFqmairSMV/604sJ0MIAY8aip90kn/8QGhQj8ph7iB4v5kx3BSP1AZwukIlS0vDyEefNRBWZzNJ7dotKIM8eiUFyihIwyKfzWLlJmWJI5p+uchgRNNnMEVEmjts1EWHaGrPmSPSKqA28+0ZGa+beTvR24eZzsegCqZT06bKImAj5cC0n5wQ2rhEuepivNPFBXt6tZzccNwNPzBDNA6X/Vp06mR4ScDfyJSkGdY/8yM0hbPGEldN4lNn893fv2Igzq7c+i/oYfE2Oi1QDtTTkQVqlnQKydvhvt8MvpF+YeUj1sjSCh2Mch7ifNkbV5kMO1K98aeP725MZ+mtMlybp/C6McoLioUjvE6k0JZIdt/bKZGHNtL8Z/I2ToKHEGlzkrU01GijBAcGBGYIY2IEAZbde4kHfmEw+x61h2owPyQpIRtugAKf97W1h4zx1NJXKFwQnXhDYQHgg19COQcV+kdUToIhrDzw+hG8X9CO/56Q6jBUnJhhCSnaPcoBpzy9NGhG3Tx0hWMiPKg6AMbopZNDp/4lN5DwFapmrsl3mMBm4BZLbmK5spF7zOjzZbn1omjTvf9+ettZUwyaw== X-MS-TrafficTypeDiagnostic: HE1EUR01HT186: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H9JLlmQ4ENugpVAVVxtxu7T6xbcFdTgykKK+87ob6IitOfeQnoYSDtvcv3l02k9Ap4KAVQgAebejgj3/snGHXYHNURDM/hDHSlQ/CyJCycHY/YoTSGPWgeMML/TjkYDVKj3CiskPDoYGH2mnnZ6iFEtWZcDmmn5/mgG9ck5aD/SSfGcrwSguYhGvrousJpxxOF8FJf6rxdO35WiAaMaeotBUIvBVYzvpAYcQg3ePxz14UiDpYXOJQ3C667Wb0AEY1Yhplccz6M46ieYtsC0Vrt35e4s/eaaCrVO7mQOeeQIA8EbIZoGXwPplaWJBw0BZAy8WfZELl58VgYElxDp3ILncO/6c5r/ZImshbE5oFyCVq4hqGpj+HXiFMpugCA1RFedieDPobxTxeZ6xKNCydw== X-MS-Exchange-AntiSpam-MessageData: cQ4FBxwE8SZxGSxPvr67XaG4kb75Arnm21aboYios6+2Myjd+QT8Hg/XDjmcmMY8nVI+seNFRydBuKjsyoZdWJDj18is2CXfRIrRhwsuXNnJa5IIYxTezH/SNJUufhXC7DCtykpo7h1Xg2ztzO1Rlw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cddeda9f-9e1d-4b0b-f6bd-08d9083a8c4b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2021 22:36:20.6748 (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: HE1EUR01HT186 Subject: [FFmpeg-devel] [PATCH 32/34] avcodec/libtheoraenc: 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: y6+DiEAY2c7e |
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 |
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index 16966ed433..5dd8c2084f 100644 --- a/libavcodec/libtheoraenc.c +++ b/libavcodec/libtheoraenc.c @@ -339,7 +339,8 @@ static int encode_frame(AVCodecContext* avc_context, AVPacket *pkt, } /* Copy ogg_packet content out to buffer */ - if ((ret = ff_alloc_packet2(avc_context, pkt, o_packet.bytes, 0)) < 0) + if ((ret = ff_alloc_packet2(avc_context, pkt, o_packet.bytes, + o_packet.bytes)) < 0) return ret; memcpy(pkt->data, o_packet.packet, o_packet.bytes);
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> --- libavcodec/libtheoraenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)