From patchwork Mon Aug 15 11:49:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37282 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp1224414pzi; Mon, 15 Aug 2022 04:49:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR6pLqez4loT5CBUP7kHo8icxisl1kLOH4L7FfRxrc8k+jW/fLf1l4Nen/bDodtC4/+suKQR X-Received: by 2002:a17:907:3f85:b0:733:3f0e:2f28 with SMTP id hr5-20020a1709073f8500b007333f0e2f28mr10046176ejc.376.1660564192533; Mon, 15 Aug 2022 04:49:52 -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 hp25-20020a1709073e1900b0073309f33443si8112871ejc.636.2022.08.15.04.49.51; Mon, 15 Aug 2022 04:49:52 -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=Ic7iG0lQ; 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 BDF29680134; Mon, 15 Aug 2022 14:49:48 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068060.outbound.protection.outlook.com [40.92.68.60]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C0F3568B7DB for ; Mon, 15 Aug 2022 14:49:41 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CDGGCmPyFVlqCRwy3nZX0IAuVyOUvuoOpY/fNWcoNS4IXyoiLW737tH2HYEOp0dq/lhScfIwrk29R3EjhM53Lo8hXkleuG0Pkhlm6omjV8/nMLVvGq+bN+a2rO5UkZwIShe+FtDjf8aTyMki8sZPcB0qXCnVuTFqNqbcgONBuNXCQrqhumvz0KpI3puZ6UBY7vk4VmwGqnYJ2vcGqqMQN1wEWePamPumxgwwUrS63PqD1i8WSlny1mgk0jWwq8RyJkKtcCTkOHv0O4oO1GTdStZl0GoyJsRAuzfDprfXr97LX3VtpPu4dSSetFoMGu712gnStemzwn23snTkEr46Mg== 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=UVh482OH8wV60jfxkfsBzk66D0qmR+G5Yo3l0MD0IZA=; b=aYo6boSpYElkoDG6yDCWdbcPxkjww7v0ci/N9vDpK+lGn8SWQ0TrwZixWAoKUU/JXhLc/lwoVmEIieVhmRJCBlMeeRSIjAZ+f/M1hFuhnTPwmA28SsIGnIAplDliBIj7FShnUlnkoTvbtRt8DY+ip8C2ex6FU1yhbQd5UIA6XZQSByYFOoib4qHgPOwK2N2LDg4tZFUk12hievnWaSVyuLsH6K61O7r1mvTtWo5SXZzQBLFJ2ZF5hLKMtF5vYK7S2gqwWP/BbvZEfSpB7hkOeKNEcC4a59wGSRDBTzKoWove38ncGSVPZyHii84lKyndR5RwHmwROQKD0wP91Gmmzw== 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=UVh482OH8wV60jfxkfsBzk66D0qmR+G5Yo3l0MD0IZA=; b=Ic7iG0lQynXtusk/OJSq3fpgEdCzn/gsVlWchAc0QWd7oSRywI2cRdxEjnpMN0hkAxf31Tw6y6etVS0qsHzi4DeVlH3BNxUxnbqy2eUJ/xKd4lzcyeY9lJRcrEuMihmgcCqNEMxA0TfjChlfhrsHuPh8aYUnFWBcETaQitRWtTACV68C0PuYF2xMeRwd5Wuj8btyx46xFplwDipMqVLXdZ7T6nLh7nxoT5HC3VAZkh8z8jCLHIW0FgRHmJIcyn4OyVYtbD1UkcDqylmQvq4WqqlV3hSFowosT4LmvLBGXsbjWleqPTl2cByVSDm3vlELPFWAv2Q1TFf2nGP/teG8HA== Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) by PR3PR01MB7937.eurprd01.prod.exchangelabs.com (2603:10a6:102:170::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Mon, 15 Aug 2022 11:49:39 +0000 Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e]) by HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e%6]) with mapi id 15.20.5504.028; Mon, 15 Aug 2022 11:49:39 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Aug 2022 13:49:24 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [fzs6zGds241vGwNDDY+VfwYTjadfZQIZ] X-ClientProxiedBy: ZR0P278CA0180.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:45::7) To HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) X-Microsoft-Original-Message-ID: <20220815114930.2237233-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fc70ec22-73fe-4041-8132-08da7eb43b95 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXnrnTKVombr7KBDDtrDfGKnTEP5W+9LPj2RVdG0iL1M8zrye05DlHKKY32fHd7tvjI2Bxh4Wh3D7njN2/Phuv6cWcdRBZER2Oawe3aGgP5YKNexS3kUy2A/z5w5xCphHt7JvCwsZkrcTQ5uck19EYoAmOOVS3omhbIG3MRFCWLo4+v0dTX4fJTWabGLRWTiT0cfSgD99eukGnsS09KJCj+d0578lWX36apJeoFCM/o8lufWiku22peLh+bClT0ZVLlPtH5or5HlrJecKRkea5Z/vmkdrK2TeJjTEW0TD/juqVgLUIBqz6tKy90aPcK+WyBRJQm5rGTdleIC314mCg3ii3ERtFZEfiEVWfCDbD93npf9yoiQvhIjISnJuK9KLi/idlE7SEeOgsQbmYR2v+cUN76FrMOBAwS51PB3vXYrIWbnLSBj6YKtsnrQpa7do7WEHRILJUZOyT54/x5iMsbKD3ApDAQNnEnYVOfqrd+VXjNIY7skLy/1WM98laF/tA2kMI1uadyDcxAHrH2vL7vHxDAkjWIBVqR089mZsNr+pFdLqovMUc2qDudTxDxvTWUy0nWMHcHGwVYe5yrlixr7JOG60kCfzEj7HG5trgFzIdLOBhD38SacaSPv4VJiYf3fvdMVSXVsjdDUF+06bBjVnjjS/mO1LvqqBWeLzibyS8hqUhFNu24zu4wEaAgOCKdECjcz/UaDExjI6v91UMoNuXYF651I4M= X-MS-TrafficTypeDiagnostic: PR3PR01MB7937:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a+C81TLdSalELK5nZBAlM8uU+VlcBN0QyxINYQbrsfo9DXL/cEBZyRs2UUUvn8Y0UFppTHxGBcKSoQG4y3MEKByLfP6Drt2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VIc6mjlXG5vSg8ol3KgEPSo2ReSiABAF8fCw09uHF2hQsXOOstFp5JVzz0EEUF3jNl5pL9Xc3nK5zDRTzz0O6JIu64j41nIW5bbN5GrZtEYsKHbyA8AE9b6Hcs4mYCytGZQisVIiT4wVtnx1t4oBsDigIRcNxmvWnc28ePMw2JeDorcdxgJh4oy4iBeqsRkhkPAjE08ySIPLFwQvehzyoz/1DwAXhefZFYBDVVq+O9sr3tzZd05qx3xR63VYjVtfMYJHSWcGZtiB9eZMRpgLAjvx1IAx0+NIc3oICZti/4kjTiLJlP0lh+jtQbWCfr5Q+SiakcPhmB6PcmwGBa7+/ipMRVhk2JJAsVjqy/jtRtFHWcyLEkLb39WzuQ5rriG1GPGSW28rW9tD0Scjhtt1wdev74d6u1xh95r3vZ2w/fhMzvZUg//3k4/4KIMHT3yTS9zy2rhukc5fUccSyZQmJbrBKX68iI5By3PaRV0OxBV37/4XDjJ3T6biAYQJFlMKbLCisBDiZxRu0j+gYes9UQ1fLXKPDDbrb66TxshobA1TySFxG9lOdZVPToe3wS7K5d1WfnRO13SGzsERjfDSEsi5kj7LlikMrmq6oJVRe25AMBcXaY0k1M8cdJ1uSZHDPuZSSBEybooOChqc+bsAYdsxYh2xSEzuReu9xiwoXW/puCP3lMD10DouuuOWfg5b7H5h9gXr3mAMhN3ZXJxtgygcezTm6nslIBszRSyHqydwF7a88MvNMtJtCzlIMKnuPZKOrm70ig1nSgJY/bbKdGv+y4ZkzWWg679c1xTYiDzln+lCe0Lc5xxFMXORMkQGK0fQMZ5heDUK5cvP1OLghi5oDN07DM= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc70ec22-73fe-4041-8132-08da7eb43b95 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0101MB2219.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2022 11:49:38.9275 (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: PR3PR01MB7937 Subject: [FFmpeg-devel] [PATCH 1/7] avcodec/h263dec: Remove redundant code to set cur_pic_ptr 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: sLiJQQvVeeaN It is done later in ff_mpv_frame_start() (and nobody uses current_picture_ptr between setting it in ff_mpv_frame_start()). (The reason the vsynth*-h263-obmc code changes is because the call to ff_find_unused_picture() now happens after the older pictures have been unreferenced in ff_mpv_frame_start(), so that their slots in the picture array can be immediately reused; the obmc code is somehow buggy and changes its output depending on the earlier contents of the motion_val buffer.) Signed-off-by: Andreas Rheinhardt --- I'd like to take this opportunity to once again ask anyone familiar with H.263 to take a look at this OBMC issue. libavcodec/h263dec.c | 7 ------- tests/ref/vsynth/vsynth1-h263-obmc | 4 ++-- tests/ref/vsynth/vsynth2-h263-obmc | 4 ++-- tests/ref/vsynth/vsynth_lena-h263-obmc | 4 ++-- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 8db0eccd89..a65f16caea 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -543,13 +543,6 @@ retry: return ret; } - if (!s->current_picture_ptr || s->current_picture_ptr->f->data[0]) { - int i = ff_find_unused_picture(s->avctx, s->picture, 0); - if (i < 0) - return i; - s->current_picture_ptr = &s->picture[i]; - } - avctx->has_b_frames = !s->low_delay; if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4) { diff --git a/tests/ref/vsynth/vsynth1-h263-obmc b/tests/ref/vsynth/vsynth1-h263-obmc index b7a267a8cb..a9d0b166cf 100644 --- a/tests/ref/vsynth/vsynth1-h263-obmc +++ b/tests/ref/vsynth/vsynth1-h263-obmc @@ -1,4 +1,4 @@ 7dec64380f375e5118b66f3baaaa1e24 *tests/data/fate/vsynth1-h263-obmc.avi 657320 tests/data/fate/vsynth1-h263-obmc.avi -844f7ee27fa122e199fe20987b41a15c *tests/data/fate/vsynth1-h263-obmc.out.rawvideo -stddev: 8.16 PSNR: 29.89 MAXDIFF: 113 bytes: 7603200/ 7603200 +f5048b5f0c98833a1d11f8034fb1827f *tests/data/fate/vsynth1-h263-obmc.out.rawvideo +stddev: 8.12 PSNR: 29.93 MAXDIFF: 113 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-h263-obmc b/tests/ref/vsynth/vsynth2-h263-obmc index 2cef7f551b..2275b6e446 100644 --- a/tests/ref/vsynth/vsynth2-h263-obmc +++ b/tests/ref/vsynth/vsynth2-h263-obmc @@ -1,4 +1,4 @@ 2d8a58b295e03f94e6a41468b2d3909e *tests/data/fate/vsynth2-h263-obmc.avi 208522 tests/data/fate/vsynth2-h263-obmc.avi -4a939ef99fc759293f2e609bfcacd2a4 *tests/data/fate/vsynth2-h263-obmc.out.rawvideo -stddev: 6.10 PSNR: 32.41 MAXDIFF: 90 bytes: 7603200/ 7603200 +20c4dda7bc5b4da28611a8c731cfa1c5 *tests/data/fate/vsynth2-h263-obmc.out.rawvideo +stddev: 6.08 PSNR: 32.44 MAXDIFF: 81 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth_lena-h263-obmc b/tests/ref/vsynth/vsynth_lena-h263-obmc index 5b963107f6..a18ef8e9e3 100644 --- a/tests/ref/vsynth/vsynth_lena-h263-obmc +++ b/tests/ref/vsynth/vsynth_lena-h263-obmc @@ -1,4 +1,4 @@ 3c6946f808412ac320be9e0c36051ea2 *tests/data/fate/vsynth_lena-h263-obmc.avi 154730 tests/data/fate/vsynth_lena-h263-obmc.avi -588d992d9d8096da8bdc5027268da914 *tests/data/fate/vsynth_lena-h263-obmc.out.rawvideo -stddev: 5.39 PSNR: 33.49 MAXDIFF: 82 bytes: 7603200/ 7603200 +acc9705f4c9a019c2032a875a6a715ae *tests/data/fate/vsynth_lena-h263-obmc.out.rawvideo +stddev: 5.39 PSNR: 33.50 MAXDIFF: 77 bytes: 7603200/ 7603200 From patchwork Mon Aug 15 11:52:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37283 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp1225362pzi; Mon, 15 Aug 2022 04:52:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR5mhODCB1DxMC3uVz3AsflKh7fHjE3YaZ7fTdHGlMM4zRyPJkstKrGOZFnf4PgS1Wt/Vauo X-Received: by 2002:a17:907:781a:b0:730:ccea:7c29 with SMTP id la26-20020a170907781a00b00730ccea7c29mr10310218ejc.85.1660564349803; Mon, 15 Aug 2022 04:52: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 mt19-20020a170907619300b00730968191c5si6306583ejc.456.2022.08.15.04.52.29; Mon, 15 Aug 2022 04:52: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=MI521EQ7; 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 04E7168B934; Mon, 15 Aug 2022 14:52:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068060.outbound.protection.outlook.com [40.92.68.60]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F0F5D68B5E4 for ; Mon, 15 Aug 2022 14:52:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B/pDqdfXs9etmy4i195MC8X8GBwZCcrVCeekS0I0eRD+DW9WkfMHLCcX3juh/GAcGAKBJPQV4AZGgCuPbpZ1wLE3ysl8whK2W0YUg6fvulupNxkSv5xlBimllxXiOmksqmTyykkyIyoS0JmYPImH5GPsIHRPosT0BhY9mj5OejshEUFSopwIDXPbYcCXMylHWsLbt8uH7q2E76nk6TUA2iewjoJbROjNKOVNWRXxQNrE8+RWIkbCZbNrnRkbMcDShwW2vpH5+fc6UjVtJASLAhY+1ZEwHty861rBGdeUEQE1Mlje2RJaIo4DvSXC0pVbH+lnl6tQ41TwY3k+a8eRKw== 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=8UeXEtc1w8S5daf9xerPybH37GKOWJEVw++JZcqKSaU=; b=BVTgpnouHFyDPPTZH3Pg5fg9TiBoc20bC3evF88fG1i80W0lF3EtamjD7EEBQv2yUZBYo6qYE1fecS9D/JdqvpeRIVFZmkekyNFU1468Pc3HtrQnZjUP6erPZqhadW5HOrtLsMX3lB67lpdl1VNp8wq+9gMM98hB/bUmG7yNsHEMLLtk+qsZCPrJvHwAQG1tU4q6uVfMg364Mw63hpQAolxHGWhYpIlrqJUWrOl9+gPWI9CFrk5EntxqBjHOAXQ6+Z1vXhVKq9HgUcU99zPYKyZdNvSeWKu2OGSXctCvJFBGv+sszJR/UgpI37peLeGof0SubC5Y9L66N9VfJ5gSlA== 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=8UeXEtc1w8S5daf9xerPybH37GKOWJEVw++JZcqKSaU=; b=MI521EQ73UOnLnGmbeNIZVeS1o1x4o033OBGFhkU/c2jmftTFl1z5WdcTSff7CHjj4L94mNdWv+JBvlYac/a8h+n9g5ZRMAppz4LHsZmXM73bKHfJl4dkjvfx/vhCPmkRIRIcb8EvCTLs46oDGLHypsZq95Vt+hMLv+SsMCyVTtGiU9O+zOQGjSnN3+0q0wFlhrY360FEtytuqzDcFXVJeJSEm2/J86ymvvgk4IhfoD9XHtRMdcTkw6wfcRbU2Tv/vVlOXDS484FcRDOCpiXqM3K4wgKcUgR2RP7SP9DjcANEEmQoOHQbC19UAP+QDS7G6lNLeDFnnX9ma6z+rCtTg== Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) by PR3PR01MB7937.eurprd01.prod.exchangelabs.com (2603:10a6:102:170::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Mon, 15 Aug 2022 11:52:18 +0000 Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e]) by HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e%6]) with mapi id 15.20.5504.028; Mon, 15 Aug 2022 11:52:18 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Aug 2022 13:52:06 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [LXJdoXhW6PiuEl6R6fTrjU5Qc12JyQe1] X-ClientProxiedBy: ZR0P278CA0194.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::21) To HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) X-Microsoft-Original-Message-ID: <20220815115211.2237279-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a874953f-3439-4525-8dfa-08da7eb49ae1 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiTPBnr/PBTQGLC8wm2swa7NsoKHIkYH0cEqfmYrR9M6yhIpEUn/wf6siZa5CEjmFWOkFUESduIcwPV2vU4eqqYCWq2xYvbn8glG+hIQuQLMY9S9/+eHINZw00sN/z5+m9Xm/Aq+OSMTT79y5F0idgr8M/AAU7AO0cYL62rqdbuMKaSwfwsdc56BLqvp4aRzcawLibAokqgYx8wnTdMXwsnSobIVJJDA+G514N5KjGKI0WgVSk//GDbN6M6hQTaDNPi5od6hZFxUIViwvIuRrMCcJVyooLgUEN7IfMEpCOU6klb9OVcmZc629Wu+DMHK0EXyZilhJvK1AIWuk8Kcmcz/8ijD+K/uAnCR+g5f4clm2b8LTSdAub+tqqm+2jug8QXIzP2o5r5o4gcxXRwSA3Fn/ZBF7cL7Gy0ZaT90QaHHx5haDualoBDWa8jjmyU6bnImjidpZX+AGF3NU6winduUmJ389+Zgq3Np4IuTBMSO/Zj2uac5qoatYZhm6VcWMLR1EYCIP20VBw38k+xp04YxCBl/kXggP4trxOpM+cXv7NKVN1mJKYBDyXDgwTtkrsAmmohlJ+I8rmcZhrgfxqs7LgLdh7xCwkoXAZYNVEvVHbAvSVgmQDcIZ7QPalxO/9hMrzbMAkfpg3qAw2f6i7yW9433ONPN2JIzfT2zf6gIXil+RgGGtgHAjMFzQ2oG1sH93QuF5sKKQZhKEtcPjX0KdniKm2krNcthiRzatZQGta+dRPpWSK62WeYhfkWCTRs= X-MS-TrafficTypeDiagnostic: PR3PR01MB7937:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +hFkUJ20RmonU8UhG8U3cnymtycwNZE/lLEtTc8nt6PSWFNEJ5q4fEiQg8aWe9l4xUrdF35UPKGxa0+Y4HdKzOX9zXthlHAGyDUQ1n7q7uy55nar5APGJBHQV4kQjk7XwZWHWKgtgrMaSl9T121tqFOLIa5as+X+ipviImLCOHJNV5r+JtT/fJLjC7Jbo38642q/l+Xa3Yb+t7haR28YSZIOktTq2BH3hDjEWC0OvaVS/lYzzKTkUyHKjLiF4CBGjKseaRY+o2yJdNAa2yMC0ija2zrlkI9L0atKqEYjtdBsaEA6mrCDTtrPdVPAEgCaOxby3BLPgGKKg11dnXGKnsFQm0MJmZuF5XeXglPSEIc0zDE1tFMIkG2chuVgZmyZ/4+TlTFSdoLUHcD4XBPXm52KGf3xiUsPDX1Z5vnpa302OgZ1C2MAT61zgasws4Yc42PXJSJtAwfvByL4qhYGLQRoBhyIIM2aR5dqdiOw6U26TUbyt8yUy+oBFRWRhfOt6dJgLzInaxiB5uD4YwUqge5fg0qOv4eUidv13R+LbiTopZ6KvvaP6zAIpgweS6lX4wFXRywAVjMPbLFtbcklsvTTwhtJUe6e+/0O2FEY8twEJZwWIkCP52lmPyGJzepyeI2vk7MPyguNLhTyLW1hBw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: x5rrDtRDTqhHWHH5doXGlzzx4+dRvUI02wis60mzjw1eQvXlrKICaQKUAdbO/7QjBsWnDY8S6lr0r6GBITXz8Q5Un1YJ5SoPa02S2sLIeztsGRth4sNseoliEV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vCXiSe0gl3AKBHQYmtugTENnN5NQStTTn3L53CUAAZB/+Em6HBdrw0tmrsNlit6SQCouIMlSKVmy2mWDIXw1Bj721vfBGXYG7LpHK8CBx7aAFjw3QwURCrfW8uy4kBcbg8JQ1ZM= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a874953f-3439-4525-8dfa-08da7eb49ae1 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0101MB2219.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2022 11:52:18.7157 (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: PR3PR01MB7937 Subject: [FFmpeg-devel] [PATCH 2/7] avcodec/h263dec: Don't set frame parameters redundantly 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: /ZJQcgosbU/B This frame will be reset later in ff_mpv_frame_start() anyway. Signed-off-by: Andreas Rheinhardt --- libavcodec/h263dec.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index a65f16caea..a14d7811f5 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -583,10 +583,6 @@ retry: s->codec_id == AV_CODEC_ID_H263I) s->gob_index = H263_GOB_HEIGHT(s->height); - // for skipping the frame - s->current_picture.f->pict_type = s->pict_type; - s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; - /* skip B-frames if we don't have reference frames */ if (!s->last_picture_ptr && (s->pict_type == AV_PICTURE_TYPE_B || s->droppable)) From patchwork Mon Aug 15 11:52:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37284 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp1225416pzi; Mon, 15 Aug 2022 04:52:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR7U1W7RVweY592oMiyws6G2EsklyUsU8UlPZwKJSBvTF8j0PREFIrdT0y+t8dP+iHhfcuv9 X-Received: by 2002:a17:906:98c8:b0:730:7ada:87a7 with SMTP id zd8-20020a17090698c800b007307ada87a7mr10313536ejb.748.1660564357224; Mon, 15 Aug 2022 04:52:37 -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 p7-20020a1709061b4700b00732fb970fe3si5730327ejg.187.2022.08.15.04.52.36; Mon, 15 Aug 2022 04:52:37 -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="ad9jIuQ/"; 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 14B3768B8D0; Mon, 15 Aug 2022 14:52:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068060.outbound.protection.outlook.com [40.92.68.60]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 283CF68B8D0 for ; Mon, 15 Aug 2022 14:52:25 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZjwzqboW7V2C3VMxI1o8njGpweQHZa2cj58xKCNoZj58RE3gYWzQNXsWMVSgJseDev4lxFreHHeYcI1Mcv+lU+Asi/xYpMxshsPRvTyIYfNxs2/krAyI8ej8G4TQxFiC2Z1n28LRjdo+9zyX/QghTQjCAbr1Oxr8wdrdirIEgIFyCysFHDA4oziGr7fJ5FgWzIAz/yTWbzGc1GT4aPUDTEHl1oEROBDCTbUVkQjYIbPQ3XntC8qHUc6l2eX7649SHLZKCrprLH6AQIA0Lva8GQnVn494xocr99ed0W+C+NDZrGqlS9g6vGguEaOukeIeGnpErhmCU7qorHcPVdc6CQ== 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=ldu4zBJYr4jxmKIv/A4atkbQdXBROiORj2W7g2f1kXM=; b=TdCfp0bcsGzwVxWJnZGcoA7I6oyv3d2UWUKBTAAzH79Ga/zWqlZpJjtjEyR+ub+NcHpo2nnqXELQpR28FTi1XauceoiycmjVDjX8vb9Chyb46wEahi493xUw1w7zz8uPJEPRt0shjvNkiMYxEEzQTjwR2glX4DPwNX4UVTb/1f/Vd9Lg1qnw2789j0oe4FJVJicU7UQNTg2T39bi/CyNk1BkxwCr4rMKcmZYOAKZUqr6ltNIVOv3qqn85XMzkS65EjKRblY2D18i2L2wz+7qrwbstDzOBteyZWMJPWYBrnvCSdB1mEUA8UU+RDlWyO/OLuaMOc8+NiR0f2B/fgf7kA== 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=ldu4zBJYr4jxmKIv/A4atkbQdXBROiORj2W7g2f1kXM=; b=ad9jIuQ/dedgrmtrn/IT33QqWF+I87NnxWoFEg81EjcecoxmoRDfbThL7pMq69N8RSZcIrUkVkHr/e1ZiCQzJk0otctuepaqVXIM+i8X7BcDvJjqQKkHQNCErqEmPCudbmj5MWK/pSVYued47zZD9vYnNS+4IWizlnXST/SpB9y/luNo05gmWo2l/fa/Ks/M3Lj8exOLme2TD/g6gA25pxXlJQFJ60epPdyaN+/F34m4/VFKii+K6GlcWfM0pONpNoRCzE3jTe1o5J7Qp6ZE2wl6lWCcivfaDb7yFL+l+EYrYD8Ou7d79BgJTbcEpMfVMiKpKDyX1Eucl/3pOuQZuw== Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) by PR3PR01MB7937.eurprd01.prod.exchangelabs.com (2603:10a6:102:170::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Mon, 15 Aug 2022 11:52:21 +0000 Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e]) by HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e%6]) with mapi id 15.20.5504.028; Mon, 15 Aug 2022 11:52:21 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Aug 2022 13:52:07 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [56KnyDItHuF3qulBksYntFRF4TqgiSvw] X-ClientProxiedBy: ZR0P278CA0194.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::21) To HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) X-Microsoft-Original-Message-ID: <20220815115211.2237279-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d90df39-617a-42a8-29c0-08da7eb49c47 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiTPBnr/PBTQGLC8wm2swa7NnVS34XgXvSEHUdARgOT7F9wEhs/1sqzjctppOktFZVWFR1ikcmG/Y78e7IQ8h8MYRyM7so+sSg5G7U4VLlgnJvU1nBhh34xmhhcSfwBNjtbOOtNNxA4brTYUHJ6pw4sKDyADrwRhCSLTj02O66t+7+dAd0RHkYvWILCGbzzEhlrMV0dHDNPnZI9lETPTi5eeRNNEHhzSlMO6W0eA72B6ONQyfwrFUw3UFIUla8+OOwy6QUi2IPZrI9CTXrxxtdgDrv6XjwnCz+Jc8gX1YhS94rzTLzM0UQQ1wuOtz6WTKwSHIwQe5DBQOnXo4HDGC5HpxSmj7yGPeIDFpeDSWEuQ2XdJbL6NoyLB6J3b5QOqlEtqq9MQFFABdjXzVP2LGstsu4EXIbsmtW8bIT67mtkWIRIE6pMx7vfv0k5MFj8YQ8qOKj76ErdZGCJzFLIBDV5tMBVfWwavJWMsg01CqK/IL6rOUycciOcgCwE2nx/032w7BUp2sFd2jQ6RYIRKlQYAhON3qFoz2fJITL8qtXhFyqkr9xF6tMaKMrqTwGSyXiPrVt46tMUkKryWknCmeldiCXyyxC8KFuGZ9/QVCJvk7AjgTtimTmr7hozGIfEZqR4X2bsI6CVog5SW0b4qaHvYPvrjVTVTObqdfQGHwYyY7siZeKr+2CgBCFwoZ9PWe0oUYc2Dr2ZBTbG9FnUPywwAEm1dv3Y6Bgw/8KRoUb5U7JCnk3+dRZJwaXS8J9e2DyY= X-MS-TrafficTypeDiagnostic: PR3PR01MB7937:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wCv8XIK9PraQ0jqD3V71Fd9NKy4X9IcugkdyRav9nMs23EcvMp1ZCJqdcxnXagEpSzLBpq4CApxEsOjcmed6lDIFmmi9L4EQH1BtkXouolZIC4e14CS5V9T0Oj4uxR4n/0GPHm5zIejH/fB/jt56LGrvA7i89R93O5STtLVaJnOFu8o4QhntQ4oWRx4t3AOZAdqYxYYmTr1UDMRjXWwHM9kVrJ638vxTTwwpsM5L7wvrTsVM287NzzxvQDTT/c8WjLdyXcqTNoGsKkLxZxYDspbqRxPGZy0lv9I3jtA6PW/HY0csMuagHzUWpxsEr5yKaMzH5nQ7JdxgnwJHoc37zNtkXkd3ndkjd50Hn/9GGzDErL5LBixpgq9AsWK1NXSQnhm1Nup3rgCkHQ83KLIOiKObnj1304HnDKD620vX2TYzkauQxhMcQJvGM1ZCFjVYeAzESE9JfZrM/1Jv0yAI2VgmcmLBrlYu4DLc+SIObI0KXH5k/dbgZe2+CN/T8v+n1ogz9pDka0J2Okp5bVsx2vuDGG/75IRiXm5dCKVBFreGoePFragg7iz03dn2BlSRKa38tS0k/bU7McixygPrskwl/LO7MWPnjdIlIDxa82T1Sn2j+21XtMHIu53A/GGbE4bo95CJUDQFwYEtmdj0fA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vxgufvSgvjS3oPlrefv+VETbVMU9oiX0A8+XqWJva4MYtiQcx4xHaJa5iTgiN5Mxp4R1a2gdiZs6/1te8DobU+0B7WqotMKTVdeVw+NizsMgOlt84H9aMo1ooc6XTrM8eGPGbAMPVy5bBHwOgpueKEETjg98Ydi4hpd9gtVkYJ8fBAKoEFZyvpLWqcj9lncUd/NoLRxNY8qLcbWCl+tm3PO7GFfn2tG6qSLOBPs1vX1kyrPVBdF7tQ6G0L8dQgraSiFqwduPyELNE1fVJHzCYA7L6+PeQ/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Tenant-Network-Message-Id: 5d90df39-617a-42a8-29c0-08da7eb49c47 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0101MB2219.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2022 11:52:21.0593 (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: PR3PR01MB7937 Subject: [FFmpeg-devel] [PATCH 3/7] avcodec/mpegpicture: Reset fields explicitly instead of memsetting them 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: GYGG4sr3Bz/5 Improves the grepability of the code. (Furthermore, I hope that no compiler will really call memset for 28 bytes.) Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegpicture.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c index c57f149752..884af1731b 100644 --- a/libavcodec/mpegpicture.c +++ b/libavcodec/mpegpicture.c @@ -297,8 +297,6 @@ fail: */ void ff_mpeg_unref_picture(AVCodecContext *avctx, Picture *pic) { - int off = offsetof(Picture, hwaccel_priv_buf) + sizeof(pic->hwaccel_priv_buf); - pic->tf.f = pic->f; /* WM Image / Screen codecs allocate internal buffers with different * dimensions / colorspaces; ignore user-defined callbacks for these. */ @@ -314,7 +312,12 @@ void ff_mpeg_unref_picture(AVCodecContext *avctx, Picture *pic) if (pic->needs_realloc) free_picture_tables(pic); - memset((uint8_t*)pic + off, 0, sizeof(*pic) - off); + pic->hwaccel_picture_private = NULL; + pic->field_picture = 0; + pic->b_frame_score = 0; + pic->needs_realloc = 0; + pic->reference = 0; + pic->shared = 0; } int ff_update_picture_tables(Picture *dst, const Picture *src) From patchwork Mon Aug 15 11:52:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37285 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp1225466pzi; Mon, 15 Aug 2022 04:52:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR6mJ55Ud13xzvAXooIf4mv80XIcjT20zuW3muegAHtDsS3ib5Fn8oJzMK8c2wdp9LpPdvS2 X-Received: by 2002:a17:907:7da8:b0:730:fdad:4af8 with SMTP id oz40-20020a1709077da800b00730fdad4af8mr10298907ejc.401.1660564365398; Mon, 15 Aug 2022 04:52:45 -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 gh4-20020a170906e08400b0072a89cb4513si5981073ejb.494.2022.08.15.04.52.44; Mon, 15 Aug 2022 04:52:45 -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=h3ytK5yT; 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 1EF9E68B970; Mon, 15 Aug 2022 14:52:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068071.outbound.protection.outlook.com [40.92.68.71]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 70FB668B8E7 for ; Mon, 15 Aug 2022 14:52:31 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MltDFWFp93WrNlt0nxuqT3ej0ZUp72Ke2W7swHM2BJPtL9KpV42JtNoKN7p6RpBnT8OzNk7zsqpE/mAqlsGle377b7hqwmTd9XQ6UlrLKOBDG6Tlfqsn5q0ne3mJY13Ev8dXBr5o3ScGM9SAw6FiMQfAQEYLCAsuZUOQ+GD9KwTG/OeMoJHE9UseOnbWZQvxJKckLBX9hzQbLkY3KS1Hvqa3blSLqlBk/6lnDd8SvwayoV/OzrT7QzTxR2yUncP4ww9hvJKQZwRXSZC7OXFATNBWdLWHJvotwOW7ZJh9lpo6KwQpRtGAOGMbPb0wP3rI7+qdm4OB2TidCg5Nh6HgpA== 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=hAywQlRXS4CTCDRp7eiqfkMy2SOfSrkeEiz4Y9oevVw=; b=mB2S62oOBy9GW0WObOANaX4udJNhGJ8FpIVY9JpjJeF3FhVlrag3qKuBFsNn+f+iKw2oxToesVB9csCkBueNSwdHYqxF0AFAHefKOAc0hxzUiBDmt2z6lTZsK5OAIcr5Py3p6BnY6VFNlkjGgieZieHH0w8ZKE5Pa7gDNPuSZAl8CFhcabIqgjvEa8t3Pq2i1gYuEdT9b3+CsPlatbuMuzjeSSs9VrPK66XMU5nff3wNbGcKNtwOurYyjuxdSqMLhR4ZiIjV+Y6MP2bkuKXp9NZdeCQFfa3qfOfWa/ID1dL6VsWAihQXyVs1UjjIYs+CfSnCfrbrZyaMa7Bl87yZIQ== 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=hAywQlRXS4CTCDRp7eiqfkMy2SOfSrkeEiz4Y9oevVw=; b=h3ytK5yTI5mrwxvNZtiML2E4raIZSCp1Fb/4uZEj/7aEYHVcBkyE42X00e77hfhvHDEh20MbHRrcyhjSi6l8ikGMWFUuOCtcpEisEw9u0n+skVfOq+Pl650AlsG6xdzNk2lCW4OBmSmXw/lYlS/QPgME2yt8Ix3R3VSd3fbxKcnHtRTtymc5hGXwJq1fagALE5ToacvYWl/f5uhHANN/4McEJwlS6CHMA836DsEc4GOvKZWkMDEXMwoWfHrXb0hMrPgqQm4A8V1JelsxqAfNQiSmJCgvdSAJVqu4JgtKVb9lBeNA9mL3LrWigNoKqQ0r5yE4plT2uIA6ANor470p/w== Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) by PR3PR01MB7937.eurprd01.prod.exchangelabs.com (2603:10a6:102:170::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Mon, 15 Aug 2022 11:52:30 +0000 Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e]) by HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e%6]) with mapi id 15.20.5504.028; Mon, 15 Aug 2022 11:52:30 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Aug 2022 13:52:08 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [ivQfh6CDLmvWNuiw7iRLVPOs70nPnTzv] X-ClientProxiedBy: ZR0P278CA0194.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::21) To HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) X-Microsoft-Original-Message-ID: <20220815115211.2237279-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1a0c65f4-d2a0-4461-eaa3-08da7eb4a1ad X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXnrnTKVombr7KBDDtrDfGKUhBcO4ZdXFi1X+VyX3XWREv75kQS/xbdLIet5y71bu0V/Pf45stz0fexD+R9M8PVRnDsBgW11yLTn6XmGMCy5SG77RpwOMbzJ01vUffjZnBpkNj1DlpFX11uiF2J2cDut3UYD2THGdumrjq0DGtf4N+/ughv+BIHrzWOuaSSg5rLRLZK67evzNsy6sDIp2wpn4ddyw6Uy7Geu24TxTHZRDmSc7qxzznod1dOhEiu1L/M3FxtbduF1dY0XSq5YNt5nDWvayz+E2a6f0i2CrPjcxGpkTtaIH+oek0iU/hUR5Y7n632bnNQdvEvZ7vLuSgE1S+/XMutyPlgEwmz6KQCkC8KGKN8UsZSSUPamfEierzeVhLb8XyMjQb+5c1kNpGfXynGtQnfqFEjKclX9pGYqcA8J3oIRX4GhpEdYHMiUtnwQtkxh2PuwhWgHHn0pb4Agyb5/fwidRwUu9GEHFPfrNgn6lSqF4bT4j8vAvI8Ulzuw/7sYFtG2tlPrpONiEB3fo0hSY6KiAIw4tfsy6xQYV5c30jPP9QAhCVueNe0HTr5KPDkuiwKef5cPU7eXwh6pHmC//yxvoZJsup/KinvtRnXnIpuKw1Mf8vNSIFXJbgnsBJHzFelESqgIuiQcvkh4FCrzTxIdpowN6fltkSkLGWMRX0lUjSXNj7jf8jOBqNtKE4uO1zQJMcfNgJ7ZPI/vprFYxJz3SI= X-MS-TrafficTypeDiagnostic: PR3PR01MB7937:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YhZCQvmqMWZcFUN+DNCW8VUuW9b2xEBGkiBU/poGEjusVF2hQV6HzniHLOO3dXCxANcw5cDAlTWEGXpjSnBHaMU7F2QamCWaRcdLQPecEWoa1Jm9E5jdoHSto/ckSjauLLxcAleYfBXkZ0JQOa/eId1VvVsQA4BHhVfapR9wuIashrO2fHIXZVULfsCQu20kxQWYmKUZakz/+hSpkamvB+5XEX6NAfKTUu+18NGoyo3vVFdO/7NnzqAbQTAWqOPeaiKcY2YJfqBLaCLtFXUwIFvHglFUD4zjMnAfXYD714FNO2HNCM5+x8uqAUp3zVKfnunURCW2pRGSM3whFrZXV0o52sktN/WoigKxy/PTwBgQ3G+HaDjlnwh4TefaU9421C8RWXhHiutFDC/vu8nPpOCYvB3PmuWkenSEjWGKIlPPVxHT7CdvS4uxZaJyaRDU5CcpEvRULwVvfTpvAXrXCzRrE4XKwGsO0sKDtHmtW4zxzJ686lOjy1mWBgFncqRsgMRFj3jrnYM+BTqTJFyRZww2qvXJTP6bubGKyhrHSkb8Pz2awScOif/w+ZzV8eUMAyd37/SGnWBR/H38vvgPBTY90xZ1fdlOWBI/ezndJkArzwElavfWQvy74c32c971eqrZ9LSXJUy1W4+DTxFOZQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OsLnAiBwFwZYQNURWRaWixDzljvtKZqIOtT9SMQoZ2FqhfJiN1WEEZda3U42yvkd2jrvfoV6BbxtcOYmPRPyAzMVWF3IwwvqrMr9icJz9O5kkB5hR6TA0kt8oRVN/o3C7HgXj6lIJbfmn1lyHjhaRZwq2aw6MDjF9kB7UJ4IzmVP9Vgddi2jtbzBmRq6Tz0bJDnIrbr1iEtD6MQiPxJ+cXgGVaFG4k/Ug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Gt+GZD0b9yZcQ545XEBysI= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a0c65f4-d2a0-4461-eaa3-08da7eb4a1ad X-MS-Exchange-CrossTenant-AuthSource: HE1PR0101MB2219.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2022 11:52:30.1057 (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: PR3PR01MB7937 Subject: [FFmpeg-devel] [PATCH 4/7] avcodec/mpegvideo_dec: Remove commented-out cruft 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: 4AUN6OAGVM+r The fields in question were removed in 759001c534287a96dc96d1e274665feb7059145d. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_dec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c index 93ba4e31b3..17d0c73926 100644 --- a/libavcodec/mpegvideo_dec.c +++ b/libavcodec/mpegvideo_dec.c @@ -73,8 +73,6 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, s->bitstream_buffer_size = s->allocated_bitstream_buffer_size = 0; if (s1->context_initialized) { -// s->picture_range_start += MAX_PICTURE_COUNT; -// s->picture_range_end += MAX_PICTURE_COUNT; ff_mpv_idct_init(s); if ((err = ff_mpv_common_init(s)) < 0) { memset(s, 0, sizeof(*s)); From patchwork Mon Aug 15 11:52:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37286 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp1225633pzi; Mon, 15 Aug 2022 04:52:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR7kxbn/xbsDdTkJEM9Ndpws0/NXWIY0LDNoc9Re+75t6VD8dIsNhXXpCrLyxlUApZCY4PXp X-Received: by 2002:a17:907:a073:b0:730:a5a4:4b7d with SMTP id ia19-20020a170907a07300b00730a5a44b7dmr9835191ejc.533.1660564373168; Mon, 15 Aug 2022 04:52:53 -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 l26-20020a50d6da000000b0043e4a0bf811si7789918edj.186.2022.08.15.04.52.52; Mon, 15 Aug 2022 04:52: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=K+cfeUIl; 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 305FE68B979; Mon, 15 Aug 2022 14:52:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068071.outbound.protection.outlook.com [40.92.68.71]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D3EBD68B94F for ; Mon, 15 Aug 2022 14:52:36 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TYgpV3CEVKFiZm7nDO3566ewDOlscSVxBaA4grq51af8ECtxyFaT+T4KW0UhlfXrx796S8QMCRK5eES6uAqz1XurXX45HagkJudTvm0SpJ2kDDZeSMdBrxx89x26pdS62BIcDD+wKTq7LMaDpLY+UJc0fKUx8qyZv9cU1x7EgYyuUifuTlqFLgXfxF+MjgJgFV7Uh5RAKJFOhWDb4fYlcfRyb6v/Rc3G8cV4a3dtTdhrjyMvGbh//Ut9pC36uqf3fbf3mhUZBUIfAn7Vpqu81Z5kEu+BPSdl6ezk6BI+tuIS+rIiv3ay7U95iLtJa6mQTed0UteNou/bb6Z66V+P2Q== 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=zSMFxosJHF6NblayVH8w+vFbbUq+f+Z/TVFq2WyxNNo=; b=hEvbqac0lRJ0APlysVit+oudlXm07IASHqsWp9WcGo2ESJgO1OLyXTnoWRUhTir+MjX2CuHyvSo5+R9rpZSrBRh8HXBzewsFpv8O8JYBF15ySjBlOFDofNszQmOUTgl0AdIJ8ZvJse6blX3e6scWWyG/arCAiSGcyef0TKflyeXZW/cdYYtjGuBdmnMke5jYLFGOFLcmUcUhuwT4R7OmeYaZYDcCBqhfPGn4ItBM8YyHOzx9yfYfzzeW0mykBUYMwrLrNv1ipLWGrvjGojaVIAs3Sf4eu7gm4MYRDcptnkY4HEIOlgJp83hKqHn37TMxFSZvnJdkJwj37yXFqG5CNQ== 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=zSMFxosJHF6NblayVH8w+vFbbUq+f+Z/TVFq2WyxNNo=; b=K+cfeUIlUJAGIR7GdXqsZW/agsMjtwSMni44T6qKRU/t+nD07ANd/J+RRDRu/slhgMkLDEc81Q2Bi678m7okBN+v72b2T7LYxVkNd5MJn4lLe8O06dSlSGJMA1SEW4Js8VHYzWam+nmFGiXrm4ZcMzj5Al0INm0UybumVkaYo3Ufpx8THGpl/HW+BV6Eec+MCgqnPxuxw8232JmBUUkpBKkp5sJQiEhXVqfQhl9PfCNK/++E+/rGwTM48ZXJaq9xCHMCuwJT9c1OUI7h3nLludiCbqoRysmlTR+o/JEi7pNhtAsFiqGGL/dQFaR9+gtAW3EVKPX2P3/yyVScc5MMLw== Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) by PR3PR01MB7937.eurprd01.prod.exchangelabs.com (2603:10a6:102:170::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Mon, 15 Aug 2022 11:52:31 +0000 Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e]) by HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e%6]) with mapi id 15.20.5504.028; Mon, 15 Aug 2022 11:52:31 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Aug 2022 13:52:09 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [1WWmg2YvXteljpSOxpJOTJRxvIL7cOMG] X-ClientProxiedBy: ZR0P278CA0194.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::21) To HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) X-Microsoft-Original-Message-ID: <20220815115211.2237279-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3aa453c9-e56f-4c20-5632-08da7eb4a25e X-MS-Exchange-SLBlob-MailProps: +LiGfBxqLEszruPA3NiRbT6wWmkcvgVbIs/Oln+osrCyCqAw0X7moBthq1eg0aMDhKliA4VxVddnGpl0kKVXW1Sg/6U2m8D53uPy6csQSmKwQzENnvFLk08efb6+e8l3i+7xX7loIaGodijPxBMukKb2ClyIh/gc1bSUrcvgWIZOW/hyi7tMNcq8o/aauZ2RldaQ4JPWl6TPNpfPF1gS3oJEnmoNH1NX9qmpIlze/lSbSwPnEAQ+5XvAjsQrc7zvFS2kj/41p581xCAlbIvL30faBHP5VoIN0eySNNmMinG4Px4Kopr08q6dAmppDFKju+/e/Tb/aW9IHfMr9+Md4oj9OxUWvvTQwezqZjQ8AFm2TlXUb2osDSy6g7qarYjwzkaZlS4VVoc4akpXoFHCrcvbpZpvMzTO+5kHmbvzSlG5QLCvu4P1XKtJpX4pn6WB/LeNH+pWSR1ZdxgNqxz9Sgpuqt4SQQWK7a2KWT6gS7S32gZfVIZlXS0K/DdXCQeP5Kmaou4O29e5Bk0tD+Zur2pts4M2bfLun3cyLGKkj+hDOtBCXVEG3t6fEO/3e7XmVt4xYdz1DlrHzcQshf1msZA44o5PD1SKlH9swjvijNLXZJbPUQ23j4HibaVw8Uve0Jk26Xj/N28G20QY+vgqmcEFNy0DbO2r/o8z4tMhpFVhmvXbaVMNtR24P2wriVuroCppaIMuiGF6vDfZQCQ2oxcyoocwQu8ONqLzmKa050mpaZty+3pH/QA85nla4hvENSIsBS1WmyypG3jQ78Pjq9txWpftX4A9 X-MS-TrafficTypeDiagnostic: PR3PR01MB7937:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MGSzp90Y/yJUUYMzB83UM4djl/TtTTQtOoik2wMlVG1IrHpyp4OQIrRC1I4+GxWEi3PIVje9qLkZRblDxk3TkC2UCv8Kh57L6heVCdhJoCDf0sTualJtrwMxMMahP092gHf+DlKruixUR11z3wMAK7414DueQMPNsj6HqLt91Wp0BWWhrP0ERYkQ3AB4oBMdEKFxSV8EBVbhzk/jg9r1nbAGPZL9BiI37UQE8oHU5Y4tFXVndBYdQSOKFqIq5itbAS7h65BeSpNpWs5OUDReUysQ1T/ezr+Fcp+RPjiFJ6dqjUbydYZXxTGP9wsxLmK1lmtO9nq70fte3qIqj2papkdmlFlyvJqNT0U4lr62Yu5voNAI5RYKIHfWuyYT3YO4IS6AP51wEEBVQ+jumUKpQg3Kuc6u0uGEU1Dn0s+DTwN4tOE1RYiV/rZn/qLxROJDty/ucjqMmhmOmzalOv7zsmS1xDiBQ9XkSsdsGq0lKxv5BUfzeIPjmYesux3N6ZjK4xZB1fHJrKCgphJJm5Av/oCUy+pqCzFfM8+74Z85L49VFKhJemN1d6FZ5WyIsaqpNmc/p5g+2ZlBxJ+jPU5Fs0TPKkT3fO7yG2zun/tm7XvNRI79kqKb7l6coIBCO8g+C7kbWXCrc/S87RwIqlZeoA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: I1uqSIb2OhccWxrcRB0cK1KolliqMiUzrnElnDJ7z9/8JAiQFoBdGKrteaIO54N+QQ3WrENzDReK5W4AsMyrWDna30l6V1ZNS6UvBDtuZEcEXDU3TqhX6cDJqIFaeKPGeoZihUeswqacSqdDeXU4EitquYH8POvb3eooO1OiLKMv93ZZ+oE9MrT9TPOPz3146BZ0FkjvLGNIM/G9flvRMC8YGIO4KyprBzFoAGKcAd3spojbHzh9XLxGQCCQ1PUyq8MXXANOxe+HrQXomhdCXRaNRcBycqboQzavGAN10t5nzDmIhGykcC7KDwDsi8poL96Km2Em4wPThFfYDnaghEjBUBoy2FJOGCe+0VflXcutdDYEQ+Yl5xXi6zxuMGUTySgyie5I7KLDZqSnTgJZpsN4GjRk31VHsHLW3/rVacau60S7MloQ6f+z35IBrNZbk0ulgCs9rSi/+roxZMvqaBoF1qf/5PuwDs8fVcaZv7tc19YA+cAdMTUWw9Z8MngaND6RcivN65bkDfZnWGwNBX0OFaD93c6i6Mt7+IscFRGTgdlbWUL3pnpFM6ftqrDPxkNv7n4snbY6yN+haaQmstLwgw1ym8/VfeFUG9U4mxHxloEoXqf8YKRy2W3L5MmYqVdfqjj8QZAAjmtzFSEHuZQyY/npxAB+TLM75wVk4OiQ8EF5jqWhVUkvajbZE9px63NsmEhTU1cuHtKup4JJYkEafL+DF4D/8kanIyPXuBCwKGDKcQIDPgk+Mp3vRg6GzFi++IKPWHW1QSxcQq4ho9hV5pzTb+Ii03MU4lHA7oSsUDGNRsW5LZqip1MIP+zhKxVxmttDkDgZmtoJy/GmqYnR53iOBAkUTIPSQI42Tb11GCu5YIcP3PNIExw3rc/TqbMVv1OjvATTpEcZsPNaQhNS9TXl2sk6heA7r0FDRjS6v102SsK9L+RrAYc9CmgoIGHaLTTOCtJ4rlIgUOq9eIsopK4KkgjpN8v2r2eS5r0uR7gyGJQlIiAdves4pd7G7Py+LNyKA2/vvy8OCRQ5ZJCmIabI5B/rJtoEIJUCIab7minGT7acoZOzydbxh97AK9HUph6/9+ixQCRZDGC39lYIi+qiHPQaB720HiT7Up5yqY6+lcZV1pkrh13x9LU0Zl7PQkTIebdM8LycJvCVODcqOxnOi9iHvXPpnJdtjNKdlctZz4LCJgRGki2P5nL+Tpod+bHT4FRqpvFhPyuf7R0tyiosBLxKrsS0QMVrSdSXPDi+3PY+g4dR7ykhWsPPwGM5qEsFDKes5DziKadQHKIfza0UlEVH4z+2jItrrMQ= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3aa453c9-e56f-4c20-5632-08da7eb4a25e X-MS-Exchange-CrossTenant-AuthSource: HE1PR0101MB2219.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2022 11:52:31.2932 (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: PR3PR01MB7937 Subject: [FFmpeg-devel] [PATCH 5/7] avcodec/get_buffer: Don't get AVPixFmtDescriptor unnecessarily 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: a6x1htTrrgoe It is unused since 3575a495f6dcc395656343380e13c57d48b9f976 (and the error message is dangerous: av_get_pix_fmt_name(format) returns NULL iff av_pix_fmt_desc_get(format) returns NULL and using a NULL string for %s would be UB). Signed-off-by: Andreas Rheinhardt --- libavcodec/get_buffer.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libavcodec/get_buffer.c b/libavcodec/get_buffer.c index 3e45a0479f..a04fd878de 100644 --- a/libavcodec/get_buffer.c +++ b/libavcodec/get_buffer.c @@ -246,7 +246,6 @@ fail: static int video_get_buffer(AVCodecContext *s, AVFrame *pic) { FramePool *pool = (FramePool*)s->internal->pool->data; - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pic->format); int i; if (pic->data[0] || pic->data[1] || pic->data[2] || pic->data[3]) { @@ -254,13 +253,6 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) return -1; } - if (!desc) { - av_log(s, AV_LOG_ERROR, - "Unable to get pixel format descriptor for format %s\n", - av_get_pix_fmt_name(pic->format)); - return AVERROR(EINVAL); - } - memset(pic->data, 0, sizeof(pic->data)); pic->extended_data = pic->data; From patchwork Mon Aug 15 11:52:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37288 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp1225739pzi; Mon, 15 Aug 2022 04:53:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR5nfnuUbfKAu+BRm/ki5VqP0qdnsTrGnHUt6Sh8yQlqnMtUsk9kbhGY1A/j7hx4WnVb2aRk X-Received: by 2002:a17:906:9749:b0:730:c005:5d59 with SMTP id o9-20020a170906974900b00730c0055d59mr10160578ejy.419.1660564390383; Mon, 15 Aug 2022 04:53:10 -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 r6-20020a05640251c600b0043d9d0dc4f3si8765137edd.451.2022.08.15.04.53.10; Mon, 15 Aug 2022 04:53:10 -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=hYdxABWY; 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 2FAC368B98E; Mon, 15 Aug 2022 14:52:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068067.outbound.protection.outlook.com [40.92.68.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5A32368B97D for ; Mon, 15 Aug 2022 14:52:48 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B9HZA3Vht5PtQ2C66jVJEN36+AMM57NVbOzx44DehcUVnW9yOWokjW2PSpwF+YD/yLxqEuJeK4wszkR/ABeEIKRcdlqK0NnAZOEvZG1Z6ZhoSlwCyCbfQaS7EPjS1CTp7NkNVgC7hdHjQQzO/FQvgOi5Ze8fN1f87GKTfkMn6RscAkSJU/8kTGd3ZedGTXG/j+jPH3Lh4Rbza7TP+P1jVvbBX5xUt5N2UTzKfv9Lq1hHYDepQ7O8xiVHkncmPR1yccGXeD0M+Yyu6EpsFliAhBGJLLI9LooeVatFsI+b2C2vj8JK6loJj6DRUZncFpt6DazSSsSVDBVLzPGCNd9slw== 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=f+cELD++EneQEhETXxwsVQdoD2GImGtB3nyLjjnhW5c=; b=J7rKnRJyXttB8xHBGKYEwcffFko0S6+P0TFZfvg/ajbwIKbXbvyrp5Ppf0SpsC+3S3sHRnD68Unofh4MRh92v8O+CEqj49Ui47OQj6Zc0k2H7P+iZhtxOCH5EFH8WTs2GKml1FXJex8n/JkRyhwDdzGcXLevS+cj1fQNqo71O/O6ZoeLv/LfQtydw8TiPADusEXCzRj2DV8jcpokXx44aVajDeNNcHmBwvZWPrZJMCQOZNAQIBMFxPwoHOUa/Iqak8xWEL9BOvHHPfl5pGfaypF2p0AhUpqF1rxHrqmObMKuVM1dmqez4ltY/v7yeqaDx6EJJiOGvG9I53InujsaLw== 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=f+cELD++EneQEhETXxwsVQdoD2GImGtB3nyLjjnhW5c=; b=hYdxABWY0jl5Ehvi18rKP3LbIwkASGApytb9+F5IKYTSWEUjI8JFBZDmi+f2aiqqBwedoJxGFeiT2heXRDcEN0xtevizS1lyIIy/RhZ8dCwo3Vzwdn+zhFnnuxySKWnlc+iJg9/zm05JpE+hirfIeB/Ks+aA7mucdcXI1U/PqV8x9GeQoA3riziGibG2vAez4TNaZ4J5rHIHvsC66N5Kcbs4EdgnwrqPihTOOXnBQIKEhhG436AhBREcNrr2wP2gQivIXlCcJRNp4N6njmo0AN7zvjvbdlc6zzZSRYxeQn1ZXq/jNaCYB/hgE39B42SOs9/71TksJ3Wv0HAS5USXcw== Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) by PR3PR01MB7937.eurprd01.prod.exchangelabs.com (2603:10a6:102:170::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Mon, 15 Aug 2022 11:52:32 +0000 Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e]) by HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e%6]) with mapi id 15.20.5504.028; Mon, 15 Aug 2022 11:52:32 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Aug 2022 13:52:10 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [7K08+c22kqAGSRzDKFs0r/3kAAC02kZL] X-ClientProxiedBy: ZR0P278CA0194.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::21) To HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) X-Microsoft-Original-Message-ID: <20220815115211.2237279-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 08af9c6f-523d-4201-36a9-08da7eb4a324 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiTPBnr/PBTQGLC8wm2swa7NUs05gf0NXkHcu6kSPI8NHBsxhHk/OVz5UkzH7/yRtTvhFoDWATyMzxivyBMjeH0LkQbdAlQws4GU0Vr3T9F83DsspY1pe7O0p4Ja7KNYODXDkIe5uG8nmsaeLVGnTmgmWfY/hBDPOe//Ajal2K4RjVkVmEKcRG711dZrXclrHkEv4JuKWqAjukTGwAclw9ImwDACAhvUK3VUCYbw34DcdMNgOt0iv18F/hjlWXmVlvVCJOGiaIdjbJnVFSVnGzpYPlL1Y7+Xuy/uardPKOV3OtNksWlriEPBdima+ZrgsA+LDPu2ECVPmzG0ki9o3W99xv7P1Wljo8Kf7C1yHJnk9Z+Gcr5l8vDSHyonWzxg2BlxGv+QcNiJdLVdVvoz/2TmUgSG+yHbmYYAYtAv8J/L3SrhtFHxcPQFLY0LFoBAU9f/gaIeMZVnVgImQ025VqMY8c2PHgKCE5R2wWIL2hg/3wiBx40t4DwA0djUJm9VzoEe8jqoOE2SuwMY6Mwuq5pLUIFOREdtB8JPgAfwaEXifV+E7BIgkQ0Io8DRLrXEnd6wSUKhZSzLjRgwnu11dFoGTWy3UF5KhR6Nx9aSmjdvLlHWUEtf6nEld0V2UVkDdJRPA8d0l4AmQMRKKFlBECqEuSD00OKNGX9kv61fBYxaw3DFsbX/nIDKzvzk7SWeB69J6JtoYekIoqQNHx4gHr7nGxzmzOsLsRzrTKwVAG1MMBhjvV/HNJbHhKMCfs0+GgA= X-MS-TrafficTypeDiagnostic: PR3PR01MB7937:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: msCtHfDRkqGuSC0fCiPOgfQw3J/+L5SPRqPmvWp5ZnVyYpfjmI4h9WBfvS7RFRZ/IaKNk9m3JXd39tlL2FXHU+1YZPnqI98KzXP9GWZuCf0MfVKkrew/lEtRnbL2DDWggnVKovWYhcaQ+o3njacU14h5j1WskhIgkry3n6C4mm3LEclezwle9CEF2Lrj+u2N8gJxk5fr4lLlCjkSOx3z6vIztuOwsgz+P19lU39WNxhPjRC0kpVbeqWDL138abkIrU/ajahmW1VS6SdhNbSq65qXQyzGgBfegldrWIzvNKSiQatOgX5BwaM8no8ojV/yNSC7s6civnIAkcvx2Nj6zyyo9xeVhNXL+mQxZoZg45ieH4MXkNbMLoqLA53msle3k0vLyBvFyGXUHOX3n/5cLd2uelvy9IVs7BNcyqUh98qRgzWINsgtLVml7gwgK/EEnUVxzGnaKyUgCsQTOiaAqnyTjnSpG0OORMvyd1BL+WCRIbXIaiVmFDVnBP4HQ6fimbIHYByjxYlNT0JSjQEwM70RNDj2MJiFDcUiOMh4/dC9g1LU5IxXfTNa7W8FujXPQ6sME3bgeqCIU1sT7l01tpIimNlEJWYRnpP7ynhalz7u20QxROsipE1r8X10XXUvSK0UTL56U4lSVSxOrR5G8g== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iRDRXsyXY+3ZdLcH9LGDLMv94rKsXoXy4UOJ+sxrSqBIXmEOsV7vnbZvHHPMrcUeD5VZZwHmiW5NRUjyLqP5V884KePExMCPm/sB+qhOF1CSw+QVxz1yf/V6JEq/4EadQy2PRjn3SU8dZYwWupUrwPJwShNfwDb+L6mqWB0TRoeAQ742Lw41vsQwkisv6qLP0EqCdYKhuMSHl/QRFPMZPyerzIy+AQyB5y8pyEfOXb7doqan+ipy7n9zLGxdbX84wu7FkzOiYDYW4yAPO9cbuCPOcxH8nObeBaX47ccOov+fjV14YVoSTfc1b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7eb4a324 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0101MB2219.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2022 11:52:32.5275 (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: PR3PR01MB7937 Subject: [FFmpeg-devel] [PATCH 6/7] avcodec/ffv1enc: Don't create and keep unnecessary reference 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: nnk3ViXkdMTJ Signed-off-by: Andreas Rheinhardt --- libavcodec/ffv1.h | 1 + libavcodec/ffv1enc.c | 15 ++++++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index ac80fa85ce..3532815501 100644 --- a/libavcodec/ffv1.h +++ b/libavcodec/ffv1.h @@ -91,6 +91,7 @@ typedef struct FFV1Context { struct FFV1Context *fsrc; AVFrame *cur; + const AVFrame *cur_enc_frame; int plane_count; int ac; ///< 1=range coder <-> 0=golomb rice int ac_byte_count; ///< number of bytes used for AC coding diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index ec06636db5..6f8b8275b5 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -916,12 +916,12 @@ static void encode_slice_header(FFV1Context *f, FFV1Context *fs) put_symbol(c, state, f->plane[j].quant_table_index, 0); av_assert0(f->plane[j].quant_table_index == f->context_model); } - if (!f->picture.f->interlaced_frame) + if (!f->cur_enc_frame->interlaced_frame) put_symbol(c, state, 3, 0); else - put_symbol(c, state, 1 + !f->picture.f->top_field_first, 0); - put_symbol(c, state, f->picture.f->sample_aspect_ratio.num, 0); - put_symbol(c, state, f->picture.f->sample_aspect_ratio.den, 0); + put_symbol(c, state, 1 + !f->cur_enc_frame->top_field_first, 0); + put_symbol(c, state, f->cur_enc_frame->sample_aspect_ratio.num, 0); + put_symbol(c, state, f->cur_enc_frame->sample_aspect_ratio.den, 0); if (f->version > 3) { put_rac(c, state, fs->slice_coding_mode == 1); if (fs->slice_coding_mode == 1) @@ -1024,7 +1024,7 @@ static int encode_slice(AVCodecContext *c, void *arg) int height = fs->slice_height; int x = fs->slice_x; int y = fs->slice_y; - const AVFrame *const p = f->picture.f; + const AVFrame *const p = f->cur_enc_frame; const int ps = av_pix_fmt_desc_get(c->pix_fmt)->comp[0].step; int ret; RangeCoder c_bak = fs->c; @@ -1098,7 +1098,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, { FFV1Context *f = avctx->priv_data; RangeCoder *const c = &f->slice_context[0]->c; - AVFrame *const p = f->picture.f; uint8_t keystate = 128; uint8_t *buf_p; int i, ret; @@ -1165,9 +1164,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, ff_init_range_encoder(c, pkt->data, pkt->size); ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8); - av_frame_unref(p); - if ((ret = av_frame_ref(p, pict)) < 0) - return ret; + f->cur_enc_frame = pict; if (avctx->gop_size == 0 || f->picture_number % avctx->gop_size == 0) { put_rac(c, &keystate, 1); From patchwork Mon Aug 15 11:52: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: 37287 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp1225684pzi; Mon, 15 Aug 2022 04:53:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR4JYQP2uJDiOYGJiRm4VrqjZns7I66o4cBYDDpO1Sww2+wBdQC+0Mo1W+bTOvNFEdfROCIf X-Received: by 2002:a17:907:75d5:b0:730:b051:d93f with SMTP id jl21-20020a17090775d500b00730b051d93fmr10226903ejc.568.1660564381879; Mon, 15 Aug 2022 04:53:01 -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 hv13-20020a17090760cd00b007382da624cbsi4938221ejc.539.2022.08.15.04.53.01; Mon, 15 Aug 2022 04:53:01 -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=JRLAYC81; 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 2E02168B97E; Mon, 15 Aug 2022 14:52:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068067.outbound.protection.outlook.com [40.92.68.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1C6C068B969 for ; Mon, 15 Aug 2022 14:52:43 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UdFWSuw2OSsRADKGgdcF6PLIdn/xD/VZgEV9zJ5uuCK8GlIXsnOK5uqV+NXkZHkopfhbQFlLi4O3sJym86PvYhkKyXggnkSf5+EGeQF9Jm0QpD2GETqHqEFUIujUk6Ufuyan7EehoLN21YbtzZrmX8bemVQC3WYQkirj0MKWEQihwmjm1DGRapL6g7lMHfRUttY7OE6NzeYZ4OJ/gAKqthHpyXIHWqLptdkJuHyfGnSYOXg0TC61AcXuCWg9USYK3wFDPcOcQsMOewDDA6lQfb3NYiJmdjoP9QtZYFPMDFjvLCLfMdwl3xZrStsS9j51IuBDScWce23eORdxALO+RA== 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=/i7XGF83S60ab8vNXP/H6jJszDktWZfkhD8qvX7dT+Q=; b=LiO98NSX58GhhcW/6hZp7qawcoqYrgrNZJiiTrVwVCvxdaDDGqvygil9zr+eDo7bjhVL0IcYBjePKIGCN0jfe9qmAGzP+s7JKPHyndZA0YoyerinRLlK0iroYDdT8FjuF4XuiQGyeXdPc+L0jvf6i2I4kJ619M4/SwwbwoYAo8gslNsfU3glMaXP0bEFgB897ghRMGtZyL6GfNiMB2rWLerXBgMUSi01q4sYbms/jUYeIi7KatTq09S+dDj7yHmfCkAjIms7XsSbxDdDYzL4wypE8nC6K82MNunXOyR6iHTPzwyfMHQk3dd00RWLE40dx5N14C2HAfpVY6ty4bkbpQ== 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=/i7XGF83S60ab8vNXP/H6jJszDktWZfkhD8qvX7dT+Q=; b=JRLAYC81r42A7H0bmlBF24mcdqxCOr2MOf2Gyw9/RcXQ3neBU2YV01tnzQpEFL2Nrj+ZjGbCMb31XJWFaL01On598AZ+xh6tiHt45fcuZZ2v4+/0kchJJ9Yeq4FnmcjKVWatk2qYzn2pkpJ5eVrs2znonLPIB6GNPEQRTvPuZAma1D6OEG/BCCz943TFgIC5CBkXDLv+YCIxkOSX+wx+ut4pJb4XTqMce6ULAOj1fd8CJzYaJtwg31qOLSk6TUcn7aSRh+Uj59NSc+k/FGlI9A5++IvkrG9oOOb7jOE6/YimvAqXl+nQ8SjpAc8c7BLa0AsJz0dOGKJe8SSAYxjYtA== Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) by PR3PR01MB7937.eurprd01.prod.exchangelabs.com (2603:10a6:102:170::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Mon, 15 Aug 2022 11:52:33 +0000 Received: from HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e]) by HE1PR0101MB2219.eurprd01.prod.exchangelabs.com ([fe80::a552:4834:4a95:2c5e%6]) with mapi id 15.20.5504.028; Mon, 15 Aug 2022 11:52:33 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Aug 2022 13:52:11 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [T59eWwiNUMbDB4bwHa4KRXR0tiGZq0A8] X-ClientProxiedBy: ZR0P278CA0194.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::21) To HE1PR0101MB2219.eurprd01.prod.exchangelabs.com (2603:10a6:3:2b::25) X-Microsoft-Original-Message-ID: <20220815115211.2237279-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 03ef209f-2ef3-476c-dda0-08da7eb4a3cf X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXnrnTKVombr7KBDDtrDfGKICFMvua4tgRmDYlcom29c+4cZNJFmoEXjzm7u5a/6Tu2A0OoOd1+OG0Wj8VYICMfg39jAy8bZvTe8SgCYhKdytm+7xhrYHzS8l42X+/GsUaPsa5XzAwPv14AEWcjfJhPDnINE5xgOWRdyByR1bQ5zipMfcrZLGoeNKxSYZizoxoRnyB5xr+243+zeAcSKX5tDgbU7QlLCbCI28qtvifkGAuks/mSP3qtK4ppPXWb1+awx0AEplhG3LxMho4dBXIk9son3F00i9enXAdADLkz1geQncHMg+rdTDIhPpIaqi+OQy74YbkTx509tPty80yG1otSMX8mrtiN2FUdkZLEbhD/fnq6t23mHQPq73Fd9g5rS/KD0e8oGkOUOyUbCwKktWK5n1OOx5JyoOZdZic9VLvRUqhUUbFi/fAUGl2cY80fX6HagNSEW060ricLPnKWntg0gnJfg7frFID1sEYo45UcIV1Stn7rfXgVVzOwo0UudGYbqCM7rKqOlc9XhOsRJE1Xc5uRo1QSzmPcONiWYQEPwcvsl4tyoBcxaX02mw4M+/sYrW4NZKa5o5aDyuvhqI3LL6LxWvuuBbAvrsU/FlV7n/VkMqEf8RezPZOopUMbQHNMyCXNL2owFhuPkUsy5uyGJtCaiqMBlwqNfgRf0WwQDHsyX0kxkPRgFM41UHCvsqpsg1Cn+Eokbu6rjD6iTvtIipJdWEg= X-MS-TrafficTypeDiagnostic: PR3PR01MB7937:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wUoflMd9eSgqPxxvqOIAT8+1kd3Pd1OuE2Xkc7sRh9qTtc8ie2YK+4To/R6SR8Dia4RWsXSjYXpk30bqgy8O97OwTbhZfUgJaoVH6t2tx+4RFqvftnKfARPrxUjgp7m2FpKxnCyrgTIl2az946fxOhPa5nbt7Olo2g5NdVG/y3bN5hQa0dxicnm8Hj6LOj0ah5Bnfa3sKZWRNHEbweEN8peY4JXoAU4KS9MP4XvDVdsUkRh6OOV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scJ4gbTc9SQEIdFMTWq7VjQsIIRAZH5ulkKPT9v5vR+YupCD2OHSX8jE96Bu6OLiVN0sWG97hgx8OwtQiTrVcG4TpWjMcAStM2vY/Um/tZpeMALThRqBxHY4e4j1YQqXhKIh4hHUESU01OLIlNGnjlEvM/K4Bq6aNizkmH6Z3WemulzF37rhPNleE0DqNQ7yUcC4hQhYy1oLWlq98BINpbTe5iMvBhixeIa1w5es0Odun6DmV7H4CitojoMfRMU4LwoGffEvW4g4uCtByIsaVbY3/IthRIZ9hQIRTqSluF2b6NaY6jfW1pWVrHc64syPXSfGY0XHjEqLjmr3AaTOsQouoklL740A5JG8LguFYFD/H+dI4/xhfrAdT/QBmTLMY7Rq8eYCIQVHwzkbgScKJOhVIUmmNmN/6RTq2moiFrA17fWDIzhSGS4aZB/6Q/vsOgE675so1dhfYS74tumnMjJxK/cykhM0j7xeHVH34OBCS0dtdKl1svurEnoJ7CeAUeRyE+3z/I3NpZmXc6Pgo/noEhotCV2mw4k8dE+Pk5q0DUWsdWZM/b27azepBDZ5scwSlrytf5GthDpjE+U7gEGAeEaamOZ+2pc0W1Y9/DcON7/mNG4By025QHuXrU4CZDNBg0rsrxvQhWynWFfS+1G2bdVkamWhpVM6biaDBminv+zn6RSpkHI0gXBmNoV2bIkv+GEIWnAXtZIX2HEQ14/hUbF2g= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03ef209f-2ef3-476c-dda0-08da7eb4a3cf X-MS-Exchange-CrossTenant-AuthSource: HE1PR0101MB2219.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2022 11:52:33.7149 (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: PR3PR01MB7937 Subject: [FFmpeg-devel] [PATCH 7/7] avcodec/ffv1enc: Remove redundant wrapper 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: NdrbKjhW5ioT Signed-off-by: Andreas Rheinhardt --- libavcodec/ffv1enc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 6f8b8275b5..90593fbaf1 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -1240,12 +1240,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } -static av_cold int encode_close(AVCodecContext *avctx) -{ - ff_ffv1_close(avctx); - return 0; -} - #define OFFSET(x) offsetof(FFV1Context, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { @@ -1281,7 +1275,7 @@ const FFCodec ff_ffv1_encoder = { .priv_data_size = sizeof(FFV1Context), .init = encode_init, FF_CODEC_ENCODE_CB(encode_frame), - .close = encode_close, + .close = ff_ffv1_close, .p.capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_DELAY, .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUV444P,