On Sun, Apr 2, 2017 at 11:14 PM, Christina Brien
<christina.br...@polygonindustrial.com> wrote:
>
>> On 2 Apr 2017, at 22:03, Hendrik Leppkes <h.lepp...@gmail.com> wrote:
>>
>> C integer divison truncates, that equals rounding towards zero.
>
> For positive numbers, yes.
> 3 (0b00000000 00000000 00000000 00000011) is right shifted with 
> sign-insertion to 1.
> -3 (0b11111111 111111111 111111111 111111101) is right shifted with 
> sign-insertion to -2.
>

For both positive and negative numbers.

3 / 2 = 1
-3 / 2 = -1

https://ideone.com/WoC5sA

- Hendrik
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to