Message ID | AM7PR03MB6660928EB7F0A88D9D5628678F269@AM7PR03MB6660.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | f7d44804a6fe5c3ce29464553411e184eea6461a |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2c4e:0:0:0:0 with SMTP id x14csp600329iov; Tue, 1 Feb 2022 05:07:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIHy9VzvO73ACJmS0UFiQZzmnaUOSa67p+oAHjy0GwljS8uBObUlI3dbgXguKpiZccH3Jd X-Received: by 2002:a17:906:d551:: with SMTP id cr17mr20198622ejc.27.1643720856137; Tue, 01 Feb 2022 05:07:36 -0800 (PST) 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 z10si7947796edc.165.2022.02.01.05.07.35; Tue, 01 Feb 2022 05:07:36 -0800 (PST) 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=JwYDrhTi; 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 C22A168B2AA; Tue, 1 Feb 2022 15:07:27 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2063.outbound.protection.outlook.com [40.92.89.63]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7170568B275 for <ffmpeg-devel@ffmpeg.org>; Tue, 1 Feb 2022 15:07:21 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N1amdK67W0GQGzJ9T8bUOrsAICAAPz+K+UqPZPZ/wpCP35cv+qQYpocTlE6GXcmOKMH37z6ImxN5mpYHWzs6AJAlSDykcQE4SvsAF3qp07bC49IHs7jN/+vtGn7BvlBBx6EgVkQDVr4bFaQUYev3WN2OGc9zchBKxvGwoUZOyZxFK5rz9GU+U0BKmHf2YRE8glpYVkVw4BKXeHBJZ5uxU4PeXz963AC73XF0/UgAybIcs5TmQjmv/ehFtaN8M9gcvyvbB/OiZvH8CYKHjxUzE8u7kw3eCoYeF0rdMfNCEAsZYq5C9gxtmUg4IwkFeaCa2lEf2XdQOkA109qnQVtZ/w== 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=0kx2hBfKC4Q0c0Te6zy2LeREuXtmgPHdd3HCNzjxdyg=; b=I+pn1ZmVNIoAxKhVItIAEWzNWwiy5MSNt7GcHrFUECkMHeEd2gt6toEpa70k4HN97gDA2LBm/dDbi6QBmtgqkkX2DuhkoTHnuVipL5eyglej6nSI28hLpry0Wraq+nivDku70LFIsxYQapVWqTG43GUhX97GkB9UljBkzJ/fqvRKgLwH6uEl6fBUd7h/+03OFM9sIu+WcB2N8wfdM4W091VDc+gtsTN8GTyu7gQIotD1cPNCG1VOAhxCvJIGBWRULGREaAQwlgiJl3r+WyKO40r4W24o6WzGSTU0DsLXaSzkTvhWf/s6t3/Sv1wdrH+qizGUilcgCmUCe7+WPvpWbg== 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=0kx2hBfKC4Q0c0Te6zy2LeREuXtmgPHdd3HCNzjxdyg=; b=JwYDrhTif0aRXi7n/daJvgrigIZguqJSQo3bMIKd5oFBy/S7Kf38f7logj37vZdsWClhZ+lSr1rmNP9TMSMnnliLeSM2atYvzll/gK7IMtmPy3WMP5kmhZsI5JTQrXerLGXbFPUdL7I407QSMJ4YyP7NB+72yxrWaN2pEEOKIcRRIQDbV/ytOLa4J77cl+VTgt3m09E6s700AkXM5Z1MVZbkvjvQjNqADYbMTpTwm6V+ULcnwflYiZLoSWPMd3QdnYDkiW/gWZ2ICOK/hGWwUgm5sZymZJXUclPLyAFQfcrkbmEhXQJ1U+/ZpNVHAbRJ+WLGWubTzCvLzjb90VbH+A== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by DB6PR03MB3046.eurprd03.prod.outlook.com (2603:10a6:6:34::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.21; Tue, 1 Feb 2022 13:07:20 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%6]) with mapi id 15.20.4951.011; Tue, 1 Feb 2022 13:07:20 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Tue, 1 Feb 2022 14:06:00 +0100 Message-ID: <AM7PR03MB6660928EB7F0A88D9D5628678F269@AM7PR03MB6660.eurprd03.prod.outlook.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <AM7PR03MB666068F62BC40F2C6EAC1C658F269@AM7PR03MB6660.eurprd03.prod.outlook.com> References: <AM7PR03MB666068F62BC40F2C6EAC1C658F269@AM7PR03MB6660.eurprd03.prod.outlook.com> X-TMN: [hk25B0IigmALHx8CFO2gnF1sqRe2l3LB] X-ClientProxiedBy: AM6P195CA0092.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:86::33) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220201130706.1420875-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1dbe1bf2-b6a3-4d44-0a10-08d9e583c77d X-MS-TrafficTypeDiagnostic: DB6PR03MB3046:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X2IBXab1PVkwNyD9khAA1FgFIvYgFuroT6fuDT6Q5U/QKYxj1Z7MwcIbMIACtOAibogTMppJ5herivwzEl+2btudpLGLkVQ6vH+E4qkgrIEMtrm3Vsn2lP6uBG4aZ+9rnesuVqNoDarniikPHV/D9twzw0Ll1g1MR93ITkOFvzuZp6N7Pb9ObG1MWprXFDcMFWBXYp17ypyvPWS7T51UBDojvOOSuPeefe6a/8d222pn29RZdmYPjRWCKvMsox6IeTR2uehFwgc0NTkfmtwxmiMHlg8tNnZkDoCthYABB8PYdh0xMrIk6sesLnHybObuODA97EZc8ZyWqmBtGXIvKREaMmGDys4e4RWGUbSOZIQwqM+/DJ4xTwkGhc+jPsh/PHRABupzR5woGwz2Ewx+J9WodsmzU+fm0uUfu4HLn8hNr4PrFbtbJDFoZ9YYfJ0eKEyvMpzoD0AAYCTzbk5IEJ8IE8AP5qb9VfSlFBxhuoHdhBV+WjKs+LsZz5R1j6x9U5H7VteBwdvoLBIlT99f1ygdEkuvvN9zX5w+Zj1YogJ5Iu9fCUD5YqxmhXgtWCzL X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Vt7pFmFE4i3umIbl/EbABO32u6O7BC65bL4bnScnieqdpi488/02yKbR7j03xEva9zNmUk5E/kQV4EQ0gaprnf/gdTFGGCaRiv7owbDW39NwUL10N37/KYFVUVPIFn68o9sqFmh8+HA4NcevjforuOepVY1x23uaqKhyq24Vc8cQ7T3Ik1bD0Q/FzJXcZ1EfbAK6q/yU7S4ZbuzGk0AOJ68Pqhy8Sws4lst5f1KY/JiDydPnOXgwxIwtvbW+q9HrhaMq2NjKzjYwLwu3ZoVVEqIG4brDlf+IEWK8syb62Ke849RKtcCOYKMqTCjasXWwE2CQMYknkzXiqbONOSW7w8gCv1sv+VJ1vEutN68USaYg9hjviWZxc2sUMxDC6FSEZVwk5AZFDc7flRVnAiKKAGBNVT+DCmY9sVYSDbtR5ZdnaDZ7WPsfcVHFmXaxIwr7gTZEFx+y68PjlNdW3T+z5MEWcxTmPw2ec7ZxRsQuatKmWN6TMNx4/RKGZKYmJpseuRXGmcB3oF/uC9DHqtRifbKU4ZqphvqmlH/Da38zod35jprDv28QUb8YnRfq3qQ1V0IZc2grPvkVtBErP/mJK3UoZGlWnE5mrM64w2rZ+rio21Q+q+wqZMi8VCG7m0BDOTPZhDx8/0srl2PjUeNusrWvrQE4pd5R0BrmFSnpirFftMDaeLWdcWAYOi4soShTHiy5Rrqz+wTT02LBv1YXbx7FifcLrbXierWJu9Uey4av8MbhCTNPGDJ4Xpupp+01csYFaM5PVQxF9wofRrHAUGvi154reSCB+vmm2dUOF+3XvbXoz3TtrJ7JrRh5tn8iErmMkwEzt8lX7Miyi5ibQnmpw+zZ9DI+/oC2FLS95GLVPXv7PDoLfMm9Sb9GzixOvV9s6GDZ+ugCs32+cL8jQ/yFRF5sz/m/yP4i8aThrrLgpvGC0Bl/VZiTQGGcLf2Z3bCpYt1tPWZpEaCJhRTrUw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1dbe1bf2-b6a3-4d44-0a10-08d9e583c77d X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2022 13:07:20.1836 (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: DB6PR03MB3046 Subject: [FFmpeg-devel] [PATCH v2 03/69] avcodec/mjpegenc, speedhqenc: Remove nonsense assert 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: z0LYAofPbmzO |
Series |
[FFmpeg-devel,v2,01/69] avcodec/avcodec: Avoid MpegEncContext in AVHWAccel.decode_mb
|
expand
|
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index d15b9ece50..022f171c9e 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -293,8 +293,6 @@ av_cold int ff_mjpeg_encode_init(MpegEncContext *s) s->mjpeg_ctx = m; - av_assert0(s->slice_context_count == 1); - if (s->codec_id == AV_CODEC_ID_AMV || (s->avctx->active_thread_type & FF_THREAD_SLICE)) m->huffman = HUFFMAN_TABLE_DEFAULT; diff --git a/libavcodec/speedhqenc.c b/libavcodec/speedhqenc.c index 967774931c..6df0316611 100644 --- a/libavcodec/speedhqenc.c +++ b/libavcodec/speedhqenc.c @@ -87,8 +87,6 @@ av_cold int ff_speedhq_encode_init(MpegEncContext *s) { static AVOnce init_static_once = AV_ONCE_INIT; - av_assert0(s->slice_context_count == 1); - if (s->width > 65500 || s->height > 65500) { av_log(s, AV_LOG_ERROR, "SpeedHQ does not support resolutions above 65500x65500\n"); return AVERROR(EINVAL);
Our code for writing optimal huffman tables is incompatible with using multiple slices and hence commit 884506dfe2e29a5b2bd2905ca4f17e277e32acb1 that implemented this also added an assert that slice_context_count is always 1. Yet this was always wrong: a) The MJPEG-encoder has (and had) the AV_CODEC_CAP_SLICE_THREADS capability, so asserting that it always uses one slice context is incorrect. b) This commit did not add any proper checks that ensured that optimal huffman tables are never used together with multiple slices. This only happened with 03eb0515c12637dbd20c2e3ca8503d7b47cf583a. c) This assert is at the wrong place: ff_mjpeg_encode_init() is called before the actual slice_context_count is set. This is the reason why this assert was never triggered. Therefore this commit removes this assert. Also remove an assert from the SpeedHQ encoder sharing b) and c). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/mjpegenc.c | 2 -- libavcodec/speedhqenc.c | 2 -- 2 files changed, 4 deletions(-)