From patchwork Thu Apr 4 19:30:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47807 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:24a8:b0:1a3:b6bb:3029 with SMTP id m40csp547368pzd; Thu, 4 Apr 2024 12:46:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXlSULeud5J2ST2UFFgG/MM6aqCnFHcMJS9X3J4+tgNs9UcIaqf4iAQFlzE3bwVrnb4nfL5DVd+NNucMwU1ZuTbCIHj9FpKaRvBBg== X-Google-Smtp-Source: AGHT+IFVcVouuxtz5SXbMtIzM7cnuHlokIUGw2WXIkjtYPKxEaOkH88N6g7ErO0SA+jGbDZd1jdn X-Received: by 2002:a17:906:a2c8:b0:a47:183d:6c82 with SMTP id by8-20020a170906a2c800b00a47183d6c82mr2346731ejb.31.1712259997212; Thu, 04 Apr 2024 12:46: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 lm20-20020a170906981400b00a473695dfe3si7981390ejb.386.2024.04.04.12.46.33; Thu, 04 Apr 2024 12:46: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=cDGklqQX; 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 4D43368D194; Thu, 4 Apr 2024 22:46:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2056.outbound.protection.outlook.com [40.92.91.56]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BE14C68C91A for ; Thu, 4 Apr 2024 22:46:24 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HIfngK4cEQewq0mueVVrG2pW819AoG09X6MWDpFjjQRuw08Kkcdf0gSDhMJ3vbXvN1ySuMg1msr3qhEcADYqgwhZdAIdXvGiXKtezNblfXN2aPfg+Ojitls4U4snr8t/STdnlpjqghpcBc05mDLi0F3/UnlzrdkJOZ7KfLozDEjrudHSTLtHebFIlkOn7QPyvYpk8uobMLeU85j7o+el6+bv7e9GZHAnt6XkCSQ8Gh0ayPsJWqwy/RYhPBKeL/mtGP4l/vGlBIZoFPGs3xUOEcq3eiaAwSgPoJtmz7WpkU0r7iDH6kk3pqZLUght4+PDRHG88Lof2EfZ/S/bxieM+A== 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=gDY9BVSJ5po+Iejz3Rr3OYASQDbN4ILuOLAsuloas1g=; b=SwmzPULVA0pNC8Hy08XxK355ow/wAYQ0fBIuiGPS6oWvjh6p7/VvjxR34bQbtGTzGj15s2ZANWCsM93xnPpwK3XwfNbfEZ2dBNkOP6lc/DQpm+au2hS0fw0T9cu7BCdW9b/6QXsnwcBjWUTn/psJ0LnWtsGLfJojWzTXz0bIKEySvljjGtTPyEsPcMlU7FqCL6tiblSGYykQAhUd1z4XdGJORCt8BW1PTdDiOG03I9zTKew/YBo7NqC46b8r5b6f3K+r9+ETvRxi3DSWnC1N299ciEejR2D1854Twz1HCzctKm+X2Utw59/RUeeAzUA+9wTTbfcEPYYr2C57nQD8WA== 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=gDY9BVSJ5po+Iejz3Rr3OYASQDbN4ILuOLAsuloas1g=; b=cDGklqQX0dYJ3SUlLiB5mxvOlpOqn0Z8AFu1w/fpj7TFXLPEk5g7UvyuTlLVj/nLxidh9ECcxD3hU+MnAGLppC2FPeYosEB+V2OTUHMmQEQpeAklHx21ux67HVWXdYfg60ros0Pzp94JQXD/dyOx/XJQYuJc0QDDSMvlv2kHXKnGGV3AoBvQ+rwDEEXczGtBPEQPz4nJvNuswHUx3NHuCVbkSXxDHTbGvmDg18+iGfFLsHdruEhIQ8QgJRlEneDfS1dIS9ELQO7PgKCjkfI3A/dk7lxaC/Z68TatomBTEP97OsdZlcKmNQmeGkALl6SWbi1XO5TQ9KVqFDCG99/mXw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DB9P250MB0428.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:33f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Thu, 4 Apr 2024 19:30:27 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Thu, 4 Apr 2024 19:30:27 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 4 Apr 2024 21:30:17 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [lYic0Wzp+fYy4fSB5yNZ37Egttrz+equXjB6bsi8dts=] X-ClientProxiedBy: ZR0P278CA0104.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::19) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240404193017.3969059-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DB9P250MB0428:EE_ X-MS-Office365-Filtering-Correlation-Id: 65ccb3aa-1b63-4973-563e-08dc54ddae2f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iIcoYzD25tfuFXHdI9MPLP6GXlzXbmwz4Fwh4knYSR6vQdecntfG5NC6PMsAe7pJzq9C4cdgCsITDqRWvdQ/v3QdWvD+96Ord3fiMMPc+Mq+JG5v7xLhDOTDwR9B4qHyZshbh6MoMPz3P2+k3mupGcNFeM8qT4VXdDDLCX4/dLgEtfHRh/fQQhw/LsUt19/lrwf1XmGcU4r2VRi9HQaduYxgXolfh8cAr0iEHrqUp9xOyD0L815keAPB/wlId7GFLKOY2fgVB/Ixdba/C0R7Y77mjBMtqUFjVwUyUZLnhqm4S8gHUerztLwU/RdmDUSD7ajdfTcI6Xg+18XF9UzRX6BN0vG870KjUN4dfAs2kf5n0S+yCqBcLPksDY6HrFJnId6vbN9jToiFLPHl+/FB9p0p1p6xRoiPmV/cDQkcu3Q9hEOCht2lyqPl5ola1BafLgHwrperxFoM8ZnmIZ2Ag59/FM/DwIZZtK2/Yx0BfR2x+g1nVmpgxIsK8EMQU+tt1ZIlHs8f/sTdBokAAFOGQ9mrE8S5UPmNAOCGoiQLWxzCLA5nteITajlgXb+2qF87hlg6AuzIiEaZZQWDgzXGIhZYeOcv/XQ3CivhUZMtkXU= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1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ZXAEmAr3SKLrNlpAGYNKGSAreWm2Yo3UQuIS19t2w/vYkKmXxV1MlPOdLWKB0yMCUGHJU0RE7obKQYVluIqnDG6nYk1E3x4dGL7+/LgATxIpXPqjpRssPoghq6cW+Io1nh8R3qorINfOHL+LHm9KssohU9AmGsoTEFPVU4avyjLd4jpHHQ28fvPvxC0ZK9S+xSZggnVIIn40foXfBB1bNR9+LdJ8xV2h/X7pTocM+B5WdTFnEuNRbZPFrKotzHIA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65ccb3aa-1b63-4973-563e-08dc54ddae2f X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2024 19:30:26.8283 (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: DB9P250MB0428 Subject: [FFmpeg-devel] [PATCH 9/9] avcodec/dv: Don't pretend initializing work chunks can fail 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: b5+Al4PQCSzF Signed-off-by: Andreas Rheinhardt --- libavcodec/dv.c | 4 +--- libavcodec/dv_internal.h | 2 +- libavcodec/dvdec.c | 6 +----- libavcodec/dvenc.c | 6 +----- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/libavcodec/dv.c b/libavcodec/dv.c index eb49978ad8..194d982562 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -166,7 +166,7 @@ static inline void dv_calc_mb_coordinates(const AVDVProfile *d, int chan, } } -int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d) +void ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d) { int j, i, c, s, p; @@ -185,6 +185,4 @@ int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d) } } } - - return 0; } diff --git a/libavcodec/dv_internal.h b/libavcodec/dv_internal.h index 4b4151c88d..05e26a8138 100644 --- a/libavcodec/dv_internal.h +++ b/libavcodec/dv_internal.h @@ -32,7 +32,7 @@ typedef struct DVwork_chunk { uint16_t mb_coordinates[5]; } DVwork_chunk; -int ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d); +void ff_dv_init_dynamic_tables(DVwork_chunk *work_chunks, const AVDVProfile *d); static inline int dv_work_pool_size(const AVDVProfile *d) { diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index a06e4807e7..9e8d40187d 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -637,11 +637,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, } if (sys != s->sys) { - ret = ff_dv_init_dynamic_tables(s->work_chunks, sys); - if (ret < 0) { - av_log(avctx, AV_LOG_ERROR, "Error initializing the work tables.\n"); - return ret; - } + ff_dv_init_dynamic_tables(s->work_chunks, sys); dv_init_weight_tables(s, sys); s->sys = sys; } diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c index ce21247081..3afeedbb87 100644 --- a/libavcodec/dvenc.c +++ b/libavcodec/dvenc.c @@ -93,11 +93,7 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } - ret = ff_dv_init_dynamic_tables(s->work_chunks, s->sys); - if (ret < 0) { - av_log(avctx, AV_LOG_ERROR, "Error initializing work tables.\n"); - return ret; - } + ff_dv_init_dynamic_tables(s->work_chunks, s->sys); memset(&fdsp,0, sizeof(fdsp)); memset(&mecc,0, sizeof(mecc));