From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id CCB394E28A for ; Mon, 5 May 2025 12:50:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CA99868AB87; Mon, 5 May 2025 15:50:44 +0300 (EEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2029.outbound.protection.outlook.com [40.92.89.29]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0AE23687AC7 for ; Mon, 5 May 2025 15:50:38 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=v+IB0W/uvvtDhvoB8Xq0dAmYL8j+nfhf8deIy3vwzZ/dDgfI0N6mDtMVw5MlexpzAGR2RFCimb7/k1INwHRAvkbx7nCu+g9jdQ9ydPYoeqfuNzt9uVUxtUEKxOa2LVm06mLyi3FSSJvwmJ6/J7ykOdp+GLGPnavHRwD3M4Icw//A/lkHL/EJfxL+AbUJWkhBWyjiLzZK889XhHjfRHwM+tA4VkJdSNms8aygUnTI38EM9nJDwZkTLbyRzi0Rbsz43gRRlG+FlPuT70ChzVJ4jEwvJLSGhVvg5eJpCGgXqXfibrzKB7eB56sI/cm1ib5MwkV6qDaWO/nqpc13/OpfmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=+bGOsx7nMucweY1wj0neHE3uiUT633opoWXZNdCMHk8=; b=IlprDSyvoHPz5soirriWF8fVHCjg+R8hX6cDwrBpjZ8nRHah9iUevBWpYcuaaXBj9KHwtXC46275EymUIrb0OBYFI1BFJMF3Zpuk65T1uooVakQu4v/M64eSBCq2y7O9G0FnI05JsSljHUVW6v2a4m/GDbvUAyOjQNe1FfdkjFw0KNjKpJIc9yiKY7I+4PWU2WfNW9PdvfxmwPET1E7pBahclN6KEkFsTCplzxk02k2ctbd4eZcW4vBb+l8vmiaZnq0LwWQBWI2Nj6KPUkhV41mtnQ3LfxzJd1ydxL0ElAI1dqM+AOAzC3NDTlt0zhhbYVumLkfJd8KRxNln7r7cXg== 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=+bGOsx7nMucweY1wj0neHE3uiUT633opoWXZNdCMHk8=; b=amJSioyg9/I+Zg1oDyXmJYVEirYjqirJenqFuS7mYLL5zW2iiqIkC8jM3/kJMIoCQGjmQfB8Bjsv6c0DlgFhWmG7BpbuUbNh0t0lDbAmnRnZTJE8tZ6629ZyoNJV4D23MeqwxxtWXlf5I8/7UlCuuHSP3C7jrWB/LcHDvJ78YfZdR0ur1CfPg94wEHxAzd2HYYo0SJKRNZU/JNv/fpO0Y+cwFlfIHd+e6gx1yb2APFyyoNxHvWcoMC4YXTwHcMKZvmiXKul7oIkpKLrLK6NAvUgaNh/LqcIp6pRh6jIlE/sfzyV3frxFlzjiUCJbkYdPUdo0RSbSrE6X4fklqDQhuw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS4P250MB0872.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:58b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8699.20; Mon, 5 May 2025 12:50:37 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::384d:40d4:ecb7:1c9]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::384d:40d4:ecb7:1c9%4]) with mapi id 15.20.8699.019; Mon, 5 May 2025 12:50:37 +0000 Message-ID: Date: Mon, 5 May 2025 14:50:35 +0200 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <20250504153912.2944315-1-michael@niedermayer.cc> Content-Language: en-US From: Andreas Rheinhardt In-Reply-To: <20250504153912.2944315-1-michael@niedermayer.cc> X-ClientProxiedBy: FR4P281CA0089.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:cd::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <51ff16c0-cc52-4470-bf29-b42714b28a0d@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS4P250MB0872:EE_ X-MS-Office365-Filtering-Correlation-Id: 28126928-c68f-4d34-5958-08dd8bd36e8b X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmoaApi1aWVt9ILKZbGoHsd6KQpvn58EynrP5Vr2ARNCz2ijzN3m0FJFmF135prURFygtQypHBusICvIc4Fh6uUMhkZgBSwzxAnoCR9TLLyS4VmrEhBuk0croMFNcZjtCu/SYoFi4LWW9TuawZmaimM8mouEEMYiPR0/OK8l1MZjkdA2HNHUC9W6+ak7Gh4mP/Z6h8yTuYTTJWcvMBVeH1xV4AjbI71SgWuoFcGUSy0Waxjg6clrhBLNsCPdMCUG0ne2Q5X4SJdBxxqi891f5UYFgDAATSFknWgNsfpKBKMjfkjfUdBMGrSmpxHLBrx9bW5o0mT0L4vrE9iv2sr/VZ9Y5agvFLwUFB5o8NnRjldlD4HUW9Uhvs6HHdZZhWLQxe9+yUv58/WbEaWmovPSSbyekQ00wHITJUEVVnEcsQXHaSx9S9COoqndBOgJCQyWBFou8IsFMUQ6wyTKnRC/roQ18hh8RewV6ANe1patRxRlLk3lzx3V01U2F4Ms3RbiN0MbLXDeBhPg75C9i4EnBL1cVi7dkxhoKzaBcXBkmRQZEUE2xMlRGYgheaoIm7OhlZ8l3D9oWnBqq2KufOhMBwXGkeRFGI7qmPTa+gCk1LAWZNrBGe3SHeCT8o9I5iCJaELvVaBCdGbuCG2btsHX2d7j8lQScGIpv6NHE7lhoVS/6m9EWysA7JhPREUO+h4hQvt/SQt+HATRmUaEqvuTN5/kAA3ZkXfRWAfUdp2g12EVQCAFZse/j/YytZQF7HstW0o= X-Microsoft-Antispam: BCL:0; ARA:14566002|19110799003|8060799006|461199028|6090799003|5072599009|15080799006|7092599003|3412199025|440099028|12091999003|41001999003; X-Microsoft-Antispam-Message-Info: =?utf-8?B?WStJOTloRzJ6MExua2ptbGcxM092NEU1TWs1K2R1cjJrWFoxMDF1SFMyR08z?= =?utf-8?B?YmV6cWJLZFUxZStOVjBpemMrZk5adkl1R0x5NkZqbVp2SFdBQmpDanpLUUJh?= =?utf-8?B?OVg3SUFGTmtRc1EwSVFpaHZJQjQ2ci9WOHR6b1ZKMnVrcTlEVXU5Tm5BN3A3?= =?utf-8?B?MmJJUThrQnJYM3pYL1VRRVpIMXE0SGhSUWFnemhjbk5URURjR0RrZzduWW9D?= =?utf-8?B?OXV0TkV1b2oxMk15MFZWVmZObzVQZ0dLM0RGNTRWdmJacWlHLy9UVHg2T01p?= =?utf-8?B?eWU4Vlh2M2Vta2pyQkRVMW1oV1Q1eUJZY2dXTjVjK2dLVGJMK2dBYnlOeWdm?= =?utf-8?B?QTNqODNVd05pVTAyME5ualcxK3B5M0Y2YVpieG00bjNpWjZOZmtqazY4ZGYw?= =?utf-8?B?aHVXWjlqRERCdGZ4dFJUY2o0TEtvUnA3bnJmc1hva2s5YndJdWVFTFF2ZW9n?= =?utf-8?B?SnhnK252VDU2eUVFOWlYbEc4TEU0OEVLU3ZtL2pjeUR2WnFwRVpxMXovSmNn?= =?utf-8?B?Rk43RFU0SGt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pcDRyQU9WT0ZuUU9WY1VRb3MwRHBiV1dZeUJMWXlFVDVINFNXQ29EZWpZ?= =?utf-8?B?b00wRU40dXZ3bmJUVEhwV1QvM2t5TXN1dU1GdFFXT3JHYnROenI2OVNiWlNY?= =?utf-8?B?N0JmaFphRnZIUWdscHh5QWh6Q2F5anBwSGF4aHFZYmxKdTN6V3dBQ1dLSHV3?= =?utf-8?B?NGs2czA5b2JlcCtiNXFZRWZLUzZyS2ZCRm9HU1V2Rk9uRVBDcCtzNkZLQkZ5?= =?utf-8?B?SXZYTUdMaWRzN3I1M0owN0FMZmMxMG8rT3RSbFpyTWw5OVlzUWNMNThxZXoz?= =?utf-8?B?VTBWOTNMQmI4cS9iOVV5QT09?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28126928-c68f-4d34-5958-08dd8bd36e8b X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2025 12:50:37.4346 (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: AS4P250MB0872 Subject: Re: [FFmpeg-devel] [PATCH] libpostproc/tests: Factor ff_chksum() out 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Michael Niedermayer: > Signed-off-by: Michael Niedermayer > --- > libpostproc/Makefile | 6 ++++++ > libpostproc/test_utils.c | 38 ++++++++++++++++++++++++++++++++++ > libpostproc/test_utils.h | 27 ++++++++++++++++++++++++ > libpostproc/tests/blocktest.c | 18 ++-------------- > libpostproc/tests/stripetest.c | 18 ++-------------- > libpostproc/tests/temptest.c | 18 ++-------------- > 6 files changed, 77 insertions(+), 48 deletions(-) > create mode 100644 libpostproc/test_utils.c > create mode 100644 libpostproc/test_utils.h > > diff --git a/libpostproc/Makefile b/libpostproc/Makefile > index defd541e8bc..f75c9537944 100644 > --- a/libpostproc/Makefile > +++ b/libpostproc/Makefile > @@ -9,9 +9,15 @@ HEADERS = postprocess.h \ > OBJS = postprocess.o \ > version.o \ > > +TESTOBJS = test_utils.o \ > + > # Windows resource file > SHLIBOBJS-$(HAVE_GNU_WINDRES) += postprocres.o > > TESTPROGS = blocktest \ > stripetest \ > temptest \ > + > +$(SUBDIR)tests/blocktest$(EXESUF): $(SUBDIR)test_utils.o > +$(SUBDIR)tests/stripetest$(EXESUF): $(SUBDIR)test_utils.o > +$(SUBDIR)tests/temptest$(EXESUF): $(SUBDIR)test_utils.o > diff --git a/libpostproc/test_utils.c b/libpostproc/test_utils.c > new file mode 100644 > index 00000000000..bce0a112cce > --- /dev/null > +++ b/libpostproc/test_utils.c > @@ -0,0 +1,38 @@ > +/* > + * Copyright (c) 2025 Michael Niedermayer > + * > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > + */ > + > +#include "libavutil/frame.h" > +#include "libavutil/adler32.h" > +#include "libpostproc/test_utils.h" > + > +int64_t ff_chksum(AVFrame *f) > +{ > + AVAdler a = 123; > + > + for(int y=0; yheight; y++) { > + a = av_adler32_update(a, &f->data[0][y*f->linesize[0]], f->width); > + } > + for(int y=0; y<(f->height+1)/2; y++) { > + a = av_adler32_update(a, &f->data[1][y*f->linesize[1]], (f->width+1)/2); > + a = av_adler32_update(a, &f->data[2][y*f->linesize[2]], (f->width+1)/2); > + } > + > + return a; > +} > diff --git a/libpostproc/test_utils.h b/libpostproc/test_utils.h > new file mode 100644 > index 00000000000..f79ec997a74 > --- /dev/null > +++ b/libpostproc/test_utils.h > @@ -0,0 +1,27 @@ > +/* > + * Copyright (c) 2025 Michael Niedermayer > + * > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > + */ > + > + > +#ifndef POSTPROC_TEST_UTILS_H > +#define POSTPROC_TEST_UTILS_H > + > +int64_t ff_chksum(AVFrame *f); > + > +#endif /* POSTPROC_TEST_UTILS_H */ > diff --git a/libpostproc/tests/blocktest.c b/libpostproc/tests/blocktest.c > index 5375d3c72b6..baba610c284 100644 > --- a/libpostproc/tests/blocktest.c > +++ b/libpostproc/tests/blocktest.c > @@ -21,6 +21,7 @@ > #include "libavutil/frame.h" > #include "libavutil/adler32.h" > #include "libpostproc/postprocess.h" > +#include "libpostproc/test_utils.h" > > typedef const uint8_t *cuint8; > > @@ -39,21 +40,6 @@ static void blocks(AVFrame *frame, int blocksize, int mul) > } > } > > -static int64_t chksum(AVFrame *f) > -{ > - AVAdler a = 123; > - > - for(int y=0; yheight; y++) { > - a = av_adler32_update(a, &f->data[0][y*f->linesize[0]], f->width); > - } > - for(int y=0; y<(f->height+1)/2; y++) { > - a = av_adler32_update(a, &f->data[1][y*f->linesize[1]], (f->width+1)/2); > - a = av_adler32_update(a, &f->data[2][y*f->linesize[2]], (f->width+1)/2); > - } > - > - return a; > -} > - > static int64_t test(int width, int height, const char * filter_string, int blocksize, int flags, int pict_type, int quality) { > AVFrame *in = av_frame_alloc(); > AVFrame *out = av_frame_alloc(); > @@ -90,7 +76,7 @@ static int64_t test(int width, int height, const char * filter_string, int block > width, height, qp, QP_STRIDE, > mode, context, pict_type); > > - ret = chksum(out); > + ret = ff_chksum(out); > end: > av_frame_free(&in); > av_frame_free(&out); > diff --git a/libpostproc/tests/stripetest.c b/libpostproc/tests/stripetest.c > index be23934493f..ef92b22427a 100644 > --- a/libpostproc/tests/stripetest.c > +++ b/libpostproc/tests/stripetest.c > @@ -21,6 +21,7 @@ > #include "libavutil/frame.h" > #include "libavutil/adler32.h" > #include "libpostproc/postprocess.h" > +#include "libpostproc/test_utils.h" > > typedef const uint8_t *cuint8; > > @@ -48,21 +49,6 @@ static void strips(AVFrame *frame, int mul) > } > } > > -static int64_t chksum(AVFrame *f) > -{ > - AVAdler a = 123; > - > - for(int y=0; yheight; y++) { > - a = av_adler32_update(a, &f->data[0][y*f->linesize[0]], f->width); > - } > - for(int y=0; y<(f->height+1)/2; y++) { > - a = av_adler32_update(a, &f->data[1][y*f->linesize[1]], (f->width+1)/2); > - a = av_adler32_update(a, &f->data[2][y*f->linesize[2]], (f->width+1)/2); > - } > - > - return a; > -} > - > static int64_t test(int width, int height, const char *testname, int mul, int flags, int pict_type, int quality) { > AVFrame *in = av_frame_alloc(); > AVFrame *out = av_frame_alloc(); > @@ -94,7 +80,7 @@ static int64_t test(int width, int height, const char *testname, int mul, int fl > width, height, NULL, 0, > mode, context, pict_type); > > - ret = chksum(out); > + ret = ff_chksum(out); > end: > av_frame_free(&in); > av_frame_free(&out); > diff --git a/libpostproc/tests/temptest.c b/libpostproc/tests/temptest.c > index 5396b0da44e..2ebd8fb1528 100644 > --- a/libpostproc/tests/temptest.c > +++ b/libpostproc/tests/temptest.c > @@ -21,6 +21,7 @@ > #include "libavutil/frame.h" > #include "libavutil/adler32.h" > #include "libpostproc/postprocess.h" > +#include "libpostproc/test_utils.h" > > typedef const uint8_t *cuint8; > > @@ -41,21 +42,6 @@ static void stuff(AVFrame *frame, unsigned *state, int mul) > } > } > > -static int64_t chksum(AVFrame *f) > -{ > - AVAdler a = 123; > - > - for(int y=0; yheight; y++) { > - a = av_adler32_update(a, &f->data[0][y*f->linesize[0]], f->width); > - } > - for(int y=0; y<(f->height+1)/2; y++) { > - a = av_adler32_update(a, &f->data[1][y*f->linesize[1]], (f->width+1)/2); > - a = av_adler32_update(a, &f->data[2][y*f->linesize[2]], (f->width+1)/2); > - } > - > - return a; > -} > - > static int64_t test(int width, int height, const char *testname, int mul, int flags, int pict_type, int quality) { > AVFrame *in = av_frame_alloc(); > AVFrame *out = av_frame_alloc(); > @@ -89,7 +75,7 @@ static int64_t test(int width, int height, const char *testname, int mul, int fl > width, height, NULL, 0, > mode, context, pict_type); > > - ret += chksum(out); > + ret += ff_chksum(out); > ret *= 1664525U; > } > end: Why is this not in the tests subfolder? - Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".