[FFmpeg-devel] H.261 chroma motion vector rounding.

Christina Brien christina.brien at polygonindustrial.com
Mon Apr 3 00:14:17 EEST 2017


> On 2 Apr 2017, at 22:03, Hendrik Leppkes <h.leppkes at 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.

Christina


More information about the ffmpeg-devel mailing list