From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id A167E4AE2E for ; Mon, 22 Sep 2025 13:15:03 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'/GYYFxdSrpqTM51txpKpCJ/oZ+ClmVHko6WMcfO4B+4=', expected b'1Fo0OeGWYf2UYru4MF2+CZAnV9mb2Ygznq+594M2yIc=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1758546898; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=/GYYFxdSrpqTM51txpKpCJ/oZ+ClmVHko6WMcfO4B+4=; b=IKEGSvRO6FQyRzNo/YaQSXFGIo68B2a8VuMuqDlqhkq4Mq/kMytGzS05OsRyElu/3MNih 69p8v2c8LmhDGiHtRTH6PPHFp/I7Rwiu1E20R+AJuNQ2ppJAnJToc8O0QnerUM3270wgPJG WuN7/zFZUvNX8+p8AVGXK5FXQdop/eGjbis8Zy0vLcJsWJF7dO500gu6xLU/mCnYEX3FzSs uOWQ+n0g+gCkFuZG02whoZvfI7iBA9ZsdTtV/DuSoNGtDMuMgtMsWlsyEFL8shBg9OWGUKj 8US87Dx6xxrurFMLgLPsdUfs2Gy5i8UFvIfGIkxECXDnGJ4RUDemqK51XO3g== Received: from [172.19.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 5EBE468EAF7; Mon, 22 Sep 2025 16:14:58 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1758546897; b=CX4+83sZbsgc2Y4SmiHt63E+tjFCnF4i7ojG7NmbqRTeLfj+eGngTZOd75n8FCn7g8eV8 IDvv2RSqZ/szG/Z4zXUhM84NKS9ya9CwTX1ubmi5al8uFlqP/RujDGjKYLwvA1eOLUahAo9 jnzW78LkR1QUByOBNWix0wAypEnRRSluCnOnVBSKwb/Uau9uZFHI7BgO4zBdfo/mataQvog V5ogC59bboSkZ2NafpUsy0ZEGDWLUb2vi2OBd2QG1OcjVdXLeTJOmBHVxnBAtw8C3qN7Kqt 87VYLFpKibyay7vtqBniCYcA3tcwxizrCuqBu44FdpfCrCZpMJfIYVGaUU6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1758546897; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=QUEQMBEsX8ze1XSlRSZe9r27M/xpTYF9u0evD3BFK1w=; b=Z1avNni1+WF9ALcdj3aZ/D9I49Qg+fQ7QU1juv1KSJfhEQl7Bh8HrR8zAjG1bSchadPxk tnlzy9jZmLpmhxsT5qrXe68bLkcj2hLbMKmnSqPVy4NOYkwJbd8bzNXCzNLJbS6fV2ih9Ec mzE3APFRc7NyV5ohS27/qp10L49b1i6UYnduD6P2w/wi2RBm9V33ocpid2N6PrEqqwvQ9RE pVSvzoRq5x8VzQvCR9YVu0nx53v05vBgFW/SH+q0X+PY+BMXyoD+AUtJEts4eYT88RtWO5I nJsCDMBq5LEQ4X/VFLNwR61IP1mGgz61fWisillXTuv+N47aln3Bx1vTzKwQ== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1758546888; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=1Fo0OeGWYf2UYru4MF2+CZAnV9mb2Ygznq+594M2yIc=; b=deL0PXWMOG4y15FJGyVCVJIG35iCDzoF0XKRc4xkGDlX0TFV7iV9X2t2NRCvVCbt0UWfk k723VD5/XxaP/mhKXITjGoADiO0JHGgMlNj8O0pjbx6OZehNSt+njP8vI0V0hAv0DT1h8aZ 3hriuGwTfc97aSpDkgXG+lNWPy/KSC8NI8xby2PggT6vPdEvkh6RlDRErt8/2aHkUuBXZ3J X8IPAlAPVrbkXXdKTYHZhx1Snx7OxqK9DSBWNREVVHvZBbHJfCDjDl7Tc0BouAfbtfkDq0Y SnEUHOivh1jG/sgG7BMU1lPie3B/7BXGB4PS2DRaEO8bvg8TdwWxrn09kTOQ== Received: from ed19c606a818 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id D046B68E9B2 for ; Mon, 22 Sep 2025 16:14:48 +0300 (EEST) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Sep 2025 13:14:48 -0000 Message-ID: <175854688896.25.402111820911838381@463a07221176> Message-ID-Hash: RMRW2W47UARRHY2HORRNQBK6O3M7RZGJ X-Message-ID-Hash: RMRW2W47UARRHY2HORRNQBK6O3M7RZGJ X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avfilter/vf_colorspace: Make array smaller (PR #20575) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: mkver via ffmpeg-devel Cc: mkver Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #20575 opened by mkver URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20575 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20575.patch >>From 5cb58a94a6fc59d96fafbffb10b4a191409e7223 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 22 Sep 2025 14:40:24 +0200 Subject: [PATCH 1/2] avfilter/vf_colorspace: Make array smaller Also makes it more independent of AVCOL_TRC_NB. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_colorspace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c index f919350d65..52e84abbe1 100644 --- a/libavfilter/vf_colorspace.c +++ b/libavfilter/vf_colorspace.c @@ -171,7 +171,7 @@ typedef struct ColorSpaceContext { // FIXME I'm pretty sure gamma22/28 also have a linear toe slope, but I can't // find any actual tables that document their real values... // See http://www.13thmonkey.org/~boris/gammacorrection/ first graph why it matters -static const struct TransferCharacteristics transfer_characteristics[AVCOL_TRC_NB] = { +static const struct TransferCharacteristics transfer_characteristics[] = { [AVCOL_TRC_BT709] = { 1.099, 0.018, 0.45, 4.5 }, [AVCOL_TRC_GAMMA22] = { 1.0, 0.0, 1.0 / 2.2, 0.0 }, [AVCOL_TRC_GAMMA28] = { 1.0, 0.0, 1.0 / 2.8, 0.0 }, @@ -189,7 +189,7 @@ static const struct TransferCharacteristics * { const struct TransferCharacteristics *coeffs; - if (trc >= AVCOL_TRC_NB) + if ((unsigned)trc >= FF_ARRAY_ELEMS(transfer_characteristics)) return NULL; coeffs = &transfer_characteristics[trc]; if (!coeffs->alpha) -- 2.49.1 >>From 18e2c4a7b07cb50ed003555ee6eb119b9c79465b Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 22 Sep 2025 15:00:32 +0200 Subject: [PATCH 2/2] avfilter/vf_tonemap_opencl: Make array smaller Also makes the code more independent of AVCOL_TRC_NB. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_tonemap_opencl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_tonemap_opencl.c b/libavfilter/vf_tonemap_opencl.c index 26fc02923c..2c1b0a007d 100644 --- a/libavfilter/vf_tonemap_opencl.c +++ b/libavfilter/vf_tonemap_opencl.c @@ -70,12 +70,12 @@ typedef struct TonemapOpenCLContext { cl_mem util_mem; } TonemapOpenCLContext; -static const char *const linearize_funcs[AVCOL_TRC_NB] = { +static const char *const linearize_funcs[] = { [AVCOL_TRC_SMPTE2084] = "eotf_st2084", [AVCOL_TRC_ARIB_STD_B67] = "inverse_oetf_hlg", }; -static const char *const delinearize_funcs[AVCOL_TRC_NB] = { +static const char *const delinearize_funcs[] = { [AVCOL_TRC_BT709] = "inverse_eotf_bt1886", [AVCOL_TRC_BT2020_10] = "inverse_eotf_bt1886", }; -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org