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 C2E924E7FE for ; Tue, 3 Feb 2026 15:03:36 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'undsl93QU+WZux07M6EPcWAXxKYDi2Vw9FYymMAtGJ4=', expected b'XMRWZgz7k0Y1koj3GTFj01Rt2FL824G1g1MLAdhmPnY=')) 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=1770131004; 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=undsl93QU+WZux07M6EPcWAXxKYDi2Vw9FYymMAtGJ4=; b=RiD1veov5uKj9s7x78frGp5YNhGFzG+a98eMQTp3Ip3mgaNtb8KUzmpn7brqFIRtobVHu cpIes8y7vefM4Pp9zC9shMdMoCSramGV8wj/uBAzyODx0g5VNQKsCSXorUCHGqfxJYjIFsM +0o32ZQvHgJE2sE5eDkFW3pcrUSU9bl69fA306j7LstmfXgCNwlvcdqjh0wkjgFUBamLt4A dJwyHF3+IFMB9fsjSE1sXsT3BVRyrEgjtJrDAN1jIAYvaXaDb87F9L39rMsHByDyPFZ5HMZ MHd5S1eGdIccIxKoBONLMgxvAB5EO9AlEtHdRmOkUJq/bYkGe4DAYMz6xfBQ== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 77D1E6910E5; Tue, 3 Feb 2026 17:03:24 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1770130988; b=NnUKUS0wUs/WPZhxo+JTBokFWHiLgtmsgSBFoAc6A8TqXKK0Zcprew37ezefhf3JTo5sb h2Mvg81Oqyuf0H6BYQDGMaWbthfmCe5ZqjspnswkvFM/7r1OUdKuAfTHFcwV6oh3TmlkXJG AUV3s/63hp7HHAEUXooNQwtUheoUpdNqjCCafsLwTZv1B9+JsIqme7+k4qxpscAoyrXGNpr d9j1gnE9lbrwp97FOAupcGi/z9ebJwBgZKvUgwEGQXnkso4jhWKJ0bNjCd6sO9oF1pt00WY BLeshfwjY1kL45RR5NnAmjInmktK9msAyEN5Gtl/7otKtRfy/pshxZ2vI2pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1770130988; 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=j9yOudhSUtbr1o9q/Re8PEmcD2DGDPNvG+9tOEZN0EM=; b=P5GJ+tAvhW9XMAYCprC6XFZrd7beE4MIrgijvNjjQcw4DxmoIeeymvLwFZSrd2ES5Et8d JcipdLbQp07ABSXb6X9ASzh9cQodtiW/ziSRvnyHPVf2/roFYlMax6sO1SCv2bUAH7/4eMz 7f0DcBY7SRzErLDnJ8ipFwbbY0SdndFy2SRHEzuqSLvU2t8+F+QUo9pl7H5hfwauk3Uf7Ir Cb8Sp+26pUF+KFNBGyq27uPLh1Tf4BSMEScP9h+opkLnSit/arOQYCqls8kaE7skYr7ojtZ OYX0sL6/g2Q9vNF7/Klp1FGLSeRMXo5sRcLaaW22BW2zWQSZe/JQNmXwILPA== 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=1770130979; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=XMRWZgz7k0Y1koj3GTFj01Rt2FL824G1g1MLAdhmPnY=; b=YAJUE8oAnsgFs14aD6cxig1MssAWv5JbVdqonUv6PzOT10CDQ2RgmFJmXpy2eE6Z5pIBX CX3KrmhKRe6abxX3mONQsgTwDAVYlBCunDfltpMVb0wbSaBnl4AJ990jOW5zD/m47dbpXZT O+Y5KLlos8hJhzkb9yJxiBMc3NZ6sA4wB5vDcV8bKZVB+1HF5CBOjbYIzvceE9zzjc3g2dM xGfgQ/Hmz1L3gb1RNRlck4NeJSe860i/nLnokBQUYYcMZU0QIhXmAueN8AW2u7q4Sqmaqqf vyoZj88fQiVfHXlDpj2VlaHICn13Z4eU9uKMQkmM7Z+b7Iju+mVnq/wtZ5Uw== Received: from c8d966988b92 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id C75AE690998 for ; Tue, 3 Feb 2026 17:02:59 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Tue, 03 Feb 2026 15:02:59 -0000 Message-ID: <177013097999.25.4446378559649556687@4457048688e7> Message-ID-Hash: KDWCU2K2RWZP6LNPTFSGFOK7QX3H56S3 X-Message-ID-Hash: KDWCU2K2RWZP6LNPTFSGFOK7QX3H56S3 X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation 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 X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PR] backport8.0: fix typo in checkasm/hevc_pel (PR #21638) 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: Jun Zhao via ffmpeg-devel Cc: Jun Zhao Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21638 opened by Jun Zhao (mypopydev) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21638 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21638.patch fix typo in checkasm/hevc_pel >>From 450bbb7960e0e7807c9ea6fee43a839b2acc8a3d Mon Sep 17 00:00:00 2001 From: Jun Zhao Date: Sat, 31 Jan 2026 00:09:17 +0800 Subject: [PATCH 1/2] checkasm/hevc_pel: fix typo size[sizes] -> sizes[size] Commit 4d4b301e4a introduced a typo where `size[sizes]` was used instead of `sizes[size]` in 10 places within checkasm_check_pixel_padded calls. Since `sizes` is an array and `size` is the loop index, `size[sizes]` interprets the array pointer as an index, resulting in undefined behavior and causing AddressSanitizer to detect buffer overflows during testing. Signed-off-by: Jun Zhao --- tests/checkasm/hevc_pel.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/checkasm/hevc_pel.c b/tests/checkasm/hevc_pel.c index 9a83613915..7139a5fc3b 100644 --- a/tests/checkasm/hevc_pel.c +++ b/tests/checkasm/hevc_pel.c @@ -110,7 +110,7 @@ static void checkasm_check_hevc_qpel(void) call_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); checkasm_check(int16_t, dstw0, MAX_PB_SIZE * sizeof(int16_t), dstw1, MAX_PB_SIZE * sizeof(int16_t), - size[sizes], size[sizes], "dst"); + sizes[size], sizes[size], "dst"); bench_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); } } @@ -159,7 +159,7 @@ static void checkasm_check_hevc_qpel_uni(void) sizes[size], i, j, sizes[size]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - size[sizes], size[sizes], "dst"); + sizes[size], sizes[size], "dst"); bench_new(dst1, dst1_stride, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); @@ -214,7 +214,7 @@ static void checkasm_check_hevc_qpel_uni_w(void) sizes[size], *denom, *wx, *ox, i, j, sizes[size]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - size[sizes], size[sizes], "dst"); + sizes[size], sizes[size], "dst"); bench_new(dst1, dst1_stride, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], *denom, *wx, *ox, i, j, sizes[size]); @@ -271,7 +271,7 @@ static void checkasm_check_hevc_qpel_bi(void) ref1, sizes[size], i, j, sizes[size]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - size[sizes], size[sizes], "dst"); + sizes[size], sizes[size], "dst"); bench_new(dst1, dst1_stride, src1, sizes[size] * SIZEOF_PIXEL, ref1, sizes[size], i, j, sizes[size]); @@ -330,7 +330,7 @@ static void checkasm_check_hevc_qpel_bi_w(void) ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - size[sizes], size[sizes], "dst"); + sizes[size], sizes[size], "dst"); bench_new(dst1, dst1_stride, src1, sizes[size] * SIZEOF_PIXEL, ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]); @@ -383,7 +383,7 @@ static void checkasm_check_hevc_epel(void) call_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); checkasm_check(int16_t, dstw0, MAX_PB_SIZE * sizeof(int16_t), dstw1, MAX_PB_SIZE * sizeof(int16_t), - size[sizes], size[sizes], "dst"); + sizes[size], sizes[size], "dst"); bench_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); } } @@ -432,7 +432,7 @@ static void checkasm_check_hevc_epel_uni(void) sizes[size], i, j, sizes[size]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - size[sizes], size[sizes], "dst"); + sizes[size], sizes[size], "dst"); bench_new(dst1, dst1_stride, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); @@ -487,7 +487,7 @@ static void checkasm_check_hevc_epel_uni_w(void) sizes[size], *denom, *wx, *ox, i, j, sizes[size]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - size[sizes], size[sizes], "dst"); + sizes[size], sizes[size], "dst"); bench_new(dst1, dst1_stride, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], *denom, *wx, *ox, i, j, sizes[size]); @@ -544,7 +544,7 @@ static void checkasm_check_hevc_epel_bi(void) ref1, sizes[size], i, j, sizes[size]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - size[sizes], size[sizes], "dst"); + sizes[size], sizes[size], "dst"); bench_new(dst1, dst1_stride, src1, sizes[size] * SIZEOF_PIXEL, ref1, sizes[size], i, j, sizes[size]); @@ -603,7 +603,7 @@ static void checkasm_check_hevc_epel_bi_w(void) ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - size[sizes], size[sizes], "dst"); + sizes[size], sizes[size], "dst"); bench_new(dst1, dst1_stride, src1, sizes[size] * SIZEOF_PIXEL, ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]); -- 2.52.0 >>From eef9672b02760f9e5da9a30701630775a4181271 Mon Sep 17 00:00:00 2001 From: Jun Zhao Date: Sat, 31 Jan 2026 09:55:36 +0800 Subject: [PATCH 2/2] checkasm/hevc_pel: rename loop variable 'size' to 'idx' to avoid confusion The variable 'size' is used as a loop index for the 'sizes' array. This naming similarity is error-prone and recently led to a typo where 'size[sizes]' was written instead of 'sizes[size]'. Rename the loop index variable from 'size' to 'idx' across all 10 test functions to make the code more readable and prevent similar typos. Additionally, replace the hardcoded loop upper bound '10' with 'FF_ARRAY_ELEMS(sizes)' for better maintainability. Signed-off-by: Jun Zhao --- tests/checkasm/hevc_pel.c | 208 +++++++++++++++++++------------------- 1 file changed, 104 insertions(+), 104 deletions(-) diff --git a/tests/checkasm/hevc_pel.c b/tests/checkasm/hevc_pel.c index 7139a5fc3b..e89facb1dc 100644 --- a/tests/checkasm/hevc_pel.c +++ b/tests/checkasm/hevc_pel.c @@ -83,7 +83,7 @@ static void checkasm_check_hevc_qpel(void) LOCAL_ALIGNED_32(uint8_t, dst1, [BUF_SIZE]); HEVCDSPContext h; - int size, bit_depth, i, j; + int idx, bit_depth, i, j; declare_func(void, int16_t *dst, const uint8_t *src, ptrdiff_t srcstride, int height, intptr_t mx, intptr_t my, int width); @@ -92,7 +92,7 @@ static void checkasm_check_hevc_qpel(void) for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { - for (size = 1; size < 10; size++) { + for (idx = 1; idx < FF_ARRAY_ELEMS(sizes); idx++) { const char *type; switch ((j << 1) | i) { case 0: type = "pel_pixels"; break; // 0 0 @@ -101,17 +101,17 @@ static void checkasm_check_hevc_qpel(void) case 3: type = "qpel_hv"; break; // 1 1 } - if (check_func(h.put_hevc_qpel[size][j][i], - "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) { + if (check_func(h.put_hevc_qpel[idx][j][i], + "put_hevc_%s%d_%d", type, sizes[idx], bit_depth)) { int16_t *dstw0 = (int16_t *) dst0, *dstw1 = (int16_t *) dst1; randomize_buffers(); randomize_buffers_dst(); - call_ref(dstw0, src0, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); - call_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); + call_ref(dstw0, src0, sizes[idx] * SIZEOF_PIXEL, sizes[idx], i, j, sizes[idx]); + call_new(dstw1, src1, sizes[idx] * SIZEOF_PIXEL, sizes[idx], i, j, sizes[idx]); checkasm_check(int16_t, dstw0, MAX_PB_SIZE * sizeof(int16_t), dstw1, MAX_PB_SIZE * sizeof(int16_t), - sizes[size], sizes[size], "dst"); - bench_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); + sizes[idx], sizes[idx], "dst"); + bench_new(dstw1, src1, sizes[idx] * SIZEOF_PIXEL, sizes[idx], i, j, sizes[idx]); } } } @@ -128,7 +128,7 @@ static void checkasm_check_hevc_qpel_uni(void) PIXEL_RECT(dst1, 64, 64); HEVCDSPContext h; - int size, bit_depth, i, j; + int idx, bit_depth, i, j; declare_func(void, uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int height, intptr_t mx, intptr_t my, int width); @@ -137,7 +137,7 @@ static void checkasm_check_hevc_qpel_uni(void) for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { - for (size = 1; size < 10; size++) { + for (idx = 1; idx < FF_ARRAY_ELEMS(sizes); idx++) { const char *type; switch ((j << 1) | i) { case 0: type = "pel_uni_pixels"; break; // 0 0 @@ -146,23 +146,23 @@ static void checkasm_check_hevc_qpel_uni(void) case 3: type = "qpel_uni_hv"; break; // 1 1 } - if (check_func(h.put_hevc_qpel_uni[size][j][i], - "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) { + if (check_func(h.put_hevc_qpel_uni[idx][j][i], + "put_hevc_%s%d_%d", type, sizes[idx], bit_depth)) { randomize_buffers(); CLEAR_PIXEL_RECT(dst0); CLEAR_PIXEL_RECT(dst1); call_ref(dst0, dst0_stride, - src0, sizes[size] * SIZEOF_PIXEL, - sizes[size], i, j, sizes[size]); + src0, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], i, j, sizes[idx]); call_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - sizes[size], i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], i, j, sizes[idx]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - sizes[size], sizes[size], "dst"); + sizes[idx], sizes[idx], "dst"); bench_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - sizes[size], i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], i, j, sizes[idx]); } } } @@ -179,7 +179,7 @@ static void checkasm_check_hevc_qpel_uni_w(void) PIXEL_RECT(dst1, 64, 64); HEVCDSPContext h; - int size, bit_depth, i, j; + int idx, bit_depth, i, j; const int *denom, *wx, *ox; declare_func(void, uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width); @@ -189,7 +189,7 @@ static void checkasm_check_hevc_qpel_uni_w(void) for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { - for (size = 1; size < 10; size++) { + for (idx = 1; idx < FF_ARRAY_ELEMS(sizes); idx++) { const char *type; switch ((j << 1) | i) { case 0: type = "pel_uni_w_pixels"; break; // 0 0 @@ -198,8 +198,8 @@ static void checkasm_check_hevc_qpel_uni_w(void) case 3: type = "qpel_uni_w_hv"; break; // 1 1 } - if (check_func(h.put_hevc_qpel_uni_w[size][j][i], - "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) { + if (check_func(h.put_hevc_qpel_uni_w[idx][j][i], + "put_hevc_%s%d_%d", type, sizes[idx], bit_depth)) { for (denom = denoms; *denom >= 0; denom++) { for (wx = weights; *wx >= 0; wx++) { for (ox = offsets; *ox >= 0; ox++) { @@ -207,17 +207,17 @@ static void checkasm_check_hevc_qpel_uni_w(void) CLEAR_PIXEL_RECT(dst0); CLEAR_PIXEL_RECT(dst1); call_ref(dst0, dst0_stride, - src0, sizes[size] * SIZEOF_PIXEL, - sizes[size], *denom, *wx, *ox, i, j, sizes[size]); + src0, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], *denom, *wx, *ox, i, j, sizes[idx]); call_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - sizes[size], *denom, *wx, *ox, i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], *denom, *wx, *ox, i, j, sizes[idx]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - sizes[size], sizes[size], "dst"); + sizes[idx], sizes[idx], "dst"); bench_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - sizes[size], *denom, *wx, *ox, i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], *denom, *wx, *ox, i, j, sizes[idx]); } } } @@ -239,7 +239,7 @@ static void checkasm_check_hevc_qpel_bi(void) LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]); HEVCDSPContext h; - int size, bit_depth, i, j; + int idx, bit_depth, i, j; declare_func(void, uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width); @@ -249,7 +249,7 @@ static void checkasm_check_hevc_qpel_bi(void) for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { - for (size = 1; size < 10; size++) { + for (idx = 1; idx < FF_ARRAY_ELEMS(sizes); idx++) { const char *type; switch ((j << 1) | i) { case 0: type = "pel_bi_pixels"; break; // 0 0 @@ -258,23 +258,23 @@ static void checkasm_check_hevc_qpel_bi(void) case 3: type = "qpel_bi_hv"; break; // 1 1 } - if (check_func(h.put_hevc_qpel_bi[size][j][i], - "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) { + if (check_func(h.put_hevc_qpel_bi[idx][j][i], + "put_hevc_%s%d_%d", type, sizes[idx], bit_depth)) { randomize_buffers_ref(); CLEAR_PIXEL_RECT(dst0); CLEAR_PIXEL_RECT(dst1); call_ref(dst0, dst0_stride, - src0, sizes[size] * SIZEOF_PIXEL, - ref0, sizes[size], i, j, sizes[size]); + src0, sizes[idx] * SIZEOF_PIXEL, + ref0, sizes[idx], i, j, sizes[idx]); call_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - ref1, sizes[size], i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + ref1, sizes[idx], i, j, sizes[idx]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - sizes[size], sizes[size], "dst"); + sizes[idx], sizes[idx], "dst"); bench_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - ref1, sizes[size], i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + ref1, sizes[idx], i, j, sizes[idx]); } } } @@ -293,7 +293,7 @@ static void checkasm_check_hevc_qpel_bi_w(void) LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]); HEVCDSPContext h; - int size, bit_depth, i, j; + int idx, bit_depth, i, j; const int *denom, *wx, *ox; declare_func(void, uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, const int16_t *src2, @@ -305,7 +305,7 @@ static void checkasm_check_hevc_qpel_bi_w(void) for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { - for (size = 1; size < 10; size++) { + for (idx = 1; idx < FF_ARRAY_ELEMS(sizes); idx++) { const char *type; switch ((j << 1) | i) { case 0: type = "pel_bi_w_pixels"; break; // 0 0 @@ -314,8 +314,8 @@ static void checkasm_check_hevc_qpel_bi_w(void) case 3: type = "qpel_bi_w_hv"; break; // 1 1 } - if (check_func(h.put_hevc_qpel_bi_w[size][j][i], - "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) { + if (check_func(h.put_hevc_qpel_bi_w[idx][j][i], + "put_hevc_%s%d_%d", type, sizes[idx], bit_depth)) { for (denom = denoms; *denom >= 0; denom++) { for (wx = weights; *wx >= 0; wx++) { for (ox = offsets; *ox >= 0; ox++) { @@ -323,17 +323,17 @@ static void checkasm_check_hevc_qpel_bi_w(void) CLEAR_PIXEL_RECT(dst0); CLEAR_PIXEL_RECT(dst1); call_ref(dst0, dst0_stride, - src0, sizes[size] * SIZEOF_PIXEL, - ref0, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]); + src0, sizes[idx] * SIZEOF_PIXEL, + ref0, sizes[idx], *denom, *wx, *wx, *ox, *ox, i, j, sizes[idx]); call_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + ref1, sizes[idx], *denom, *wx, *wx, *ox, *ox, i, j, sizes[idx]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - sizes[size], sizes[size], "dst"); + sizes[idx], sizes[idx], "dst"); bench_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + ref1, sizes[idx], *denom, *wx, *wx, *ox, *ox, i, j, sizes[idx]); } } } @@ -356,7 +356,7 @@ static void checkasm_check_hevc_epel(void) LOCAL_ALIGNED_32(uint8_t, dst1, [BUF_SIZE]); HEVCDSPContext h; - int size, bit_depth, i, j; + int idx, bit_depth, i, j; declare_func(void, int16_t *dst, const uint8_t *src, ptrdiff_t srcstride, int height, intptr_t mx, intptr_t my, int width); @@ -365,7 +365,7 @@ static void checkasm_check_hevc_epel(void) for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { - for (size = 1; size < 10; size++) { + for (idx = 1; idx < FF_ARRAY_ELEMS(sizes); idx++) { const char *type; switch ((j << 1) | i) { case 0: type = "pel_pixels"; break; // 0 0 @@ -374,17 +374,17 @@ static void checkasm_check_hevc_epel(void) case 3: type = "epel_hv"; break; // 1 1 } - if (check_func(h.put_hevc_epel[size][j][i], - "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) { + if (check_func(h.put_hevc_epel[idx][j][i], + "put_hevc_%s%d_%d", type, sizes[idx], bit_depth)) { int16_t *dstw0 = (int16_t *) dst0, *dstw1 = (int16_t *) dst1; randomize_buffers(); randomize_buffers_dst(); - call_ref(dstw0, src0, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); - call_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); + call_ref(dstw0, src0, sizes[idx] * SIZEOF_PIXEL, sizes[idx], i, j, sizes[idx]); + call_new(dstw1, src1, sizes[idx] * SIZEOF_PIXEL, sizes[idx], i, j, sizes[idx]); checkasm_check(int16_t, dstw0, MAX_PB_SIZE * sizeof(int16_t), dstw1, MAX_PB_SIZE * sizeof(int16_t), - sizes[size], sizes[size], "dst"); - bench_new(dstw1, src1, sizes[size] * SIZEOF_PIXEL, sizes[size], i, j, sizes[size]); + sizes[idx], sizes[idx], "dst"); + bench_new(dstw1, src1, sizes[idx] * SIZEOF_PIXEL, sizes[idx], i, j, sizes[idx]); } } } @@ -401,7 +401,7 @@ static void checkasm_check_hevc_epel_uni(void) PIXEL_RECT(dst1, 64, 64); HEVCDSPContext h; - int size, bit_depth, i, j; + int idx, bit_depth, i, j; declare_func(void, uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int height, intptr_t mx, intptr_t my, int width); @@ -410,7 +410,7 @@ static void checkasm_check_hevc_epel_uni(void) for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { - for (size = 1; size < 10; size++) { + for (idx = 1; idx < FF_ARRAY_ELEMS(sizes); idx++) { const char *type; switch ((j << 1) | i) { case 0: type = "pel_uni_pixels"; break; // 0 0 @@ -419,23 +419,23 @@ static void checkasm_check_hevc_epel_uni(void) case 3: type = "epel_uni_hv"; break; // 1 1 } - if (check_func(h.put_hevc_epel_uni[size][j][i], - "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) { + if (check_func(h.put_hevc_epel_uni[idx][j][i], + "put_hevc_%s%d_%d", type, sizes[idx], bit_depth)) { randomize_buffers(); CLEAR_PIXEL_RECT(dst0); CLEAR_PIXEL_RECT(dst1); call_ref(dst0, dst0_stride, - src0, sizes[size] * SIZEOF_PIXEL, - sizes[size], i, j, sizes[size]); + src0, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], i, j, sizes[idx]); call_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - sizes[size], i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], i, j, sizes[idx]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - sizes[size], sizes[size], "dst"); + sizes[idx], sizes[idx], "dst"); bench_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - sizes[size], i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], i, j, sizes[idx]); } } } @@ -452,7 +452,7 @@ static void checkasm_check_hevc_epel_uni_w(void) PIXEL_RECT(dst1, 64, 64); HEVCDSPContext h; - int size, bit_depth, i, j; + int idx, bit_depth, i, j; const int *denom, *wx, *ox; declare_func(void, uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width); @@ -462,7 +462,7 @@ static void checkasm_check_hevc_epel_uni_w(void) for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { - for (size = 1; size < 10; size++) { + for (idx = 1; idx < FF_ARRAY_ELEMS(sizes); idx++) { const char *type; switch ((j << 1) | i) { case 0: type = "pel_uni_w_pixels"; break; // 0 0 @@ -471,8 +471,8 @@ static void checkasm_check_hevc_epel_uni_w(void) case 3: type = "epel_uni_w_hv"; break; // 1 1 } - if (check_func(h.put_hevc_epel_uni_w[size][j][i], - "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) { + if (check_func(h.put_hevc_epel_uni_w[idx][j][i], + "put_hevc_%s%d_%d", type, sizes[idx], bit_depth)) { for (denom = denoms; *denom >= 0; denom++) { for (wx = weights; *wx >= 0; wx++) { for (ox = offsets; *ox >= 0; ox++) { @@ -480,17 +480,17 @@ static void checkasm_check_hevc_epel_uni_w(void) CLEAR_PIXEL_RECT(dst0); CLEAR_PIXEL_RECT(dst1); call_ref(dst0, dst0_stride, - src0, sizes[size] * SIZEOF_PIXEL, - sizes[size], *denom, *wx, *ox, i, j, sizes[size]); + src0, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], *denom, *wx, *ox, i, j, sizes[idx]); call_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - sizes[size], *denom, *wx, *ox, i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], *denom, *wx, *ox, i, j, sizes[idx]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - sizes[size], sizes[size], "dst"); + sizes[idx], sizes[idx], "dst"); bench_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - sizes[size], *denom, *wx, *ox, i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + sizes[idx], *denom, *wx, *ox, i, j, sizes[idx]); } } } @@ -512,7 +512,7 @@ static void checkasm_check_hevc_epel_bi(void) LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]); HEVCDSPContext h; - int size, bit_depth, i, j; + int idx, bit_depth, i, j; declare_func(void, uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width); @@ -522,7 +522,7 @@ static void checkasm_check_hevc_epel_bi(void) for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { - for (size = 1; size < 10; size++) { + for (idx = 1; idx < FF_ARRAY_ELEMS(sizes); idx++) { const char *type; switch ((j << 1) | i) { case 0: type = "pel_bi_pixels"; break; // 0 0 @@ -531,23 +531,23 @@ static void checkasm_check_hevc_epel_bi(void) case 3: type = "epel_bi_hv"; break; // 1 1 } - if (check_func(h.put_hevc_epel_bi[size][j][i], - "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) { + if (check_func(h.put_hevc_epel_bi[idx][j][i], + "put_hevc_%s%d_%d", type, sizes[idx], bit_depth)) { randomize_buffers_ref(); CLEAR_PIXEL_RECT(dst0); CLEAR_PIXEL_RECT(dst1); call_ref(dst0, dst0_stride, - src0, sizes[size] * SIZEOF_PIXEL, - ref0, sizes[size], i, j, sizes[size]); + src0, sizes[idx] * SIZEOF_PIXEL, + ref0, sizes[idx], i, j, sizes[idx]); call_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - ref1, sizes[size], i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + ref1, sizes[idx], i, j, sizes[idx]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - sizes[size], sizes[size], "dst"); + sizes[idx], sizes[idx], "dst"); bench_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - ref1, sizes[size], i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + ref1, sizes[idx], i, j, sizes[idx]); } } } @@ -566,7 +566,7 @@ static void checkasm_check_hevc_epel_bi_w(void) LOCAL_ALIGNED_32(int16_t, ref1, [BUF_SIZE]); HEVCDSPContext h; - int size, bit_depth, i, j; + int idx, bit_depth, i, j; const int *denom, *wx, *ox; declare_func(void, uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, const int16_t *src2, @@ -578,7 +578,7 @@ static void checkasm_check_hevc_epel_bi_w(void) for (i = 0; i < 2; i++) { for (j = 0; j < 2; j++) { - for (size = 1; size < 10; size++) { + for (idx = 1; idx < FF_ARRAY_ELEMS(sizes); idx++) { const char *type; switch ((j << 1) | i) { case 0: type = "pel_bi_w_pixels"; break; // 0 0 @@ -587,8 +587,8 @@ static void checkasm_check_hevc_epel_bi_w(void) case 3: type = "epel_bi_w_hv"; break; // 1 1 } - if (check_func(h.put_hevc_epel_bi_w[size][j][i], - "put_hevc_%s%d_%d", type, sizes[size], bit_depth)) { + if (check_func(h.put_hevc_epel_bi_w[idx][j][i], + "put_hevc_%s%d_%d", type, sizes[idx], bit_depth)) { for (denom = denoms; *denom >= 0; denom++) { for (wx = weights; *wx >= 0; wx++) { for (ox = offsets; *ox >= 0; ox++) { @@ -596,17 +596,17 @@ static void checkasm_check_hevc_epel_bi_w(void) CLEAR_PIXEL_RECT(dst0); CLEAR_PIXEL_RECT(dst1); call_ref(dst0, dst0_stride, - src0, sizes[size] * SIZEOF_PIXEL, - ref0, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]); + src0, sizes[idx] * SIZEOF_PIXEL, + ref0, sizes[idx], *denom, *wx, *wx, *ox, *ox, i, j, sizes[idx]); call_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + ref1, sizes[idx], *denom, *wx, *wx, *ox, *ox, i, j, sizes[idx]); checkasm_check_pixel_padded(dst0, dst0_stride, dst1, dst1_stride, - sizes[size], sizes[size], "dst"); + sizes[idx], sizes[idx], "dst"); bench_new(dst1, dst1_stride, - src1, sizes[size] * SIZEOF_PIXEL, - ref1, sizes[size], *denom, *wx, *wx, *ox, *ox, i, j, sizes[size]); + src1, sizes[idx] * SIZEOF_PIXEL, + ref1, sizes[idx], *denom, *wx, *wx, *ox, *ox, i, j, sizes[idx]); } } } -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org