[gst-devel] Re: [gst-cvs] leroutier gst-plugins: gst-plugins/ gst-plugins/ext/dv/ gst-plugins/ext/libfame/ gst-plugins/gst/subparse/ gst-plugins/gst/y4m/
David I. Lehn
dlehn at vt.edu
Fri Jan 14 07:30:16 CET 2005
* Stephane Loeuillet <leroutier at freedesktop.org> [2005-01-14T07:33:09-0500]:
> * gst/y4m/gsty4mencode.c: (gst_y4mencode_sinkconnect):
> replace framerate aproximations by their real value
> (24000/1001, 30000/1001, 60000/1001)
> Finish fixing bug #164049
...
> #define NTSC_HEIGHT 480
> #define NTSC_BUFFER 120000
> -#define NTSC_FRAMERATE 29.997
> +#define NTSC_FRAMERATE 30000/1001
> #define PAL_HEIGHT 576
> #define PAL_BUFFER 144000
...
> - const double frames_per_sec = 23.98;
> + const double frames_per_sec = 24000 / 1001;
...
> - 23.976, 24.000, /* 24fps movie */
> + 24000 / 1001, 24.000, /* 24fps movie */
> 25.000, /* PAL */
> - 29.970, 30.000, /* NTSC */
> + 30000 / 1001, 30.000, /* NTSC */
> 50.000,
> - 59.940, 60.000
> + 60000 / 1001, 60.000
...
(more?)
...
Today's lesson: C compilers, integer constant division, and testing.
#include <stdio.h>
int main() {
const double old = 23.98;
const double new = 24000 / 1001;
printf("%g %g\n", old, new);
return 0;
}
$ cc -g -Wall a.c; ./a.out
23.98 23
-dave
More information about the gstreamer-devel
mailing list