> For both positive and negative numbers.
>
> 3 / 2 = 1
> -3 / 2 = -1
You’re right. I was confusing integer division by a power of two, with
right-shifting. The bug was in my code all along.
I apologise for wasting your time.
Christina
___
ffmpeg-de
> On 2 Apr 2017, at 22:03, Hendrik Leppkes wrote:
>
> C integer divison truncates, that equals rounding towards zero.
For positive numbers, yes.
3 (0b 0011) is right shifted with sign-insertion
to 1.
-3 (0b 1 1 11101) is right shifted w
> wouldn't
> ROUNDED_DIV() macro be more appropriate?
ROUNDED_DIV rounds to nearest. The specification states to round towards zero.
> the Changelog is not supposed to include these kind of changes.
I assumed Changelog was for incompatible changes, of which this would be. I
have removed the cha
Hi
Having written a clean-room implementation of H.261 and comparing it to the
output of FFMPEG, I have found that FFMPEG is not spec-compliant with regard to
negative chroma motion vectors. The spec states that chroma motion vectors are
the luma motion vectors divided by two, and rounded *towa
Hi
Having written a clean-room implementation of H.261 and comparing it to the
output of FFMPEG, I have found that FFMPEG is not spec-compliant with regard to
negative chroma motion vectors. The spec states that chroma motion vectors are
the luma motion vectors divided by two, and rounded *towa