From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 1828A4BFC2 for <ffmpegdev@gitmailbox.com>; Tue, 1 Apr 2025 09:38:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1394C687CBE; Tue, 1 Apr 2025 12:38:33 +0300 (EEST) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8D8B9687C3D for <ffmpeg-devel@ffmpeg.org>; Tue, 1 Apr 2025 12:38:26 +0300 (EEST) Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-54af20849adso5106169e87.1 for <ffmpeg-devel@ffmpeg.org>; Tue, 01 Apr 2025 02:38:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1743500306; x=1744105106; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=LmOet61X6ommx9duv0Z4NfYtNk58YeBHQU17+0i5yko=; b=J7zMU0ucB2SM0YbXwdKZzkZ1JjtHbOMd/Nf6SDwZg9RV/7HHoWKU+RrZ+bAByZeo6B 9OyC5DYwwmmGQxW4x1POxxCUttsCmhZXLW8XUW5hgK5OmrcSvDgOKFl7QxlRktLbEzcv VWMAJ4qbsXFg/Mv7Gyzitb35Fll1uAqcBRBzlPM/hXY634Wu/4P1jjdU/icj2cl48pCS +KEqrK/NcRxzLD8vNYHdTDPvSPsWGKOVja9zp/akBnGvrj8P4kx1l8jk6CCFBr7PE3XE HjA3Oo9M4C75cwb1N7jU5+6zI6iHw7SokWjDYT9TeiP6ZiLm4W7wD6ENwP+GIa93GqPO jO6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743500306; x=1744105106; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LmOet61X6ommx9duv0Z4NfYtNk58YeBHQU17+0i5yko=; b=TTwjFXYWYMhkTYRS1UVb2iZuV7lqHwcTcmEmB5y2IW+B3ayxJmVXUa1IeVX06qUIrO xde9Vaj98sw7OiAsDjQtdSdBNHTS7/xleR0xlIjSX+K5iQjb2t8TRJLXPcM/qiuIeXLn OGPsnuLzH6bWGEpixhj+ZtXe07okiSRdh0XCYrp53UGHhvy/QI93vH8n3P6l50Y+Gw7q QcI1gqc2OldVLyk3HEg9y2NqlJs23SpVXmSRp/ykMK+KuuiL4PB4abvo1M0Q1dggDJNb mvUdQrJ4gijVhQ1r6yW3i1l0EqzQ9W75wmIj4jlgWFl2uTII6d/KJ4pDDnOHkdxupMR5 t3pQ== X-Gm-Message-State: AOJu0Yyvzg0o37+doxemeo6BAJafS05hb0vecy3aNHEdr4V2uDMQk6vH 3CY69I6d4HHZNKVywveOQqELCnOIObenNHgNrhtyzlHxqwfr/XltMmkNiDHco1wCdPmPMy7zt5x qdg== X-Gm-Gg: ASbGnctfiwBBYZmNS3i/tqUCL2ceOCzdyIdcV83joCcWyNpd0JyjWyEyvH3XYC+xecg N7QWkdOd+oPXK/pNb8YRl0IRfBHe+xcwjDAQts0YV0NLvtKE6fp/MmR4qadD0W7dc43NFfPWbFT jQTaBwoHuC2UfZ4dqr2AG6jP5ddEaYvBiLTV//7GXUv6GpBwM2airYS9pW9orgh4u5KuAGJhdSJ Kn9EUaUAmMeBhDaGykMNPJyPwpCbyK2sNU+miJ07O3mr5lmCSTGZbGlnb/ka8Ljqr5yeQYFrrtz TLZZgZ6yOcJOPU0jp7qFv1wYnH1NEyG4mM/BHnUfruntlOYHlaN6HMHy+A6ZRuxEO3SpAF0PZBF P0EAHFG2hFQn77TtQjNrai2Ajz6ul1vdglmx1uh5J X-Google-Smtp-Source: AGHT+IEgU0cuYM8AajqVtmNfhQ1e/R5vb0VRsVOGVqjXrD2KZL73Ns+30I76+W2ghfqIO8ewTv3+oQ== X-Received: by 2002:a05:6512:39ca:b0:545:2474:2c9b with SMTP id 2adb3069b0e04-54b1083f24dmr3864150e87.22.1743500305541; Tue, 01 Apr 2025 02:38:25 -0700 (PDT) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54b0957fbc8sm1331081e87.123.2025.04.01.02.38.24 for <ffmpeg-devel@ffmpeg.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Apr 2025 02:38:25 -0700 (PDT) Date: Tue, 1 Apr 2025 12:38:24 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= <martin@martin.st> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> In-Reply-To: <20250401002840.GF4991@pb2> Message-ID: <379a0a4-6f21-b77f-3929-5e70b7bd4b6c@martin.st> References: <20250326103015.44296-1-martin@martin.st> <20250326103015.44296-2-martin@martin.st> <20250329001510.GO4991@pb2> <2642b04-6ac-a238-c3f2-1551a5e5d4c@martin.st> <20250401002840.GF4991@pb2> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 2/4] checkasm: Implement helpers for defining and checking padded rects X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/379a0a4-6f21-b77f-3929-5e70b7bd4b6c@martin.st/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> On Tue, 1 Apr 2025, Michael Niedermayer wrote: >>>> #define DEF_CHECKASM_CHECK_FUNC(type, fmt) \ >>>> int checkasm_check_##type(const char *file, int line, \ >>>> const type *buf1, ptrdiff_t stride1, \ >>>> const type *buf2, ptrdiff_t stride2, \ >>>> - int w, int h, const char *name) \ >>>> + int w, int h, const char *name, \ >>>> + int align_w, int align_h, \ >>>> + int padding) \ >>>> { \ >>> >>>> + int aligned_w = (w + align_w - 1) & ~(align_w - 1); \ >>>> + int aligned_h = (h + align_h - 1) & ~(align_h - 1); \ >>> >>> this can overflow >>> feel free to fix in a seperate patch >> >> Feel free to propose a patch for how you'd prefer to have it fixed then... I >> don't see this as a real world problem - w and h are bounded by the tests >> themselves, and likewise the alignments - I don't see us having tests using >> buffers with a width near INT32_MAX? > > maybe but then > if we want our asm code to handle such extrem cases, something needs to > test it > > ill send a patch based on this: (once your patches are in / minus in case > i forget) > > int64_t aligned_w = (w - 1LL + align_w) & ~(align_w - 1); \ > if (aligned_w != (int32_t)aligned_w) > return AVERROR(EINVAL) Ok, if you find that important. I'll go ahead and push patches 1-2 and 4 from this set, soon, holding off of patch 3/4 while waiting for someone to fix the Loongarch HEVC SIMD. // Martin _______________________________________________ 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".