Message ID | HE1PR0301MB215416F7ED7B0AEEC11409C98F5F9@HE1PR0301MB2154.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | 32b20a274a8a628b5f255ca6641aef1c9c3b5713 |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a11:4023:0:0:0:0 with SMTP id ky35csp2014693pxb; Thu, 29 Apr 2021 16:58:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsSPTqIMDul1IgttM3BlZTbFOZG3xQKjsRKscVOPX7lMS5CdsnXOoFnjZiaKi9yMHSBzRo X-Received: by 2002:a17:906:26d4:: with SMTP id u20mr1163472ejc.114.1619740702009; Thu, 29 Apr 2021 16:58:22 -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 y24si75387edt.176.2021.04.29.16.58.21; Thu, 29 Apr 2021 16:58:22 -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=KT4MBLIX; 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 934A4689D92; Fri, 30 Apr 2021 02:58:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-AM7-obe.outbound.protection.outlook.com (mail-am7eur06olkn2066.outbound.protection.outlook.com [40.92.16.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EFA10689EC9 for <ffmpeg-devel@ffmpeg.org>; Fri, 30 Apr 2021 02:57:54 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A4OmkwWaIHTaXuLdiM938m6aJ8NxrKKaO75ziWy30hgSizPLshtKmEyoGxaN2ROsB0TPiRH0e5a91TuPQlEAGQCa108I2ORniV4X4rHJ3sj6gSfAAGwVVmjuGLQiUJBCOspqUNJzymREZTjd6ojs2HtUxeZ6m5ZWrKaYoSKC0b4yWVmJtLnnyotjTY2kz+7kHysYGa+7qTG5Z3zA4vWAAO8AR3SO6CNmSSP8F4FEtfvBQGYQArtWhTcwKGTcDJV5Rdad82s9ZOxyVPcwCsBiZLJXs9Dp+Txs65OCwGrvIkXrSYzC6O8Puc0bjaLWv/9i5SuTcmQUv0v/BjXZMdQR4w== 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=6KMIb4jQw9GH3pk3l1PZddj7Sjzh+tRAH0vD9hlzP6o=; b=YT/dzGMW3HhQzfzv+t8Ix+kTG1Q+mDzS4GwcnbWl4QEiduwPUfSCt1d++0o1+l897cXajKNuoOQ55Ppe2FJtLSXc6alyR4EGPzFC6wJJl1SF/KGC5RFoq8aspV2Fxx6oGlzNdbDHjk/ZfMUbcGkYy6+fO57TXhBwJp9MaOpeO8DeM+JvjtwJKVRv4zZFDEGcpn6r0DZEECA71llzUtkGbcGL/Um6Omz9pZK04l7W7ar+2lZTA8tSCmYa55nWls6Xqy58vBNsLF9t1REAGZMoXP+czrLm3Ovl2oYjplrbwzUVhDjHK5MA8iFuyvT3QrR6fqLzR98LbwICcAksAIfAig== 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=6KMIb4jQw9GH3pk3l1PZddj7Sjzh+tRAH0vD9hlzP6o=; b=KT4MBLIXOv84XcM2xRHNViviw98PAmG3Ajqjaz8Blvl4dbqx2MYN4goJ+vILJBPvKQW+rQn3heNj6ZOICKyGvD7oSAW+2Sejz8RGT+xAIpttxA192yWgx7+8TxlB7Vj1ewyqi+vBIK/B1LT0Iv1tbiiobw4tmGAxmgqMWo1QQZ4Ot8/CifuS3gasQs7dsYriPAG0+BmBA2wktIoPePCViH85nDNGmDU6NyVNcSX6aHVTcLVxZtYGTDtYkd0JqSs03HOISIce+tHvQzQtcWVVGyKk3BWo8HwGboUiY/3gluHoeKc/lKUzChl/8+wSWEfopfLG9EGm2M9xNMoNBTT58w== Received: from AM7EUR06FT005.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::47) by AM7EUR06HT123.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::506) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27; Thu, 29 Apr 2021 23:57:54 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::4c) by AM7EUR06FT005.mail.protection.outlook.com (2a01:111:e400:fc36::397) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Thu, 29 Apr 2021 23:57:54 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:A3924C450806AD841C7ED87654003A54CB5D775511FE6DA6931B2809AC0ACBE7; UpperCasedChecksum:67B674F0D58F2C2054B23517995F2CDC334103F212E1656C11B5BD2893833B33; SizeAsReceived:7607; 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.027; Thu, 29 Apr 2021 23:57:54 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Fri, 30 Apr 2021 01:56:35 +0200 Message-ID: <HE1PR0301MB215416F7ED7B0AEEC11409C98F5F9@HE1PR0301MB2154.eurprd03.prod.outlook.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <HE1PR0301MB2154FA2BF76462B67F0D851C8F5F9@HE1PR0301MB2154.eurprd03.prod.outlook.com> References: <HE1PR0301MB2154FA2BF76462B67F0D851C8F5F9@HE1PR0301MB2154.eurprd03.prod.outlook.com> X-TMN: [ru3L9NhfJx7H+A8WzdVb6XqjMFJl1f8Q] X-ClientProxiedBy: ZR0P278CA0088.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::21) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210429235717.2067041-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.193.248.86) by ZR0P278CA0088.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Thu, 29 Apr 2021 23:57:53 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: afefdb78-4be0-48d0-c172-08d90b6a9a9c X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiQnJqnaHo6w7XTEhYoMxTOUhz8NJb6DXXqkCtKTKWWCaZCnAyrsjFE6KQAijnueXP0hg1HGlol+MSV9D37NWEakCvQnnvmELvNmmBcm7b3H7sa9io9isYVQu3TE9QTTfU72Dvfa2cWcJIxfOcX4SfSJ+Ggl+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CnSPg== X-MS-Exchange-AntiSpam-MessageData: Ov/YcX6nyxhrta6Nw12m9eAjpkVnz0H3TVg1Kjg4jF5fCm0GuJ3MiE3fDlEMoIDLGYPXzgCsVVXzpCnVnbsycX9cWjWN/1Bl9dCrfwdYfhKXhmKzrjtIJO3RTzdjRoa0oDuzPDTVymJCTSiu+qFOQw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: afefdb78-4be0-48d0-c172-08d90b6a9a9c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 23:57:53.9888 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT005.eop-eur06.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: AM7EUR06HT123 Subject: [FFmpeg-devel] [PATCH 04/46] avcodec/adpcmenc: Avoid copying packet data, allow direct rendering 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: gstLVoiBSvwT |
Series |
[FFmpeg-devel,01/46] avcodec/a64multienc: Avoid intermediate buffer
|
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/adpcmenc.c b/libavcodec/adpcmenc.c index 1c62ca5a83..2b5a606699 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -29,6 +29,7 @@ #include "bytestream.h" #include "adpcm.h" #include "adpcm_data.h" +#include "encode.h" #include "internal.h" /** @@ -605,7 +606,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, pkt_size = (frame->nb_samples * avctx->channels) / 2; else pkt_size = avctx->block_align; - if ((ret = ff_alloc_packet2(avctx, avpkt, pkt_size, 0)) < 0) + if ((ret = ff_get_encode_buffer(avctx, avpkt, pkt_size, 0)) < 0) return ret; dst = avpkt->data; @@ -960,7 +961,6 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return AVERROR(EINVAL); } - avpkt->size = pkt_size; *got_packet_ptr = 1; return 0; } @@ -1005,7 +1005,7 @@ const AVCodec ff_ ## name_ ## _encoder = { \ .encode2 = adpcm_encode_frame, \ .close = adpcm_encode_close, \ .sample_fmts = sample_fmts_, \ - .capabilities = capabilities_, \ + .capabilities = capabilities_ | AV_CODEC_CAP_DR1, \ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE, \ .priv_class = &name_ ## _encoder_class, \ }
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data; and one can also use user-supplied buffers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/adpcmenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)