From patchwork Wed Oct 12 18:06:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38711 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1505621pzb; Wed, 12 Oct 2022 11:07:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM578esdrQmjwKFJjHJCw1v9CHnA2Vggkg4c4RXlN4nPtArPuSPCbI4mXcgviauGSB6ObPvT X-Received: by 2002:a17:907:3e02:b0:782:1267:f2c8 with SMTP id hp2-20020a1709073e0200b007821267f2c8mr23617993ejc.585.1665598037972; Wed, 12 Oct 2022 11:07:17 -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 t2-20020a056402524200b0045968aa645dsi19846791edd.30.2022.10.12.11.07.17; Wed, 12 Oct 2022 11:07:17 -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=B9+mDa+u; 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 752DC68BD5C; Wed, 12 Oct 2022 21:06:48 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067025.outbound.protection.outlook.com [40.92.67.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1B01C68BCDA for ; Wed, 12 Oct 2022 21:06:46 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GWfm7IVGvNLM2SXxC7NVzjp+nrKKmAUfR/Pa8iwG6g3M3p1JBBxZIS3N8M3MCb0ogLF6Vfdua3G/3v9A2SefucFsElKoLsZ33rJJyJ2Gy2JAcg5kfo3j0E22IRENEu+MzvzMFSKF6iG5DBER+bs2S8YNvm7ThE0hkEKMZaOSyoNyHk62OCxcBuFDxWROaEW9phb//ZwfIA6thm3vhABtRy0PopBRVAYD3Jx8lAKw3UPZE5Atkn4tgRtGsIHfZHnIy50HZPNAKL9P7eBqOPG6cXaEpVslaSxIBHxXObTQ8CplkQtgJPPX8k7ZTuBSKskQrbWKItbx4wUQn9DTTePcYQ== 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=XUE+YHYo6HKQfDBVvbC8ePoXG4C8xmTmQEFhBObEn3s=; b=XiXw1UwtJ7pzZCcTncuUIaWHtgeGYvpCZPoqrfsOiGHaBpz7UuOAHZCPufVU7X+p9szC4scCAQXSPtZYhiCuMl8jR7AUHaX91z8tXD/4gBuqhTpWbOlDpEO2yDN10z2Y+4NP1Pk5HCQDanDBzULetoXzfK52EQ6SPQPo+PqidbfXDjdCT6uZ/ugfYjGkJx8Md8WUId/EjQxWdaXUAqs7Rfl+NLmuXTA1Iz+3lXL8ABoXnouPFNYm4gfqHvCGrr1/LNPehFo6r7QnzJu4lH2db+wP6Mev4OJ1wJ85xJDImYtQ6dbhBhfkMi5icsKCCe0+2lJvT00y4vc+COoXUHBgYA== 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=XUE+YHYo6HKQfDBVvbC8ePoXG4C8xmTmQEFhBObEn3s=; b=B9+mDa+uq+ChsY1lBzIhuhPdYD9Box1FU0YDHaFsGC61+azMsRLrdHweZ+azHJa/vFmFYDHG0rAV72+buYCye+Bi3FnTvafpR557iYA2IsU4OjKQ5GuxagI0LTol6QGWmK7EoRYJlBgEAP/GAcDOTHPCrcsA2SjJcyXhmSnnIRxzGFR9+TKaxF+D4AkG7APKdhQ2/xQsM/eqbhqURL5i88g80936KJalf+CitbjpYGwTyyQ1BnhCipKuddurfh7pcxodZbPtLLFTRhMYpUAKZ2h281qJHhupzdaiXdLf1elIYbtB61AML5YJT71nYzgZ9ibyvP5jNPlyvHJn41efbg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0095.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:270::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Wed, 12 Oct 2022 18:06:37 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Wed, 12 Oct 2022 18:06:37 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Oct 2022 20:06:23 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [E8QAQVqjdVpFmHKqMUjMi4O3WQsYyYw7WdLtZfGpeSk=] X-ClientProxiedBy: AS9PR06CA0077.eurprd06.prod.outlook.com (2603:10a6:20b:464::24) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221012180623.1834366-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0095:EE_ X-MS-Office365-Filtering-Correlation-Id: eb9386c1-ede8-4ff5-83c5-08daac7c8162 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqnpNgInvu+2FGvrKiQOZUvzX0soCLuFrsYtl4NQyYA97PD5wN+6KeqCChIeJivYwPaVzAotSMv3/w2P60HIONPyi2EeCJ7bpMHBFv+SdEOj1gATDDpWjsGvX1NUy30PpiS8bDMA+ZUPX6iNpemQW4i//6nPBGTjWI9roFfACRlJ1gjUxVef32uzPl7De4uw/WGtGzdUdChfetAeMTz2G1imub9s9p3rVY7jTYLaxKAzzzjKTck/Z5DKUTLo+3a/1dSjT58Ot5ibLJjkESzxOvmgCgzYO48dhAG618ZHo2zj48+eKOBJwV4ahAFpmgFmNKw2wj6PG3aWakCjJobFIFAEJcStzCsUrA63O3iuU8PDerGCqGT2pPn+N/moeovNpEJSK6+gE2Foc9dIM4scOOp9/r5SHqghJAN/pubxvsMOBJslo/OAZFj4AWJYidMRUCEuBY1E9T88xfb4ySIJP7dKiA5kQV+oBpExfdDxFy4B7WYKOfQcdAcuf9F0+GhwwexU9k/+ZgwXb9zbafTtqFBBF5msaDNm8td6F338tUgFmGx0jl1fyY0L2xMztUqHw+6VgWt7GUIRs49pHEesbUbLm6TvR45PChBGLtnhH1Pir+7ZLoKxGn3MTzrwOUUO8+MqcNi83/nmsaSE9tBcI6I2F47PhS61SvM/+X70Aw1Hif+g3xNPQBDQ522itXbC6Vb4F7OyFU0PoyFC0aGSnVgtA80r2pKec1/fWH98XHv+30OdAfZmkJgyBoLzMpWi14= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L8lTd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Bc82JWtwPpWoflrma8entMl2ehmmNbbUwuy9/S1rsjL7U+7J/N9/DqmVf7pH7qQ5mY4t0pDf1nMC9P3EzjfG5OuWFPG+0mvR0Nb4/LncPGimU6a3JebMuP7Sbd4V4pL36DdjdET+AywyMbTcCla3s+jMlwT005WjsyQr+DjjPzQpo1FvrQVqE+whYd5O6cDpz65WtuHoetrFiTUjtzHhEJKuIPFX9TSOG9gxnT2HFxEmYNG6FBjVlEd4Nl2o/ewE7sBXn1Fu7mKJjfOxqJzuuJk4S3Vz0DdzptfQ53VjtK/lnsfTHGgCau3aGOJBpU1XvIfLGH+DBXnYAmGmn0fz2Tw+JyUWy+1fV1d9x56WEalJpRamGcYw8nZq0OBCwo8yLUfAxFQm5vC66S8rhpMop7z0RmZuR75nuw4TIAboF6gorhlWM16s5/KlBOtblVlUcpvp0TPhHlEKviCgovM7nt5gjz+eqUfqEB7C+AaycFO/Op3VZb9ZV0z+ijn91fP+JlQOagasB41k97/FDBHvix+btAltfecdzGyb/vKU9QjaW/QJoSSltzMh9f7X7LxZNUkthAlBOlraSPx7TR1JxhaXTKh2sdu3STktyC/xSOfKii01ku0dC5hjjBHpThnrL/g1H4VpD/DRVII/TVUuiZCpe1bmsBZDN/CA9Abg2z+zcm/IJjU8MgpUR4xzXN88CectJg0bYAQdlXoUb4Lz4ca35xr7+QyftIvwAveV80H0hPsWvmMtxzcXfJ3cQrK7qztBZG9hdcMlSBooBzwaw6kBwWhUBlXKSj727zWxluRphbHMJ0GbaNnkB9SbCyUGDgNW/tDf4MS3gixtvuIMEJGUH7RZMzF1Ww4ClQY7TDvGWqlwEfEIgqAi/fGugT0RhRwj9tAt1FgFZCmSjnRdElKt0fjN81tysStwNcivqExRGn5j7exRr3hcNXA1mhoAUrVx4FLGhYqv69zDd0kdMRIT1+O2bMYX3KT76i6pxZt9POszCuazYxwHOoHx/Ij X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb9386c1-ede8-4ff5-83c5-08daac7c8162 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2022 18:06:37.4860 (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: DU2P250MB0095 Subject: [FFmpeg-devel] [PATCH 6/6] avcodec/mpeg4videodec: Reindent after the previous commit 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: K5M9nLhCvl9s Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4videodec.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index b4e2c09706..c4f268c534 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2001,25 +2001,25 @@ intra: end: /* per-MB end of slice check */ next = mpeg4_is_resync(ctx); - if (next) { - if (s->mb_x + s->mb_y*s->mb_width + 1 > next && (s->avctx->err_recognition & AV_EF_AGGRESSIVE)) { - return AVERROR_INVALIDDATA; - } else if (s->mb_x + s->mb_y*s->mb_width + 1 >= next) - return SLICE_END; - - if (s->pict_type == AV_PICTURE_TYPE_B) { - const int delta= s->mb_x + 1 == s->mb_width ? 2 : 1; - ff_thread_await_progress(&s->next_picture_ptr->tf, - (s->mb_x + delta >= s->mb_width) - ? FFMIN(s->mb_y + 1, s->mb_height - 1) - : s->mb_y, 0); - if (s->next_picture.mbskip_table[xy + delta]) - return SLICE_OK; - } - + if (next) { + if (s->mb_x + s->mb_y*s->mb_width + 1 > next && (s->avctx->err_recognition & AV_EF_AGGRESSIVE)) { + return AVERROR_INVALIDDATA; + } else if (s->mb_x + s->mb_y*s->mb_width + 1 >= next) return SLICE_END; + + if (s->pict_type == AV_PICTURE_TYPE_B) { + const int delta = s->mb_x + 1 == s->mb_width ? 2 : 1; + ff_thread_await_progress(&s->next_picture_ptr->tf, + (s->mb_x + delta >= s->mb_width) + ? FFMIN(s->mb_y + 1, s->mb_height - 1) + : s->mb_y, 0); + if (s->next_picture.mbskip_table[xy + delta]) + return SLICE_OK; } + return SLICE_END; + } + return SLICE_OK; }