[MPlayer-cvslog] r38136 - in trunk/libmpdemux: demux_mkv.c ebml.c ebml.h

reimar subversion at mplayerhq.hu
Mon May 20 19:45:15 EEST 2019


Author: reimar
Date: Mon May 20 19:45:14 2019
New Revision: 38136

Log:
Remove use of "long double".

The values are only "double", and "long double"
on x86 forces the use of x87 instructions which
are less efficient.
Also "long double" is not available on other
architectures.

Modified:
   trunk/libmpdemux/demux_mkv.c
   trunk/libmpdemux/ebml.c
   trunk/libmpdemux/ebml.h

Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c	Fri Apr 19 16:03:05 2019	(r38135)
+++ trunk/libmpdemux/demux_mkv.c	Mon May 20 19:45:14 2019	(r38136)
@@ -402,7 +402,7 @@ static int demux_mkv_read_info(demuxer_t
     uint64_t length, l;
     int il;
     uint64_t tc_scale = 1000000;
-    long double duration = 0.;
+    double duration = 0.;
 
     length = ebml_read_length(s, NULL);
     while (length > 0) {
@@ -420,11 +420,11 @@ static int demux_mkv_read_info(demuxer_t
 
         case MATROSKA_ID_DURATION:
         {
-            long double num = ebml_read_float(s, &l);
+            double num = ebml_read_float(s, &l);
             if (num == EBML_FLOAT_INVALID)
                 return 1;
             duration = num;
-            mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] | + duration: %.3Lfs\n",
+            mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] | + duration: %.3fs\n",
                    duration * tc_scale / 1000000000.0);
             break;
         }
@@ -615,7 +615,7 @@ static int demux_mkv_read_trackaudio(dem
         switch (ebml_read_id(s, &il)) {
         case MATROSKA_ID_AUDIOSAMPLINGFREQ:
         {
-            long double num = ebml_read_float(s, &l);
+            double num = ebml_read_float(s, &l);
             if (num == EBML_FLOAT_INVALID)
                 return 0;
             track->a_sfreq = num;
@@ -667,7 +667,7 @@ static int demux_mkv_read_trackvideo(dem
         switch (ebml_read_id(s, &il)) {
         case MATROSKA_ID_VIDEOFRAMERATE:
         {
-            long double num = ebml_read_float(s, &l);
+            double num = ebml_read_float(s, &l);
             if (num == EBML_FLOAT_INVALID)
                 return 0;
             track->v_frate = num;

Modified: trunk/libmpdemux/ebml.c
==============================================================================
--- trunk/libmpdemux/ebml.c	Fri Apr 19 16:03:05 2019	(r38135)
+++ trunk/libmpdemux/ebml.c	Mon May 20 19:45:14 2019	(r38136)
@@ -176,9 +176,9 @@ int64_t ebml_read_int(stream_t *s, uint6
 /*
  * Read the next element as a float.
  */
-long double ebml_read_float(stream_t *s, uint64_t *length)
+double ebml_read_float(stream_t *s, uint64_t *length)
 {
-    long double value;
+    double value;
     uint64_t len;
     int l;
 

Modified: trunk/libmpdemux/ebml.h
==============================================================================
--- trunk/libmpdemux/ebml.h	Fri Apr 19 16:03:05 2019	(r38135)
+++ trunk/libmpdemux/ebml.h	Mon May 20 19:45:14 2019	(r38136)
@@ -200,7 +200,7 @@ int64_t ebml_read_vlen_int (uint8_t *buf
 uint64_t ebml_read_length (stream_t *s, int *length);
 uint64_t ebml_read_uint (stream_t *s, uint64_t *length);
 int64_t ebml_read_int (stream_t *s, uint64_t *length);
-long double ebml_read_float (stream_t *s, uint64_t *length);
+double ebml_read_float (stream_t *s, uint64_t *length);
 char *ebml_read_ascii (stream_t *s, uint64_t *length);
 char *ebml_read_utf8 (stream_t *s, uint64_t *length);
 int ebml_read_skip (stream_t *s, uint64_t *length);


More information about the MPlayer-cvslog mailing list