[SCM] libav/experimental: fixing inaccurate frame_rate

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:35:29 UTC 2013


The following commit has been merged in the experimental branch:
commit a5dbb247af9f02cff4899f16d3a87f49fe16727a
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sat Mar 1 00:16:00 2003 +0000

    fixing inaccurate frame_rate
    
    Originally committed as revision 1616 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 2d3cec0..3e89dae 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -169,7 +169,7 @@ static const int Motion_Est_QTab[] = { ME_ZERO, ME_PHODS, ME_LOG,
 #define CODEC_CAP_PARSE_ONLY      0x0004
 #define CODEC_CAP_TRUNCATED       0x0008
 
-#define FRAME_RATE_BASE 10000
+#define FRAME_RATE_BASE 10010
 
 #define FF_COMMON_FRAME \
     uint8_t *data[4];\
diff --git a/libavcodec/mpeg12data.h b/libavcodec/mpeg12data.h
index ad5ae2c..4a90bbd 100644
--- a/libavcodec/mpeg12data.h
+++ b/libavcodec/mpeg12data.h
@@ -386,14 +386,14 @@ static const uint8_t mbMotionVectorTable[17][2] = {
 
 static const int frame_rate_tab[9] = {
     0, 
-    (int)(23.976 * FRAME_RATE_BASE), 
-    (int)(24 * FRAME_RATE_BASE), 
-    (int)(25 * FRAME_RATE_BASE), 
-    (int)(29.97 * FRAME_RATE_BASE), 
-    (int)(30 * FRAME_RATE_BASE), 
-    (int)(50 * FRAME_RATE_BASE), 
-    (int)(59.94 * FRAME_RATE_BASE), 
-    (int)(60 * FRAME_RATE_BASE), 
+    24000 * FRAME_RATE_BASE / 1001,
+    24000 * FRAME_RATE_BASE / 1000,
+    25000 * FRAME_RATE_BASE / 1000,
+    30000 * FRAME_RATE_BASE / 1001,
+    30000 * FRAME_RATE_BASE / 1000,
+    50000 * FRAME_RATE_BASE / 1000,
+    60000 * FRAME_RATE_BASE / 1001,
+    60000 * FRAME_RATE_BASE / 1000,
 };
 
 static const uint8_t non_linear_qscale[32] = {

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list