[MPlayer-dev-eng] enhancement for yuv4mpeg output driver
xyzzy at speakeasy.org
Thu Jan 20 03:20:01 CET 2005
On Wed, 19 Jan 2005, D Richard Felker III wrote:
> > + fprintf(yuv_out, "YUV4MPEG2 W%d H%d ", image_width, image_height);
> > + if(image_fps>23.975973976 && image_fps<23.976073976)
> > + fprintf(yuv_out, "F24000:1001 ");
> > + else if(image_fps>29.96997997 && image_fps<29.97007997)
> > + fprintf(yuv_out, "F30000:1001 ");
> There are already good fraction reducing routines in mplayer (or
> lavc?) that let you specify maximum magnitude for the denominator.
> They'll make mplayer's stupid float crap into correct values like
I found av_reduce() in lavc, but it doesn't work for this. Depending on what
I specify for the max, it turns 23.976 into 2996973/125000, 983/41,
456427/19037, or 16831/702. There doesn't seem to be any way to get the
correct value of 24000/1001.
Is it acceptable for the vo_yuv4mpeg module to call a routine from libavcodec?
Is there a problem with the new dependency? If it's ok, I'll make a new patch
that uses it to reduce fraction, but it's still necessary to make a special
case to detect NTSC x/1001 framerates.
More information about the MPlayer-dev-eng