[Mplayer-cvslog] CVS: 0_90/libmpdemux video.c,1.36,1.37

Arpi of Ize arpi at mplayerhq.hu
Mon Mar 17 01:55:00 CET 2003


Update of /cvsroot/mplayer/0_90/libmpdemux
In directory mail:/var/tmp.root/cvs-serv24524

Modified Files:
	video.c 
Log Message:
backport: fixed mpeg bitrate calculation


Index: video.c
===================================================================
RCS file: /cvsroot/mplayer/0_90/libmpdemux/video.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- video.c	10 Mar 2003 16:08:20 -0000	1.36
+++ video.c	17 Mar 2003 00:54:58 -0000	1.37
@@ -224,7 +224,7 @@
    sh_video->disp_h=picture.display_picture_height;
    // bitrate:
    if(picture.bitrate!=0x3FFFF) // unspecified/VBR ?
-       sh_video->i_bps=1000*picture.bitrate/16;
+       sh_video->i_bps=picture.bitrate * 400 / 8;
    // info:
    mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"mpeg bitrate: %d (%X)\n",picture.bitrate,picture.bitrate);
    mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VIDEO:  %s  %dx%d  (aspect %d)  %4.2f fps  %5.1f kbps (%4.1f kbyte/s)\n",
@@ -232,8 +232,8 @@
     sh_video->disp_w,sh_video->disp_h,
     picture.aspect_ratio_information,
     sh_video->fps,
-    picture.bitrate*0.5f,
-    picture.bitrate/16.0f );
+    sh_video->i_bps * 8 / 1000.0,
+    sh_video->i_bps / 1000.0 );
   break;
  }
 } // switch(file_format)



More information about the MPlayer-cvslog mailing list