Message ID | GV1SPRMB0021223C3CBCBA96E0A3E5618F1B2@GV1SPRMB0021.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Superseded |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1509:b0:1a9:af23:56c1 with SMTP id nq9csp1698776pzb; Sun, 28 Apr 2024 17:37:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVtTVkp2u/1815fkGkcQ2lqDq0v9/dcYGKc6z1ZUW/lDjEllaKKr+UZPpCEjkLjeolbphw7be2pWlDOhD/Gh0NB/24tkN1+5LS8sQ== X-Google-Smtp-Source: AGHT+IGd4cQK598FqnErFx2zpfBlqUzxFGPdNxTYwmd8kWeUgWeMjjCEcHVYasTyYjGSwqQrv2vv X-Received: by 2002:a17:906:cf83:b0:a55:8f2a:950d with SMTP id um3-20020a170906cf8300b00a558f2a950dmr3635183ejb.16.1714351043986; Sun, 28 Apr 2024 17:37:23 -0700 (PDT) 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 u14-20020a170906b10e00b00a553476400dsi13447486ejy.981.2024.04.28.17.37.23; Sun, 28 Apr 2024 17:37:23 -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="a1mR/0nn"; 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 49ABC68D498; Mon, 29 Apr 2024 03:36:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2092.outbound.protection.outlook.com [40.92.59.92]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C52DF68D479 for <ffmpeg-devel@ffmpeg.org>; Mon, 29 Apr 2024 03:36:05 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MFpzo3vM8sm5o8DfuVssOvYnwBNj/l53FNYz4wQLAzujnTCHAGFlJsFxn3GVBBdIcb52YngjCaZGv+kp0fgZJXSkXP0t4EKLlG7nmTm5AcyJfMNG7WYzg/E9rU0JL/QlNEEfcKRn4pP9f3DXt+YZnY1/tMOBgPtjoUdEO4tU4DNnbLTkl7C1PTlJmvRnDjF/wp8yDcngxrwA269Wgw75N1/XrXVp0XNh8GuiQH3ACKkwzVgPQCNHqXa1Uy/+DJXvf+uHDdaX7hJstJrZPDLiNL7FPyvH6OW35F+RqbyYOeGCuOYF/LSsZE01XZvKT/tV+gfSTAUeacC4jIbuKu2/sw== 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=2vLttLR1fxgjycn4KuEmsk/mDwuAnNuq5i+O4Ioj30g=; b=kRTtZPeDW65oHLsdDA8uGwuhE1QvkWweiL6NVcUc0kK5QVZvdH1Okb2N+tf2xMr2UMigRjaLox7zLw5VpV9U3M280rHoP1V0/2E44uyfWyw31DvtEIxlNu2I5hrlsmz4EqkkmT9RI3JnjC6yGhE+dSVIh/V2n5dwEjOJzs7hUphVNLLbkpDPZouxh3uJxg+FaAyAht9TnGUwJ1Uz8n2hpK6nDAeSz5fRqAehlbUQJCq4m40SwH1ltHyjaydhBthR5o7AHLsQ8/87iZOZVpWsONVEiE8Yo6fOGOzBM9rnPWkgCL7rKt84ZnRONVJik87ggWxvZLGW9DOom170481kyQ== 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=2vLttLR1fxgjycn4KuEmsk/mDwuAnNuq5i+O4Ioj30g=; b=a1mR/0nnUAoAmnNSa8hstu4OQHFU8E/tBDcUN6seTy5U5wgTnZxAhtAyHXCw1nF//rjDifIQLQFEWelSxP5kOIC1WoWP1BGovfixL9qRKHd3Z/0J50pnwqmD2L4/ed0LRvWoogQIGXau1lqg9qwDJX3fvpNbJGF5dXxqZwJxcIdk0ScHrmCxrnA6kiZd0JUkG8MDD0y9/jc8C6IIIYQUUMSKcJAPvNI+YnBLjeju1W6Bg1MuT4Eb4elZ8rMATvVpAHPZk5NGmnkhjw/XZbAF5B1tAvoWFUn3FukVLD2HrlH4EX4l4wX2tWaPmXEwuzGuvNvoPDTrCKb05v2WGcg+Yw== Received: from GV1SPRMB0021.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:60::6) by PR3P250MB0068.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:173::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Mon, 29 Apr 2024 00:35:58 +0000 Received: from GV1SPRMB0021.EURP250.PROD.OUTLOOK.COM ([fe80::4eb:f54f:b451:34fd]) by GV1SPRMB0021.EURP250.PROD.OUTLOOK.COM ([fe80::4eb:f54f:b451:34fd%4]) with mapi id 15.20.7519.021; Mon, 29 Apr 2024 00:35:58 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 29 Apr 2024 02:35:33 +0200 Message-ID: <GV1SPRMB0021223C3CBCBA96E0A3E5618F1B2@GV1SPRMB0021.EURP250.PROD.OUTLOOK.COM> X-Mailer: git-send-email 2.40.1 In-Reply-To: <GV1SPRMB0021759DDCCEFEB3B9609B808F1B2@GV1SPRMB0021.EURP250.PROD.OUTLOOK.COM> References: <GV1SPRMB0021759DDCCEFEB3B9609B808F1B2@GV1SPRMB0021.EURP250.PROD.OUTLOOK.COM> X-TMN: [gBWmbeALVrh5i1iwBKZUM2uZxOgoE52pmeJ86LFR1fQ=] X-ClientProxiedBy: FR2P281CA0080.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9a::13) To GV1SPRMB0021.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:60::6) X-Microsoft-Original-Message-ID: <20240429003535.1516058-11-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1SPRMB0021:EE_|PR3P250MB0068:EE_ X-MS-Office365-Filtering-Correlation-Id: ca30bfa5-2cae-4aa6-5d24-08dc67e456af X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: pSrX3Vab1iZJKhzujo+6SHehrTD/oPaDS64Q5aQ/CSJ1ce9j30l8GXv+/0vM3ltmHDVg3x78QIB4dgEEYFpUXiFQCylRk1HA7zKvDQ8bxM8XPMGlyy8nO548tWFDZJh0p9R4RJFrGRJNC5cKqjtLZfoYy4/YsNMPwzZuoCzqSYKlts9VJjbS2Ho7fAQ2SKLe+JyY2MuNM5LTNH5n2Ft4BIPezWIIeAB4QcKUj3zetFtnNp+eLNPxPY1225Q+UiZBrS1tashXXGvmGQRh5lRzMf5dy8g8nPfHGm6xstck6U+qAwcM+sntza8RcNM7CYXNVI1IU1mZ5SYtAxg8vzPDAMQGW5RBO9tTV5Ea+EV2ik3WUIxl1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QwZL7pXw2YACOdFuR89h6wrAyvlfIVvZzskJKHSYAOrysw4Ma3v2lF18ARtPAzsGe5pqVDbVNVhJ9VKTzRXmeMI9av3CE9vVeH2vsD41wgnM4+RLFXLktrkkHlQTeaf1l8V4gwuptL/MKAV++zaq/8h2pYClPL6h6Djf4bhT1NsXmsWk/VgSW+JtldK9B5b4cRyu9XCP+TMEit1aS962ewXe7J/HIzG3s9q+o2rxu3/BCcGfYnH1cUEfmTO+/Lq7BB7IMdpa1rS5IC7QL1J1sxu/Jsim7DCc/HzNiVfxt0Em0DRfoB2BZdT61cI/ZxVn8QOS64ds3ojl9LUBE9vqyCcfBA4o+WCx8nB6AgKhPmrIa6hMRvj7Gy3pJ2IT6fW/ML7BEAcE2TaXbNPr2TMiKhz2ya9BeafNG0+bUpupyQq1d12Q7f+5juanEQszumnXZ9ScW0HkqsbtE36hLMRo+cZy4uq6iRD28ELbxzpBO+UaiOVv9NivmHdKPamTyIKnxsm+nf+QBgPKWzsiaN8gTZ2zuNg/36WyfpiSSg3P4FHvU1AXpnEcZTQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca30bfa5-2cae-4aa6-5d24-08dc67e456af X-MS-Exchange-CrossTenant-AuthSource: GV1SPRMB0021.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2024 00:35:58.6397 (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: PR3P250MB0068 Subject: [FFmpeg-devel] [PATCH 12/14] avcodec/mpegvideo: Only allocate coded_block when needed 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: R2hT2SL2xMbo |
Series |
[FFmpeg-devel,01/14] avcodec/get_buffer: Remove redundant check
|
expand
|
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 130ccb4c97..74be22346d 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -596,11 +596,16 @@ int ff_mpv_init_context_frame(MpegEncContext *s) } if (s->out_format == FMT_H263) { - /* cbp values, cbp, ac_pred, pred_dir */ - if (!(s->coded_block_base = av_mallocz(y_size + (s->mb_height&1)*2*s->b8_stride)) || - !(s->cbp_table = av_mallocz(mb_array_size)) || + /* cbp, ac_pred, pred_dir */ + if (!(s->cbp_table = av_mallocz(mb_array_size)) || !(s->pred_dir_table = av_mallocz(mb_array_size))) return AVERROR(ENOMEM); + } + + if (s->msmpeg4_version >= 3) { + s->coded_block_base = av_mallocz(y_size + (s->mb_height&1)*2*s->b8_stride); + if (!s->coded_block_base) + return AVERROR(ENOMEM); s->coded_block = s->coded_block_base + s->b8_stride + 1; }
It is only needed for msmpeg4v3, wmv1, wmv2 and VC-1. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/mpegvideo.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)