From patchwork Thu Mar 31 20:14:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 35116 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c05:b0:7a:e998:b410 with SMTP id bw5csp294917pzb; Thu, 31 Mar 2022 13:14:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4f2Iu0hWoH6qHOzdt7XFclSInJc0jUYYC1kQ6MGMrBqUksvBJRKLPn3xSOnwvfcQzZgRx X-Received: by 2002:a50:c099:0:b0:415:f5c7:700e with SMTP id k25-20020a50c099000000b00415f5c7700emr17924944edf.205.1648757669925; Thu, 31 Mar 2022 13:14:29 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id mz14-20020a1709071b8e00b006df76385ddcsi290395ejc.636.2022.03.31.13.14.29; Thu, 31 Mar 2022 13:14:29 -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="W2i+7/iL"; 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 9068968B235; Thu, 31 Mar 2022 23:14:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072062.outbound.protection.outlook.com [40.92.72.62]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5B03C68A5B3 for ; Thu, 31 Mar 2022 23:14:20 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WBtzFMwE8MO6ki6c2wZs5tj9kXvLyxOTxPy1WSuINL3vwGM34+FuOleJ6s1CG6aaeZtVac1isaFcZpJ3oV1pnxbm0eyHhedonwaU04otnJCrTDVlsvmN91iCMn7w0NqmjcsC+vANnUszeLPm4bzMs/iV1VMYnuy9bqHmn6hWSXB+nhFbjsr7k4s6ENmD+OcCOa1CP4nyQsyraUFn43bD15Ocx3qd7JnNgdCBqEgiiiz3LTQ0wWzXdAONqtk+sf7tFo9cfIbkWuGlJU9i9prwerYOpPJgJv+g4W9SkPYaCzuLAYh0lcwBW0Ytl/lBMpikE8fiuFL3w1uDmHUQMohSVw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XzmTVxmwhWqN7+ffI4T9FmXHJ1w+nGN2fP1cyad95Oo=; b=HiDnNpzPwAU6rCRbyYBSKFyTXY4Tpr4+rZlrxVucMRe8ZOdqrmOTM+Db1jDB4Kq+FBAMAYZjwNVMhwfGs4ch7A3zbbBRKT24NfbqdN3nWjhWKgAn7VDdzSoIUVEDP59Ig5X/WSjIjiPhoHvNHNwiOXT214TlQw4A4HwPYH4dy9lohqxKZvu1ZEXuyIqX6rXg71gC0EVD2llckpyhxLF8miAb539Zz25oOlEKe8AMHn0MBH2vqlWoOJnj3q7qeif798xF62kVT9xTLfF0loOFqT8jr781ycOKVgE7jMMM1Qx56FtysCQLcyLydqEccUJJSbPQZSCHF01Njwu9IfR3Cw== 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=XzmTVxmwhWqN7+ffI4T9FmXHJ1w+nGN2fP1cyad95Oo=; b=W2i+7/iL+F7MqXUOK4k4lrfmwARgFGcM1+EcJtsRatVzNqQQg80Dw/N9kejaS1+JaxmppUvaVtEQrvJEelTslCuyIEzosJxoSAtIQjH/bob4MdM0yKar7kC4RfqtodohPy1mwFcLXh4iELpmRvmeUMUY52Oo0Dt0RWjimoMIjKlzm3ZMvzFYVfMS53yLRao6sEFjKv7TLpzkOD1Qh9au4BIXdZx1oWdDQRpNEHtw6NFxgf2zhw7OUpOeIxV6FvTobSez6Nuo1PSxtuXO4Hyji4675vAJhVL6ttdh1ramA/lMeskDI9k7MgTHLiA3MsRfKB3ODR+3oFFVzVuLPKpcrQ== Received: from AS1PR01MB9564.eurprd01.prod.exchangelabs.com (2603:10a6:20b:4d1::16) by AM6PR01MB5158.eurprd01.prod.exchangelabs.com (2603:10a6:20b:95::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.21; Thu, 31 Mar 2022 20:14:18 +0000 Received: from AS1PR01MB9564.eurprd01.prod.exchangelabs.com ([fe80::9070:a5fd:e532:bdf8]) by AS1PR01MB9564.eurprd01.prod.exchangelabs.com ([fe80::9070:a5fd:e532:bdf8%3]) with mapi id 15.20.5102.022; Thu, 31 Mar 2022 20:14:18 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 31 Mar 2022 22:14:11 +0200 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [a1It6WNPeKVecbU+tscp6c4qePRnul/I] X-ClientProxiedBy: AS9PR07CA0005.eurprd07.prod.outlook.com (2603:10a6:20b:46c::28) To AS1PR01MB9564.eurprd01.prod.exchangelabs.com (2603:10a6:20b:4d1::16) X-Microsoft-Original-Message-ID: <20220331201411.665573-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 28372518-a43c-418e-ddb8-08da135308d7 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNU3D1ocsBQC3N/nAWQbgq2xbmd11PRpA8WJDNRV2Xl1COt3PxNSItsH9aMJTIdF7rI/4KVyXcNUknjs35OTH4JHAagcEWO9kQrMk/d5gvuU/GKT7C/6RWVLFQPXUfiaJyUugtWqNGKrDiYUfhnlLadKkjX6JcX33ZZzu5LOmK5tNkdRHLppCrfajeNol4S+9XQY5IE642JVdHMnJU0/O27vsVAs+5TMbDYYL1F9uetHgUw1Hwzyoo/8+/S4/1n+veBL+fp3X+u6IpwtmQjh3VAztDF2pgDhXMk7Gw+K2Pco/Z3NDzEImkoMlrc8HBicEr+hrgwvrtg0L2hra5OabJXKZRVX1r2g3yiLDno2FytTAxugzBuEVkLe8YCp/TkGe7YIPyrO9e5klHYC21viJg5uPuKUk3+W7v1qG5DfIk3PbhSQBII+Q0m3UDrXqq39C3XmD+zQ87JD9ahAWj09ST6kP2MM9BU8nzZqPIml5y0Zpvs9IOFPlX3Q6yvGm8BSxjhMUnUs9Ys8IA9QNf+lXxx+kYvXul34BTB1G/8YoGA7roAS5PbfS+fcrWsX0HGFMUzdBPE4QJ8ncaHl6/Z9zrZiopcp3pVvwuJeSO0d68Nbfc4EGZ/09PIvn1bBmMV0VoKjudAlzLXIuGUAMWSXjfoLPY4vH64LONQSM06M02eDD3J/6/yz3CMJNh/V8gJizJeekeaKlFeRDDWWvTgr2RHhefoQfNGMNcQ= X-MS-TrafficTypeDiagnostic: AM6PR01MB5158:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ORtw1LdXY+nbWY8RQ9lEeBQH0ewuvDfcnbmuCZjLkCNsq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8-08da135308d7 X-MS-Exchange-CrossTenant-AuthSource: AS1PR01MB9564.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2022 20:14:18.0267 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR01MB5158 Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/vp9_raw_reorder_bsf: Merge close and flush X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: w7yX00JJm1CF Also mark the function as av_cold while at it. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp9_raw_reorder_bsf.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/libavcodec/vp9_raw_reorder_bsf.c b/libavcodec/vp9_raw_reorder_bsf.c index 368dcb26c2..d36093316c 100644 --- a/libavcodec/vp9_raw_reorder_bsf.c +++ b/libavcodec/vp9_raw_reorder_bsf.c @@ -390,7 +390,7 @@ fail: return err; } -static void vp9_raw_reorder_flush(AVBSFContext *bsf) +static av_cold void vp9_raw_reorder_flush_close(AVBSFContext *bsf) { VP9RawReorderContext *ctx = bsf->priv_data; @@ -400,16 +400,6 @@ static void vp9_raw_reorder_flush(AVBSFContext *bsf) ctx->sequence = 0; } -static void vp9_raw_reorder_close(AVBSFContext *bsf) -{ - VP9RawReorderContext *ctx = bsf->priv_data; - int s; - - for (s = 0; s < FRAME_SLOTS; s++) - vp9_raw_reorder_clear_slot(ctx, s); - vp9_raw_reorder_frame_free(&ctx->next_frame); -} - static const enum AVCodecID vp9_raw_reorder_codec_ids[] = { AV_CODEC_ID_VP9, AV_CODEC_ID_NONE, }; @@ -418,7 +408,7 @@ const FFBitStreamFilter ff_vp9_raw_reorder_bsf = { .p.name = "vp9_raw_reorder", .p.codec_ids = vp9_raw_reorder_codec_ids, .priv_data_size = sizeof(VP9RawReorderContext), - .close = &vp9_raw_reorder_close, - .flush = &vp9_raw_reorder_flush, .filter = &vp9_raw_reorder_filter, + .flush = &vp9_raw_reorder_flush_close, + .close = &vp9_raw_reorder_flush_close, };