Re: [FFmpeg-devel] [PATCH] lavu/common: Fix AV_CEIL_RSHIFT for unsigned LHS

2024-11-13 Thread Michael Niedermayer
Hi Nuo Mi On Sun, Nov 10, 2024 at 08:17:06PM +0800, Nuo Mi wrote: > On Mon, Oct 21, 2024 at 2:30 AM Michael Niedermayer > wrote: > > > On Fri, Oct 18, 2024 at 06:48:40PM +0100, Frank Plowman wrote: > > > On 15/10/2024 21:23, Frank Plowman wrote: > > > > On 14/10/2024 23:26, Michael Niedermayer w

Re: [FFmpeg-devel] [PATCH] lavu/common: Fix AV_CEIL_RSHIFT for unsigned LHS

2024-11-10 Thread Nuo Mi
On Mon, Oct 21, 2024 at 2:30 AM Michael Niedermayer wrote: > On Fri, Oct 18, 2024 at 06:48:40PM +0100, Frank Plowman wrote: > > On 15/10/2024 21:23, Frank Plowman wrote: > > > On 14/10/2024 23:26, Michael Niedermayer wrote: > > >> On Sat, Oct 05, 2024 at 03:38:05PM -0700, Frank Plowman wrote: > >

Re: [FFmpeg-devel] [PATCH] lavu/common: Fix AV_CEIL_RSHIFT for unsigned LHS

2024-10-20 Thread Michael Niedermayer
On Fri, Oct 18, 2024 at 06:48:40PM +0100, Frank Plowman wrote: > On 15/10/2024 21:23, Frank Plowman wrote: > > On 14/10/2024 23:26, Michael Niedermayer wrote: > >> On Sat, Oct 05, 2024 at 03:38:05PM -0700, Frank Plowman wrote: > >>> The first branch of this ternary expression was intended to avoid

Re: [FFmpeg-devel] [PATCH] lavu/common: Fix AV_CEIL_RSHIFT for unsigned LHS

2024-10-18 Thread Frank Plowman
On 15/10/2024 21:23, Frank Plowman wrote: > On 14/10/2024 23:26, Michael Niedermayer wrote: >> On Sat, Oct 05, 2024 at 03:38:05PM -0700, Frank Plowman wrote: >>> The first branch of this ternary expression was intended to avoid >>> having two shift operations in the case the RHS is not known at >>>

Re: [FFmpeg-devel] [PATCH] lavu/common: Fix AV_CEIL_RSHIFT for unsigned LHS

2024-10-15 Thread Frank Plowman
On 14/10/2024 23:26, Michael Niedermayer wrote: > On Sat, Oct 05, 2024 at 03:38:05PM -0700, Frank Plowman wrote: >> The first branch of this ternary expression was intended to avoid >> having two shift operations in the case the RHS is not known at >> compile time. It only works if the LHS has a s

Re: [FFmpeg-devel] [PATCH] lavu/common: Fix AV_CEIL_RSHIFT for unsigned LHS

2024-10-14 Thread Michael Niedermayer
On Sat, Oct 05, 2024 at 03:38:05PM -0700, Frank Plowman wrote: > The first branch of this ternary expression was intended to avoid > having two shift operations in the case the RHS is not known at > compile time. It only works if the LHS has a signed type however, > otherwise the result is invalid

Re: [FFmpeg-devel] [PATCH] lavu/common: Fix AV_CEIL_RSHIFT for unsigned LHS

2024-10-14 Thread Frank Plowman
Ping Here is a demo of the issue: https://godbolt.org/z/hYnYvbcjE On 05/10/2024 23:38, Frank Plowman wrote: > The first branch of this ternary expression was intended to avoid > having two shift operations in the case the RHS is not known at > compile time. It only works if the LHS has a signed

[FFmpeg-devel] [PATCH] lavu/common: Fix AV_CEIL_RSHIFT for unsigned LHS

2024-10-05 Thread Frank Plowman
The first branch of this ternary expression was intended to avoid having two shift operations in the case the RHS is not known at compile time. It only works if the LHS has a signed type however, otherwise the result is invalid. We could alternatively have different versions of AV_CEIL_RSHIFT for