Message ID | HE1PR0301MB2154EB75878798FCE89949888F5F9@HE1PR0301MB2154.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | 1393c7edae338fd6fd3d53bde824646e1841ab2c |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a11:4023:0:0:0:0 with SMTP id ky35csp2015630pxb; Thu, 29 Apr 2021 16:59:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxK1jCr8DvWOW3DSnUqz5vouvR9WtJ3VHrPxZa6hCyj2hwmoG4tB8kBHzB7OlxNAhhXyJpv X-Received: by 2002:a05:6402:234b:: with SMTP id r11mr2512365eda.137.1619740789372; Thu, 29 Apr 2021 16:59: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 n11si47330edy.507.2021.04.29.16.59.49; Thu, 29 Apr 2021 16:59:49 -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=s03EG4DN; 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 5399F6802E8; Fri, 30 Apr 2021 02:59:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-DB8-obe.outbound.protection.outlook.com (mail-db8eur06olkn2031.outbound.protection.outlook.com [40.92.51.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0244168A28B for <ffmpeg-devel@ffmpeg.org>; Fri, 30 Apr 2021 02:59:12 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=npFV/ftcZwVyZIGAB8XGkU6wSuCUHw6HT0nIeW1rUoi4HYNZJi2rfn3GiEWSD5LlEoRpHewGuuLmxa9ixxjcKJ7i3FvvabDrUhoBY+35YrZJbkbEdqCXF+bvpKthX+a4oCjePS7otEHX4s8F6fQPcktGPRdYLVDGTpcJ82syOIMADP5Ki04dGPU1+BjJ/BHR50vxllBb66yHrhc09ADzkg+fFCfCBNjYhLSdxvOv7Ak5Z5LTKZqh+pLVBT4xinRtRpXW6lonXvDZb2NTkLfPEhgoR0FinbrlMUWSE4kRmtkcvL0jJymyT9ff5jxKu+UylyguaNrQI5mpHta/ACuHTw== 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=AJ6oYgpRfyFgytqTW4m0HOTCXbuKNjUebpNCSU/rMUI=; b=FENUDKdkxzbL/v9n1j0SZFYy3Xe/L1Pmyx2/4qW68ck6NRZYKbmhToz/HQ3yuPi4h+JaZzxMKypyD0WfPTH7EwET2YH4A4tH6+eEC6cNXxWZuaC18V5FbBFT6OJzsGW9n9xyJrbrHY//CM+KPHc1NNVTVyw5Y4LU0HGbWXzehBkOpPoMIc8AlbJF22636coWETRmUP9LZlD3T7APOW0pZ8Qkjcu6wxnsjFfP5DDJZKXwKrb8KXe76VQTG7bdaI69pOQHAAAFEzqNB2Y8QEq73Ykf5DyF6zCccL7V9J8nGEANEqK4OKsWQGYRe1hf7D2YqPwdclgWNU+y3uFROHsBmQ== 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=AJ6oYgpRfyFgytqTW4m0HOTCXbuKNjUebpNCSU/rMUI=; b=s03EG4DNoQDOCHO9zhbP4nTT1nwnjOSUvekCjrs4UgBTNQws4VUeg2afhUWkzY3j6TuryBUyY0WHe11Czq9J5isewfOcKfMNkUygciy8RQPV7M+UTAK/aQVFjm2sO8GnOyUopcFhfuAKuNSvwDdbuKkXNDaLyOXdKCjfWSNuZmMjSL1FihPXBtVfUIJr8ImbEWxacSi+Vawo7Me/aF0CBc3ZLCbgwkLRW1Ng6Kj+KxPszainDnf/spHw9hMj7l5t4VdTGKKUyj+IFVwGN/wPbzonHD8XxgXThUWn4VojcaEOPQlsxUH9eoAfdNVTqc08mz9bLLYvuYSCGTfQLXBh5w== Received: from AM7EUR06FT005.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::47) by AM7EUR06HT099.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::209) 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:11 +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:59:11 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:BFB9DEE9740FF01D7441E348BB5B61D78C38088A1ECC2751E79D7A81C966FC16; UpperCasedChecksum:A0C5936F0CE7865DE4C0A1157BBCBD08E231C5FC0B8237D8FBB057BDA767436C; SizeAsReceived:7604; 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:11 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Fri, 30 Apr 2021 01:56:46 +0200 Message-ID: <HE1PR0301MB2154EB75878798FCE89949888F5F9@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: [YqqnzEm8ZGCuriqYFr3A+a1Ugdf9hlNN] 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-14-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:11 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 92a5c9d1-3564-45b6-f137-08d90b6ac8fc X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNU6XUx7q8EQ5McclV510mdNSQ6zVwN/I7EX+rk7h1h8roCTGdsyjXMArBwxX0cv8ZAYALSTjF4VUaCnTGAaHBsrbV5hOtZru1/i3nQws+uhr+tZyOVC0ug+e5OHXpydGk1CzQoztb/0jARx7cCCZWrA0+QUrFLW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essageData: MxiSazsrj9vikjGh4unNd3BiB2XgYoGsqk1A8LDqGmTQ7ZowyPzOTIL5OSlxTz6+0MD3i0XzPCcs36CQ0PIna63mojDBYYrZB3yv64dvnZNmXLmhih0VhOZIPgb7z8gGW08nX0yPcPGburpc3YenvA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92a5c9d1-3564-45b6-f137-08d90b6ac8fc X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 23:59:11.7814 (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: AM7EUR06HT099 Subject: [FFmpeg-devel] [PATCH 15/46] avcodec/dnxhdenc: Avoid copying packet data, 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: fwVr3GuQTYVu |
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/dnxhdenc.c b/libavcodec/dnxhdenc.c index 23c3f6fdb9..7f18aff66e 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -30,6 +30,7 @@ #include "avcodec.h" #include "blockdsp.h" +#include "encode.h" #include "fdctdsp.h" #include "internal.h" #include "mpegvideo.h" @@ -1257,7 +1258,7 @@ static int dnxhd_encode_picture(AVCodecContext *avctx, AVPacket *pkt, int offset, i, ret; uint8_t *buf; - if ((ret = ff_alloc_packet2(avctx, pkt, ctx->frame_size, 0)) < 0) + if ((ret = ff_get_encode_buffer(avctx, pkt, ctx->frame_size, 0)) < 0) return ret; buf = pkt->data; @@ -1354,11 +1355,12 @@ const AVCodec ff_dnxhd_encoder = { .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_DNXHD, + .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | + AV_CODEC_CAP_SLICE_THREADS, .priv_data_size = sizeof(DNXHDEncContext), .init = dnxhd_encode_init, .encode2 = dnxhd_encode_picture, .close = dnxhd_encode_end, - .capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV422P,
When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data by using ff_get_encode_buffer() and also set AV_CODEC_CAP_DR1 at the same time. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/dnxhdenc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)