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 9E4DC4C050 for <ffmpegdev@gitmailbox.com>; Tue, 1 Apr 2025 15:39:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0E24A687D54; Tue, 1 Apr 2025 18:39:07 +0300 (EEST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C9820687D06 for <ffmpeg-devel@ffmpeg.org>; Tue, 1 Apr 2025 18:39:00 +0300 (EEST) Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-549946c5346so6054977e87.2 for <ffmpeg-devel@ffmpeg.org>; Tue, 01 Apr 2025 08:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1743521940; x=1744126740; 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=pZwlkPRttUPNG47S2U9OTo6l2Mj/ckpM5KsL9w3tM9Q=; b=UDylz+5rQKyWdxlSEM07Jqa/sXDrwIV01D/BDD2ShYbpHkOmzl/gkr6jWIC3GNYVNZ zLE4si3dEH0CeVawTeaiv3/SmD9rllgNtACO9Bt8Q/kXMDNkGMV7bvzLyLNRJqDydmvG SNyDrBL3sO0sDDy3e2lBbiXD4a2WFjCD+nHPD3OfF7k86GTJ0EdXTEbVocGiRnPdomag tjcuIWhUUz8YELPCnikXZeIiTNzsRr5uJSWk3HmZWoabpD41R+4z/1huqTA0rINvY1mp cWkCVdVf3ntY1CIXPeSZsXDj4xssPwVXa+lotig+05R4AxOPXuSfa1pF4smAQml8kFyO ErXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743521940; x=1744126740; 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=pZwlkPRttUPNG47S2U9OTo6l2Mj/ckpM5KsL9w3tM9Q=; b=wJ3ZtCoL0+PjlIP9I7LMIfUB/B5JwvzrtBZoTDAiNKi5V+zseq6zN0OKmuIwrmXy6A Cxms8bBzMGxoV+x7/ktV6tbMaT2YUgNoxU1hmw9Fs8eniEXzrOqVNg+3bg+BtRS2goTC VRiYFw5b6MOZa6mNOK1ckGxxc9wshOEYDbuFmJJeBG5seDBe/s6TPpSebJsgb2mVWolX RWZRHIkYw5y/q4VUmbpNGMbjUibLwqWuYCHMq5FBPRpFBWeEPi8sS6/tKLaXL34ERcjH 3rgpiUhu7gvzLtapiKj0jBsPtTxNY+ajLwy7wVuSvx3XG7pIrHWlwXd0/F/iNsxHTkUm LsMw== X-Gm-Message-State: AOJu0YyfQRAdDwVTFX+OSJtEnWv+rM3dLVp6C7TeP42avfk9sRmovbNA fXkSloZsseXVarRofFqaCOzvK7TXLBI1rVrnwLLToFZqX6kl1sRZlArSjZhVds20VcxB4QoB7SQ sSQ== X-Gm-Gg: ASbGnctVFPtV+a7l2MXLO0m8NwfqRCMKOZpk/Y8G9vc2GZ7SBpkONqu5DYHdKGoUW+K HSttApOESQF/RbjESXALGN4KwPxTY0gtpsWZRix5lOUXRhuKsPiksXFVr8H4gMXyzr8Jc/4CsMj cK3K7Kh7Z/q14QbRvixvu6NK/8ONj0OA49bccGa6luRMrxbiKOdJtrWCNdiFBvQSosKN7nmjUQ1 fcioYxBaM37f2VjFlAApjAkGWYkUf6OyrtQ6r/ki3I2GMMn5mmZ+q3yA7SV/ckQZGIipe1fCk/X 3/heTyvhNeKN5ZFf3ww0FkA8gRwe5AE7xlyt07TRM3VTpAOaXnNZmEJWgH8Lzgqy0oU5CAmo3+a ou23gVwlS5Bc12RK4Rtz6c3rXzS/KRFBwlQnxE/bOCFqL8nN40+0= X-Google-Smtp-Source: AGHT+IHiF2s4hQu11r07OENc1kRkZRpXkAOmMKhlihokx8PZIF4rRfrLTiZa5087qBpXtEJoK+SQUA== X-Received: by 2002:a05:6512:3b14:b0:545:2d80:a47d with SMTP id 2adb3069b0e04-54b1113cebfmr3632494e87.44.1743521939786; Tue, 01 Apr 2025 08:38:59 -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-54b0e703fa4sm1186006e87.169.2025.04.01.08.38.59 for <ffmpeg-devel@ffmpeg.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Apr 2025 08:38:59 -0700 (PDT) Date: Tue, 1 Apr 2025 18:38:58 +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: <379a0a4-6f21-b77f-3929-5e70b7bd4b6c@martin.st> Message-ID: <2341b3e6-e7b1-1e2c-6792-8bdb6a1af3b9@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> <379a0a4-6f21-b77f-3929-5e70b7bd4b6c@martin.st> MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: quoted-printable Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/2341b3e6-e7b1-1e2c-6792-8bdb6a1af3b9@martin.st/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> On Tue, 1 Apr 2025, Martin Storsj=F6 wrote: > 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 =3D (w + align_w - 1) & ~(align_w - 1); \ >>>>> + int aligned_h =3D (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 tes= ts >>> 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 =3D (w - 1LL + align_w) & ~(align_w - 1); \ >> if (aligned_w !=3D (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. Pushed. // 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".