From patchwork Mon Sep 6 12:42:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30039 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3721838iov; Mon, 6 Sep 2021 05:43:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5VhMQGOe755OIP+6aJjViEIK8JSzq9IYAkCiCxKiIMqzPU5DOziPxXh3cr+acmVCvidtf X-Received: by 2002:a05:6402:524e:: with SMTP id t14mr13204227edd.39.1630932222961; Mon, 06 Sep 2021 05:43:42 -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 dg16si8060087edb.307.2021.09.06.05.43.42; Mon, 06 Sep 2021 05:43:42 -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=QncTx7dr; 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 A823968A348; Mon, 6 Sep 2021 15:43:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069046.outbound.protection.outlook.com [40.92.69.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3D6FE6898FB for ; Mon, 6 Sep 2021 15:43:18 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xcs2qma0J+qXhcfTzxyheRnpcP8njePzv1LZMqqF7iAzUpk3wW7pyMUp16Q+CzmDWbpUhHac+8UTaf/qwOgS8DwyWYtWuK+ONKS+pCK2OjYNA21ZDgaMPkkOHNj7bncXvQvqofptBbopQwPTZMNJLQn6tX7JI+/VwzMs6PhRCmHW9jLuMPPi7xCwT9QiQufaE5ZcM6gtMEq691pIPiXZzVSoAkeJXMqJLRXevqrbM015eQF71T3RREaZtt/BJVYUB3DgU7Li+Y7gfQ1jxFxmJeLaBg6b1/WPlZaKHScFyKw42Hsm8BVaL5UMUviUV379I9wj0Fkypfq6k3D0TUE1vg== 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; bh=9l8/AFqLYS4TstLOBM1IV6N/WmWLcRoQzG/ptPK3udw=; b=Rmf1zfnv3nD/Uf/dsixMQkq9bViQ5M9tFk/E4+Kv6PikAGImXIIU7nx4CeqTPh19k7VivItQcbu6qxJq9WaeoQYerCWj/wLIT9LiOE1eb4FjKfYJmEUdVubGjLn1Cj6JJTDbx9Crs5S1wV6YTETLb3+pHSPf40i0SiCM/3DcGsFX636op0Vm68zQqvTVc0vvD7oNCewk2tY9eG21A+TZYhgGmGYWN1xd7esmbLT0OIAhjgR9dSQRrsNXgLg/ZalBfqYrnv0ngGhsXvFG/B2/Ov7ijP1wwxnXslxG2EfQZJBRblAfDtqVfsXthbvtAjLPU9/Dum07RcTaKOj9Gjwe3g== 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=9l8/AFqLYS4TstLOBM1IV6N/WmWLcRoQzG/ptPK3udw=; b=QncTx7drtsnBevZjiiKJON7gEfGMKWq59JBCUjJkJRHn0hWdX0MaH+U3E9OSVT7WSmez/uHT2LoLJ7FOzJO+CiJtltfU8C9WFrkUWYQwGHLo92WoxC2G3W8GgzYPVYuFEw6Gc8OW1udr40euWJFbeK/JTV1Hnk1pwBvCSAg1xVAa/OOaNOQ8kMcwrAX5RZCA5ynO3W0S0kWk1Qu4VmiohDvX5uobZdqavhRkfl5RKu00JXWhVVJ1/t/qeGYtmEGKTR8WyOm92PcbTT9ys7EYggdVqR0iKOuoc2LMJ1yGoRegAw5d9PMsNcas4Ku+TS9faKlAaszJN6w11/8FZujCNA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM5PR0301MB2515.eurprd03.prod.outlook.com (2603:10a6:203:8::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.21; Mon, 6 Sep 2021 12:43:13 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4478.025; Mon, 6 Sep 2021 12:43:13 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 Sep 2021 14:42:54 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [g5BZBFlmMJQSO9beWhQSFY1Hz0nNgTcB] X-ClientProxiedBy: AM0PR01CA0084.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::25) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210906124301.4161498-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM0PR01CA0084.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19 via Frontend Transport; Mon, 6 Sep 2021 12:43:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3541de49-c670-49e7-4477-08d97133e3f6 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UKb3QWS1fMq2gIDvxJlS4pEya5DdDAccFF434aEFkRVmFgsSAMFj2ZEbkmvsLkDG/+VrhhfgeDpE283DncPtGisETWGMZ3jzGcM8Zm/cOMEJSO9cpvdNikHH7rcpeafmUfJuHqnj1tqMeH1JG2bWeHAFVJ79oOa7bsFK3HQ4P5A7xb5prwbLzZY0eUULYlwm6Bw//Vn8+7KHbpERHTeRw+Dn6T7DjJmNSO9FHo5StOzsrPEURJxTUUMgA4YBKw8h2k5pQuxhz98VqEJnHKPukmp8rpPyDaPrqADHO6k94P1CQm/li3bbYqe7JGA8s43nT/grK2Os+85VJCDvOBV6OgaOYc6h7TSUvqg449XX3RSbZ/ppkHU0sESqbvNkCOu5iSwJ7QZP3aQxVEZiiWyJj9Bhq4YUObHQqssK9Km8u2rJTgeojuJATcYVosN/D0ypkIwRaUgJOmueL8IRdqUFq9DMX7s+DJNOQMM/crIrd3kOdiAQ4OX8AGgjhygTF66UQQYnM1tmMDFqtpg70sGMG6pXZcRoWzJtwuoxwvBSkV3kaf97LqXScZ4Aym286ku3zuFIYPSbxFr7PUUw9kSGXl6qqrgnYft16Av9/x3IW6Y1BPPuQG6AImzO0zHaRRZRRTDPhUmCnuD/2FYFwJpF26CMxB8uCbv8LHOGbSQhAKl+NHLIteDArnibdVutk8klfwMoO+RHYQLOQ== X-MS-TrafficTypeDiagnostic: AM5PR0301MB2515: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pKjDuyIDoV0vtUTNXjcEbCtl5uHrH4BM8zVw8AWA29UOxUV3hG0slRhciqu4N9O9Ar+MWCoWEzMobLkEQ3Q9wzaM4mRiSPwHV6LQNIOzwnqxeUpG+3gREHE1aGFFW3eVp4njE7ZHfSJWiK/eu7vz/aCvcfZlZPBwXElkEf+ckZqNirZlqgcGRGMqzF0g5yFefBo/5csoXY4SvnzDoRStC8IOQyqAteA6ywOsWFYNfK9nl4dwP6XY5uejPZyHHD7k0Ch1aFTtAVgoTw4cNiRVN9nqNok3Csz9XOf3s1KMeAQcUQWLLm8flUu0RPelvuEUJU4YezTgOM943u7Ib+WU1VOZ7kyUPpqmpbLb9+mL5WPOIFWO6IGOplN9YcNavuJIMNJRwCAqElZaZS8XVGFK/YsPJtcoilHbF1XRhiFAdVhhW6Pw3GwuyZ9CpwwZ8JP1 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3RmiEdvUybIzbb09xSrTlsOiyNKV35R2lDOyixmCLXm9pr1w1gcKTfGiqQkOO9qzXB8XC9l/zGmyEuJiilkWEZ9JKAZsM8VXBz5PcTk8d570pofi5boLF9RViB2wT7KKPUjniZBGLlnHeKxsYHtKaQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3541de49-c670-49e7-4477-08d97133e3f6 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2021 12:43:13.3734 (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: AM5PR0301MB2515 Subject: [FFmpeg-devel] [PATCH 04/11] avcodec/qsv: Make ff_qsv_map_error() static 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: ScUY6B2hlG4V It is only an auxiliary function to ff_qsv_print_(error|warning)(). Signed-off-by: Andreas Rheinhardt --- libavcodec/qsv.c | 11 ++++++----- libavcodec/qsv_internal.h | 5 ----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index c53e2e3b07..98e776477c 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -145,7 +145,10 @@ static const struct { { MFX_WRN_INCOMPATIBLE_AUDIO_PARAM, 0, "incompatible audio parameters" }, }; -int ff_qsv_map_error(mfxStatus mfx_err, const char **desc) +/** + * Convert a libmfx error code into an FFmpeg error code. + */ +static int qsv_map_error(mfxStatus mfx_err, const char **desc) { int i; for (i = 0; i < FF_ARRAY_ELEMS(qsv_errors); i++) { @@ -164,8 +167,7 @@ int ff_qsv_print_error(void *log_ctx, mfxStatus err, const char *error_string) { const char *desc; - int ret; - ret = ff_qsv_map_error(err, &desc); + int ret = qsv_map_error(err, &desc); av_log(log_ctx, AV_LOG_ERROR, "%s: %s (%d)\n", error_string, desc, err); return ret; } @@ -174,8 +176,7 @@ int ff_qsv_print_warning(void *log_ctx, mfxStatus err, const char *warning_string) { const char *desc; - int ret; - ret = ff_qsv_map_error(err, &desc); + int ret = qsv_map_error(err, &desc); av_log(log_ctx, AV_LOG_WARNING, "%s: %s (%d)\n", warning_string, desc, err); return ret; } diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h index 327a8d3385..b7ba02fdc7 100644 --- a/libavcodec/qsv_internal.h +++ b/libavcodec/qsv_internal.h @@ -106,11 +106,6 @@ typedef struct QSVFramesContext { int ff_qsv_print_iopattern(void *log_ctx, int mfx_iopattern, const char *extra_string); -/** - * Convert a libmfx error code into an ffmpeg error code. - */ -int ff_qsv_map_error(mfxStatus mfx_err, const char **desc); - int ff_qsv_print_error(void *log_ctx, mfxStatus err, const char *error_string);