Message ID | HE1PR0301MB2154DAF675377E0BB5521BD58F439@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 e20csp3458006iob; Sun, 25 Apr 2021 15:35:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzScd26ffLG5NYXhGQTyYKdjXStXmrnU7MzuRM4acpQd8YF/RcFaZp+iH/PlxCXU7uA0VGn X-Received: by 2002:a17:906:a0d4:: with SMTP id bh20mr15371749ejb.348.1619390153096; Sun, 25 Apr 2021 15:35:53 -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 e22si12806804edu.250.2021.04.25.15.35.52; Sun, 25 Apr 2021 15:35:53 -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=UmTGrAcB; 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 01ADC6883C9; Mon, 26 Apr 2021 01:35:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-oln040092066108.outbound.protection.outlook.com [40.92.66.108]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4C15368812C for <ffmpeg-devel@ffmpeg.org>; Mon, 26 Apr 2021 01:35:22 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DobnlU4Gc//5KVS19YBwvhd2f/v3hVZimGeFVhDj8CBWiq/K9Q3ugJelZjDW9SIdVjHataxPfViFYxB4peCW2oBbSwe0G67v3ie2bnNy0F2jEnKdWomw5JML4R70eoe438Fj0WL2Esc06X5EUhQEhuGvyrxRqTNpYHKl6H0IV3GIPq+lO/YlRyskeVM0xfaNIJmJm8YkGVr7qRTKb1ji1OyrQhnrcVFko9s6ftKpK07hr/Tr0rquIggcvv3eZyeXIPZtr/6VQmpPMi3JoAAuH8/BF17urjN9dU9UD4vXY/ZYm8HtnpZ+r0AJc856v/Q1DB1oc7UXLhx8sF+JH2gl1g== 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=V8eaR/BBP/elAK3zYF7EypC4S6X6wQrtb9gpzte5JBg=; b=C0UpFF09Gq89ui1oTYSLGeMn4vblZKCTy++2UWyvPg2mMBWGJVNJCquK3A7DGqhmJkp6S7kdPljkq/3RKX9IC85VjLbfcAKlWHj2qHhR9Iv2THxxaze806hHpEAM4n5x/CZ6xeBVm3Srsrbx7zVelzY5joSaOMnUuHODofTu6rRO/yU9Tzc+m6iyHwB2H61Q7X5eepPioP6HbKPBmZWOuLbpqmT8i6WfpNkd8BaotUGG+AeNnpKQ898smkbNh+u7kHiGnpaDG7R4ikUqQX+ROQ+HEtht2tYNoNr5eY0Un4usK/XVk/nl40ArGcJ3/qLu/ANnCoRq0QvN2LLXb84anw== 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=V8eaR/BBP/elAK3zYF7EypC4S6X6wQrtb9gpzte5JBg=; b=UmTGrAcBtTVaY+tgF2ur4Dwy6ozelwUHnPxlO3H+LMck6s+/nqWfGwCne8NbMjoE0AHbpu5bQlapltAxewbpGGOlypHkyFioDb5xgoILXTiUN15QQEZzBDgOjQiXJHtXhKpfk8/9TAWJlx193bM1Z20bCMMV569gbfuEbaWmscWCHJza0+WpgnerDEucoZBeJmIj/rm0YIQmeetDDuy9xlWMnvlvSTUQaXdEIRFcxv/9CiTf2h+pv8isFrAFjIIEzjuGKHqOhLMsN6tUvdnZWkTXVI4MQuthX5AYwdpX80W0sNmDmLRor7E5rgc+IiM4/+7Rccub1Jq4PO06m1QMVw== Received: from HE1EUR01FT030.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e18::48) by HE1EUR01HT166.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e18::399) 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:21 +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:21 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:B13EAD30D1F07119D9EB209C4F90A340B32BDF9410C99829CD0F810330DBA4A2; UpperCasedChecksum:F6F94BF7423B6A1AC9E4FE454A4A1871B8CED3A8F84CBD56292772602F8D9347; SizeAsReceived:7578; 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:21 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 26 Apr 2021 00:34:24 +0200 Message-ID: <HE1PR0301MB2154DAF675377E0BB5521BD58F439@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: [YHaR0CsMv3j68UFktIBrilQR/iCUCWL8] 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-9-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:20 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 34b5e621-7ef4-4d15-5efd-08d9083a68fe X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UKBTepCewFwVSkfoADfkQpyvQJmww1KlXcr+VW7VMqeUNujWLaXUdGChvVfwfV0759KE2d+wZU5EJQCWLciaVVe/qQfGm7BIug1ev+M6cyzZhv6XomjQCDFcjvxbpq9t/vvgwFIx/3PPHmsn8JIRgoJy+58suXSzphxLe4JA1eFDVXGLjmTiADfjXmXWQr1JX9d6gA+Up1fqk1pbvlxQIZErROwA6w58JhfyREE7NjGuwHLihUNEtPgIWKWwA7R2eujaw/gH1c9ru6y6vkkoNhQ5W6CwDmAHZAEv15mI0sFBd6mfqiSbyvhG+Vb72X3ridM0Mew7j33M2sM7ACGXy2DdeYj4M1T1DRaPbEVL10VannShHmyPvivHO4OZzX2uh6vW71lNwZfukaqUdTLmyTY7ZFnZZprnROQXlQMtsu0KzwCQquT/XAgD/eu1u7IR8fNMGge4HgegD+GeE9SNhxmLYWawClA4ChOG1a4rnbSwNCOyENf+MIOrXOBX7WnA5upo50P0iJzSKTuhqWxO2ww3OrAWYPBSON2Zyyc5yy4QTofS03tOITuFVfS/jcppUx8UkS0Yf5jeH/SAOm1LB7EyTJ4BK//C0cvnJlXH2FpPeJt1vJPZSxoX4vUSmokz2KXWwdKuXAoYNGDrwzYY8peUPz4gQxwxoY4TMbLF7TlsqDd6ile1leJn72s+MiExlPnk08pFRMOGQ== X-MS-TrafficTypeDiagnostic: HE1EUR01HT166: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QiSI4Ikvrq6mJfJZr027hMPq3CeogXlY1wJyMSRM/1/EIUHfjrrikR/YWtAkwoTpXISpLNPGkWYXxqJCkeabxVTETx2KDpeDZeduofQLppcwUeXpF7oQWOukgWEC/0+tEQEIFdhnOj3g3LVxWDltgOtxuvT3oY9aWBmb0QvCOXeVprL9gVl5vH2JFbDAfqBOB7piIXlVVXW1naFi9J6gqZ/+k5fbj78A4zTPCoRFEB87jM19WZOwFeyWP3CPIwBSe2PJbwgqIpeTIPoF0GNrVkAeMuQgfofknucmW8MnU8ktJTz7zHX0tkUX1Du71lLHqwfjjuthdPwcSkBnfR48RyOeky/zkgcNjlziDPwDjscUZM79TJ5apNe7jzcuUq1vOlKLNUpx+jhip4NA99YwyA== X-MS-Exchange-AntiSpam-MessageData: saYWKKWq3M3ziBA7BseXYhzV7Q9vp2bnNMenGh5dX8lJZgZNEf3B7+4R28mEY0f7/ldvlVU5a7buMwmzrbVx69r2kZ+ncxgd1sbcqazmGLYarvmeXACKqvH6d667qUih8qXcoO0cCdqI0GJiTRDVWg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34b5e621-7ef4-4d15-5efd-08d9083a68fe X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2021 22:35:21.4531 (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: HE1EUR01HT166 Subject: [FFmpeg-devel] [PATCH 10/34] avcodec/g726: 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: iT7FR8b5bNr1 |
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/g726.c b/libavcodec/g726.c index 71f5791416..b8df61a157 100644 --- a/libavcodec/g726.c +++ b/libavcodec/g726.c @@ -353,7 +353,7 @@ static int g726_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, int i, ret, out_size; out_size = (frame->nb_samples * c->code_size + 7) / 8; - if ((ret = ff_alloc_packet2(avctx, avpkt, out_size, 0)) < 0) + if ((ret = ff_alloc_packet2(avctx, avpkt, out_size, out_size)) < 0) return ret; init_put_bits(&pb, avpkt->data, avpkt->size); @@ -370,7 +370,6 @@ static int g726_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, flush_put_bits(&pb); } - avpkt->size = out_size; *got_packet_ptr = 1; return 0; }
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/g726.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)