Message ID | HE1PR0301MB2154E9335537BF9C3BAABF1E8F439@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 e20csp3459110iob; Sun, 25 Apr 2021 15:38:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWY6ws9zW+D9xKiUOxsrmnPaGLYDM1OVoGUxn701rbVDAeXsf7GB+AHuyZ9//erEUUBg2t X-Received: by 2002:a05:6402:646:: with SMTP id u6mr17544111edx.74.1619390283423; Sun, 25 Apr 2021 15:38:03 -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 x22si11717856ejj.667.2021.04.25.15.38.03; Sun, 25 Apr 2021 15:38:03 -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=jEhhxs3j; 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 F2604689C66; Mon, 26 Apr 2021 01:35:45 +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-oln040092064048.outbound.protection.outlook.com [40.92.64.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2ABFE689810 for <ffmpeg-devel@ffmpeg.org>; Mon, 26 Apr 2021 01:35:43 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=geMxQl/CWn0iPha6DCfC3p6hXvj+lthSWcq269xxyglTZm4gh06e1U1SGi2lTt8ToFkayI0RMIOA+DpLTX8Y8tgKGnnJaR0u0hc2MH4nrwZi4rmYNKavxBYoM5AcvRQ8WW3Ipn0g2Mbvo1APsMnptGw80wG/3ZpaMWavqQzmfVHwBcVxIk1UJkXc1O6/nIMpV3zjAZY10bPNTnZR5pIxGvYHrqxP9SFEX5PdB9mcy7J4cPZmfWqLrVcQJdHdWuC6pRjrSCIu8E1j+6LvM26bu6FJ0HW7Rll36jSP2cVTtQWiRKtcZlw3jyT6Gi1H0SES2hP5N1lLXVZFqeCXrPI5nQ== 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=bSYScoA1L7bYBuGyWvYPQLGOcu6RGA0hXiUfCHwIyQo=; b=im6s+Mi024R2gEcyLWZOAujJcHtNhJvQyq4sq6nZ8SnLU172mgc5YkaQBq6M/VEdkOYRMZPL03UavvQcNoBEV1lVxd+cdKyZwXng89l6ddXxcWL7VcQXfZSN0mivi2b+MhuDU+xBmrjnpQ3L6ZeXTvEGFC14PKHZl070X7n/YNpdcewl19ScSIASlJspjpgTIGf516SIsK4ghRvMnRe+BxniQFMLIi/H1MjMeRAPKGMcoBbD+LBWlG6AnEsGEX4qP/q9hlo0WUBig6xINjvyQ/rtPznybQu4YIH/3gmSc0WbN+DWsQzEA0WlwzBPNvy2STL+iDHPDtOeh/kdoF/jhg== 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=bSYScoA1L7bYBuGyWvYPQLGOcu6RGA0hXiUfCHwIyQo=; b=jEhhxs3jQSLeV//nhK9/DEeteIH3z+3LW+7WjZNSgH4DGJXY/yLG6Cw6P6C2cstjB1RywinaSBXDBDAXW/qCWUZdk6Z2YgscnByUdWHjHd/+f+DqZ/fbF8tekawkIYqfianPdiMDLrs9K9WTSrOTYGUQHKdK4dYnhNJwQiII562VsMN2pB77L5FKgRfx1iKubBzWWMiBMa5VN/oJ//+k7nBYS9IazdC2PMe4wK4hfuZ+hIL0k8mxBjaTYhCQa7ckCjhi3rWE4wpQ+xAi7V8zHK/6Y+UnueOZK0ZAl8lPWOWAdTMfjsfV5uiFurvtIJFB0N0KBOtOUQGEIxBNHia8IQ== Received: from HE1EUR01FT054.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e18::4d) by HE1EUR01HT158.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e18::428) 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:42 +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:35:42 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:32AB94894B3896D3A6B5577718CDE3A2091F6428D6F24FB60AA8298299D8E4D4; UpperCasedChecksum:CD3F25662C63B2863B9FF3F4F3263A3599A7C761028AE946CD26C8B3147DAEEA; SizeAsReceived:7573; 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:42 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 26 Apr 2021 00:34:36 +0200 Message-ID: <HE1PR0301MB2154E9335537BF9C3BAABF1E8F439@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: [kxGwj0BdpjS5J34GHiTdMpiDSvs3ZX3G] 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-21-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:41 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 61f809a0-7e0b-4340-714e-08d9083a7544 X-MS-Exchange-SLBlob-MailProps: dEG5jEBie8lxmSIYGjeOxtpX/NMoEuKPnwCYZrhK2No7nGooU/58M+4wlmFKh0PQlreBcAmOWl2yW5lsgmlNodVOEXWfEv+A/bQLBvThMNbBxvTrHNW0ir1IClFDfFWo2zYf8WicHleaRg+KoFa8+r2Ewg8LhtgiILoQYDAQHRq35Iz0NZHSZxORpXoOgc1AU/C3vJpQCOIOofXpesi3N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NnwEzP42UcYwxDgyWkaC38IA26CTFZrdyTkuZAye5/ItgkUcBY7o5+yiP/9Xmr8ZNqZsmpm4BTNA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 61f809a0-7e0b-4340-714e-08d9083a7544 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2021 22:35:42.0300 (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: HE1EUR01HT158 Subject: [FFmpeg-devel] [PATCH 22/34] avcodec/yuv4enc: 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: okxTY1EHh8nV |
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/yuv4enc.c b/libavcodec/yuv4enc.c index 63a7fae964..5096f81e1a 100644 --- a/libavcodec/yuv4enc.c +++ b/libavcodec/yuv4enc.c @@ -26,11 +26,12 @@ static int yuv4_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic, int *got_packet) { + int64_t size = 6 * (avctx->width + 1 >> 1) * (avctx->height + 1 >> 1); uint8_t *dst; uint8_t *y, *u, *v; int i, j, ret; - if ((ret = ff_alloc_packet2(avctx, pkt, 6 * (avctx->width + 1 >> 1) * (avctx->height + 1 >> 1), 0)) < 0) + if ((ret = ff_alloc_packet2(avctx, pkt, size, size)) < 0) return ret; dst = pkt->data;
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/yuv4enc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)