From patchwork Sat Oct 7 00:40:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44190 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp161093pzb; Fri, 6 Oct 2023 17:39:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0sd1TkbTNYqt75r5VM0p2dOJ9UP6ull7N6g3pqbEgEjgDQKmPDaMutHSSUzh3fMRaWijR X-Received: by 2002:a17:906:7484:b0:9a2:185b:5375 with SMTP id e4-20020a170906748400b009a2185b5375mr8995451ejl.18.1696639174813; Fri, 06 Oct 2023 17:39:34 -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 z12-20020a17090655cc00b00991f1a1c99csi2039550ejp.360.2023.10.06.17.39.34; Fri, 06 Oct 2023 17:39:34 -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=UhLC2QDb; 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 E7CFC68CAEF; Sat, 7 Oct 2023 03:39:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2106.outbound.protection.outlook.com [40.92.89.106]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3A4BD68C920 for ; Sat, 7 Oct 2023 03:39:25 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LoiOn29ZwyicEyR9IQ8a83eevNInyt1wrQ2Xv36Hsy0JDPZ0zrLYdSHeuEV6LvzSu5uS/aDstx+F23q3n04JImoWz8QqISuFuLjNQJvBbrVGXDbS7NxEPxjr4jiY8OvNdln2OXfNutOMogg7ojeThXjmgVVorDT1SzUKHuFPvBO6pntahjdSNat6E2lU0+9KrsKgiSjlLUKrY0Z9r6OQmrmwR9LYVPyv624oZwvzNqr9e7gOzHeR2o1wtmotReS2XNkcSRpr6O5mj1SVcNf4RaNKr4Pe5IDWklJZ/Fj3sSSAc8EuHQeZfsXNgjmwFzs+At3hfyiaWJmbVsmYLFw8ww== 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=pVkZQA/tq4hvSzaEQmd+nOUNk2bdRRwtolrVGQLY/Mo=; b=Nf7tH4p3X0kH0ldjLAQ/pVNwHSnibAYdUv7us/TA/q/dazYYsJShc5exCD/WOrRqMSqLAZI7FrgMQqlOKTpvobneusyi7k7F8XzsMrEUoEi6tQXPqhOZdUwiXn7nZdgMpuu9GGVhGhsSc/l+cjOAhXsjApWlA07UsGAT2tOVVt0TVhrandPMVNJKTr5lBPSlpr5vcyNvWaIqxhpM++8hYJY4brXCWDUv1AFxd4hBBIOQy4q4h/u11ewurP4hew1iuDlaOCaDZfwSmUvzRM19RgCrusyLdY7Lnn3219IGHCCAlhADN3fAGds1PKN+8UkDIt+aOGRO4029DL/pxecjRg== 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=pVkZQA/tq4hvSzaEQmd+nOUNk2bdRRwtolrVGQLY/Mo=; b=UhLC2QDbdPJLwSUzNwFh+CqSsa2RfhH1w6Oy7y5oMlsMA3tY/S9MJXymNdo4Y31z/LYpPPU/nFWWMOpQr/qvOVYnfATEyVZ9rWfKg2tnAO7rQHJ9Ns/lvTRDTafDLF8pW2F3s4lW+KUbjYd1qZdMuQW/UmoFuGDQ6EWb4g63vDYonysMR8o5Y0dV9A57o3h/BUW8JiR1YFsZXD2LAxBwwIHRjiJRnTL1LZRI1k7vXjoMMK3qu8mv8d4qvlEpt06LtCtW2lVE8rKKDkqzWqTG8xeuDvQahM2xzYBVKnZ/UED3/MQSLr1No2MTQEeA7n1bvue+LXq/pktK9H+G20dEWw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0050.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:14d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.37; Sat, 7 Oct 2023 00:39:23 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Sat, 7 Oct 2023 00:39:23 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 7 Oct 2023 02:40:26 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [q6E3lGkGx5ZwEzi9cw7wNWAVWg6hxNQ1] X-ClientProxiedBy: ZR0P278CA0154.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::9) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20231007004031.2024778-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0050:EE_ X-MS-Office365-Filtering-Correlation-Id: ea2c6d6d-8096-486f-4e1e-08dbc6cdda2b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZfkMAogESYjZQzZad8FUXQQilfHws7eff9Nf6yneYCGQg6o/VxKPyJtlp+4/76J9gtFYQEGJeD/XsAVKy1YqQ0f8V6svDEmBCkGMqOeR1yew8GNfNYz7K39IjQk7Mn0ofkrrGg5UzokNZs1++aDixsRFS3Q1bAC4Dx0PvCtRR0vv+eWvvH4KxLP11hb697OWeEO00FC/VA8FCIUdqYSBlRTqnq4zsSWLycL0utvcVXYtsM+D+3X8LwgMG7P/eiLRQ2cvMXHk0sjBofdo7liajGCckbh2UMn9bfwAMR7LD/aIhxEWzyJiBqYLksACP78kXhfpyO7yPt3BwHCqUjBuWQ9hiGJWqOoCwhLfujqGq20LUrPEEZfIKpGdSc8hwcehp08O0kkNnHOOafey6Mf7pDRxxi0NWT3AAmP63XhQ25UaXXvpOXYve2qM6tO3pnx3GXwla8JzqcOp314wY/+huiSPNo8YRMb+acVwI26IBRjYvzPg6VLpxl+VkbilEypq/GWLtNBUDmHJIpEuRysMf9+iO4ppkpmrbW9LHtHS05inGMKe7KvJ+WJt5jmumIy//twfvsYNLVaot8z1hu7nqz8Xez7t6iYKbqPlfnPAsO8= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LFxtwXeXzj+B7B7Z8PokZDdNq0oGorFjvAf0QZ6Iwsr9LP+tfn8WUrJ/GErrR3w5JWOCUbE1by7S/xtRlXe2lWAe4FaAZXvt/JujUi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QLJiNN+2v5oLxuncXfHk1RMNGctbRtSufDJmaFgLuBP66Z0H44SLAb1VBGIaI9Wm7cUyVwoWPaiiBgUeAhjAu1CEEUpa9N0/8xu+ X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea2c6d6d-8096-486f-4e1e-08dbc6cdda2b X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2023 00:39:23.6928 (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: PR3P250MB0050 Subject: [FFmpeg-devel] [PATCH 2/7] avcodec/h261dec, vc1dec: Don't set write-only macroblock dimensions 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: hA/2otZvfrc/ They are generally set in ff_mpv_init_context_frame() (mostly called by ff_mpv_common_init()); setting them somewhere else should be avoided. Signed-off-by: Andreas Rheinhardt --- libavcodec/h261dec.c | 6 ------ libavcodec/vc1dec.c | 3 --- 2 files changed, 9 deletions(-) diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 447e168c4f..a4e0bf9cf2 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -530,17 +530,11 @@ static int h261_decode_picture_header(H261DecContext *h) if (format == 0) { // QCIF s->width = 176; s->height = 144; - s->mb_width = 11; - s->mb_height = 9; } else { // CIF s->width = 352; s->height = 288; - s->mb_width = 22; - s->mb_height = 18; } - s->mb_num = s->mb_width * s->mb_height; - skip_bits1(&s->gb); /* still image mode off */ skip_bits1(&s->gb); /* Reserved */ diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 534128d6ee..58a50f085d 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -741,9 +741,6 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) if (v->matrix_coef == 1 || v->matrix_coef == 6 || v->matrix_coef == 7) avctx->colorspace = v->matrix_coef; - s->mb_width = (avctx->coded_width + 15) >> 4; - s->mb_height = (avctx->coded_height + 15) >> 4; - if (v->profile == PROFILE_ADVANCED || v->res_fasttx) { ff_vc1_init_transposed_scantables(v); } else {