Message ID | HE1PR0301MB215482AFB8BAF5C16271AF3F8F5F9@HE1PR0301MB2154.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | 0788069cb1cf95b8858f9315ffe9cd4e1916eef1 |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a11:4023:0:0:0:0 with SMTP id ky35csp2017373pxb; Thu, 29 Apr 2021 17:01:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLHuEwb5XtVbvwcHTeGrjWUQEGJ1wkHpyKYnfoo0ydM+Uh9/Ocx/6ugrBHfhk89pJSTiwB X-Received: by 2002:a17:906:bb0e:: with SMTP id jz14mr1054149ejb.285.1619740913878; Thu, 29 Apr 2021 17:01: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 o7si1358828ejj.449.2021.04.29.17.01.46; Thu, 29 Apr 2021 17:01: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=pMB4Vq1c; 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 75F3868A1BC; Fri, 30 Apr 2021 02:59:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-VI1-obe.outbound.protection.outlook.com (mail-vi1eur06olkn2033.outbound.protection.outlook.com [40.92.17.33]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B750768A3BD for <ffmpeg-devel@ffmpeg.org>; Fri, 30 Apr 2021 02:59:35 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bzZqPUr2TQElhsFHZM3LPLOJIouEFqxSF+FNf+WdEhyaN2FD1lkR6DZ1crHochaZY2ubTQgB3ndmxo8Rkb+mFlxd4Dwb5wMiQUk+Rsx0b49MufGqGQG7Gr5LgV4gJ+Qv8dkoNxfOaSu+Q5xfMBKQtiKtSvdIn0d0xm6znxERBayv63jdYci0IDvv1uVD5AOy7TABwe8DBEuuNiI4RKOhWz7tDo82R6kCxpTWS9wjluBfU3DxM7t7ByKGcOErKTCGQ0htIWxrfVE2TzP/Asca/dsQdVyEVPeQ0tjF3wiNPTavKIyHW/IL/mNc7irE8efV+v3ULB6ZIEkuarLqb24crw== 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=SlZ5qLsm1qWGEh/fv/d/n9LgNV7/Oj0/FTXOZdre8Hw=; b=Nl3opx/OFt8/7Nocti/kVGuqNmfBh1bv9UQWmZw7ucn/xQ4veahpAtV+uTWZzkLy/XLDTVR2F/m4npUS+kp3X6xFsDYX0hRZdAOcmKFPt1y+sip6R2zJ9bncCsxxAE2fS5OWx1x9CMk2IAhUnhQnG9YhqrJvhs6AZzz9S8wuUqK2v/RuE7A2IMDLx6x4x4c/Ps+sFPzynQZFhDncAPf13y5RDXRYCzdgSi6VbUeCu9TcQxQkwANMcO9NYNa2dbZU+jNKgaZbrEp1l2DNZt0f8lvEreD/Vd7mH+WefAuEPDhmRgdKX/+7zX0kwxGHcId7BeOJPOmP3GOHssEYMkgcSw== 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=SlZ5qLsm1qWGEh/fv/d/n9LgNV7/Oj0/FTXOZdre8Hw=; b=pMB4Vq1cMFdnLa3kIhuoZ4gFtimWw/wKLAM7/MyEItYTWF9Vo1wMgk6PEt+vYHeCCeZ7Du/GuhAQAErBEnkLcJ2V0Vo18en2XUzyCSo0imLyb0WD9DFPtCE7Sy9+/Jm9tXYtig9sQqhsYqnrWd88rfmcWOuXgiVHmqexjvrUwgfpUKXsKRdDkaEsI2FoD34sqSuYA2a2jOzh5N7fJXzadS4l6kOs3GodWPkS6rzwYgrsWY2meCFIv2J8KZo65hguPpJbNUIDz5JKivxKu5YRLcuSx9dy5PYVcRxe/0w9iGvAUW5xSsuCQIZF/xZVJl8gqfqRZimgqzdH91dLvjzyBw== Received: from AM7EUR06FT055.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::4f) by AM7EUR06HT003.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::401) 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:59:35 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::49) by AM7EUR06FT055.mail.protection.outlook.com (2a01:111:e400:fc36::61) 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:59:35 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:16486550394100C8B9B67CD006E05D4DE3816DF28BD973F8FF147EA8A1977473; UpperCasedChecksum:1D6D246F622D27C1BC1A6AB636D8448FCBB5F77E20B3D671C9E88B306432D858; SizeAsReceived:7582; 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:59:35 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Fri, 30 Apr 2021 01:57:00 +0200 Message-ID: <HE1PR0301MB215482AFB8BAF5C16271AF3F8F5F9@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: [Mc12YAr5LFhsq9NjdXSCJ/HjuTDmQ+td] 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-28-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:59:34 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 429e298d-8f8d-4bc9-afcb-08d90b6ad6ca X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNU6XUx7q8EQ5McclV510mdNEaeC2RGhNi1JWnrjufdjSZaNVbq/AWby9Jwreh7G3Ef6JhprCscOlw+B0pcEhgOQ0YiME1/kRIhijT8bBwD5xnues2Z2lDoLiw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zMWrU6ROlTZtIyKHE10mApX+41F5h9Ioae0vpd+esD4fIPw+WoNw== X-MS-Exchange-AntiSpam-MessageData: YsZ88QfeSLWyMQ1tzAtg7OcK6sMf17vpjs/ZzF2jEjUknpqytDIRk5qrSUCt0puSobWG80Uze8572btr7aN695A4C2EChDLqii9hdT2GUiu0VWz24leyD2emq0ynIwkflK9HVbNnkQlMBJVeEZhKXA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 429e298d-8f8d-4bc9-afcb-08d90b6ad6ca X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 23:59:34.9621 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT055.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: AM7EUR06HT003 Subject: [FFmpeg-devel] [PATCH 29/46] avcodec/pcm: Allow user-supplied buffers 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: lMIgX2SzoVnc |
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/pcm.c b/libavcodec/pcm.c index 79b33b935c..e9b8eab484 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -30,6 +30,7 @@ #include "libavutil/thread.h" #include "avcodec.h" #include "bytestream.h" +#include "encode.h" #include "internal.h" #include "mathops.h" #include "pcm_tablegen.h" @@ -106,7 +107,7 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, n = frame->nb_samples * avctx->channels; samples = (const short *)frame->data[0]; - if ((ret = ff_alloc_packet2(avctx, avpkt, n * sample_size, n * sample_size)) < 0) + if ((ret = ff_get_encode_buffer(avctx, avpkt, n * sample_size, 0)) < 0) return ret; dst = avpkt->data; @@ -555,9 +556,9 @@ const AVCodec ff_ ## name_ ## _encoder = { \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .type = AVMEDIA_TYPE_AUDIO, \ .id = AV_CODEC_ID_ ## id_, \ + .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE, \ .init = pcm_encode_init, \ .encode2 = pcm_encode_frame, \ - .capabilities = AV_CODEC_CAP_VARIABLE_FRAME_SIZE, \ .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \ AV_SAMPLE_FMT_NONE }, \ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
Trivial for encoders that know the size of the output packet in advance. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/pcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)