Use gdouble when calculating pixel-aspect-ratio

Original commit message from CVS:
Use gdouble when calculating pixel-aspect-ratio
This commit is contained in:
Jan Schmidt 2004-08-03 14:09:26 +00:00
parent 1fb441851e
commit 07ea0aef1c
3 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2004-08-04 Jan Schmidt <thaytan@mad.scientist.com>
* sys/ximage/ximagesink.c:
(gst_ximagesink_calculate_pixel_aspect_ratio):
* sys/xvimage/xvimagesink.c:
(gst_xvimagesink_calculate_pixel_aspect_ratio):
Make sure we calculate pixel-aspect-ratio using floating point maths
2004-08-03 Thomas Vander Stichele <thomas at apestaart dot org>
* po/uk.po:

View file

@ -689,7 +689,7 @@ gst_ximagesink_calculate_pixel_aspect_ratio (GstXContext * xcontext)
/* first calculate the "real" ratio based on the X values;
* which is the "physical" w/h divided by the w/h in pixels of the display */
ratio = xcontext->widthmm * xcontext->height
ratio = (gdouble) (xcontext->widthmm * xcontext->height)
/ (xcontext->heightmm * xcontext->width);
/* DirectFB's X in 720x576 reports the physical dimensions wrong, so

View file

@ -838,8 +838,9 @@ gst_xvimagesink_calculate_pixel_aspect_ratio (GstXContext * xcontext)
/* first calculate the "real" ratio based on the X values;
* which is the "physical" w/h divided by the w/h in pixels of the display */
ratio = xcontext->widthmm * xcontext->height
ratio = (gdouble) (xcontext->widthmm * xcontext->height)
/ (xcontext->heightmm * xcontext->width);
/* DirectFB's X in 720x576 reports the physical dimensions wrong, so
* override here */
if (xcontext->width == 720 && xcontext->height == 576) {