[MPlayer-dev-eng] [PATCH] Correct rounding for libavcodec/mpeg12.c

Michael Niedermayer michaelni at gmx.at
Tue Feb 10 15:25:15 CET 2004


Hi

On Tuesday 10 February 2004 13:52, Svante Signell wrote:
> For mencoder using libavcodec some .avi files with a frame rate of e.g.
> 23.976 the function find_frame_rate_index() incorrectly rounds the
no, 23.976 is not a legal framerate for mpeg1/2 use -ofps 24000/1001

> calculated frame rate and compares with the standardised rates giving
> output as shown below:
>
> videocodec: libavcodec (480x576 fourcc=3267706d [mpg2])
> [mpeg2video @ 0x856d480]MPEG1/2 doesnt support 239759/10000 fps
> Could not open codec.
>
> The correct value should have been 239760/10000.
>
no

> Enclosed please find a small patch to libavcodec/mpeg12.c which
> correctly rounds the calculations to five significant figures, resulting
> in a frame_rate_index() of zero, instead of negative.
0 is not a legal frame_rate_index at all, and the idea of roundig the 
framerate behind the applications back is very bad, it will lead to AV desync

[...]
-- 
Michael
level[i]= get_vlc(); i+=get_vlc();		(violates patent EP0266049)
median(mv[y-1][x], mv[y][x-1], mv[y+1][x+1]);	(violates patent #5,905,535)
buf[i]= qp - buf[i-1];				(violates patent #?)
for more examples, see http://mplayerhq.hu/~michael/patent.html
stop it, see http://petition.eurolinux.org & http://petition.ffii.org/eubsa/en




More information about the MPlayer-dev-eng mailing list