[FFmpeg-cvslog] electronicarts: set timebase for tgv video.

Anton Khirnov git at videolan.org
Sat Mar 3 00:38:30 CET 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Mar  1 21:24:16 2012 +0100| [efec3bc65a5a1ea92de2ba6229c6bef43887d094] | committer: Anton Khirnov

electronicarts: set timebase for tgv video.

The container has no timestamps and the framerate isn't stored in the
data either.
The decoder sets codec timebase to experimentally found value 1/15. Do
the same for the demuxer too, it should at least be better than the
default 1/90000.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=efec3bc65a5a1ea92de2ba6229c6bef43887d094
---

 libavformat/electronicarts.c      |    2 +-
 tests/ref/fate/ea-tgv-ima-ea-eacs |   96 ++++++++++++++++++------------------
 tests/ref/fate/ea-tgv-ima-ea-sead |   78 +++++++++++++++---------------
 3 files changed, 88 insertions(+), 88 deletions(-)

diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index a7beefd..6a07dac 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -349,7 +349,7 @@ static int process_ea_header(AVFormatContext *s) {
 
             case kVGT_TAG:
                 ea->video_codec = CODEC_ID_TGV;
-                ea->time_base = (AVRational){0,0};
+                ea->time_base = (AVRational){1, 15};
                 break;
 
             case mTCD_TAG :
diff --git a/tests/ref/fate/ea-tgv-ima-ea-eacs b/tests/ref/fate/ea-tgv-ima-ea-eacs
index 6f7964a..1814e3c 100644
--- a/tests/ref/fate/ea-tgv-ima-ea-eacs
+++ b/tests/ref/fate/ea-tgv-ima-ea-eacs
@@ -1,96 +1,96 @@
-#tb 0: 1/90000
+#tb 0: 1/15
 #tb 1: 1/22050
-0,          0,          0,        0,   230400, 0xfbf2581e
+0,          0,          0,        1,   230400, 0xfbf2581e
 1,          0,          0,     1468,     5872, 0x00000000
 1,       1468,       1468,     1468,     5872, 0x00000000
-0,       6000,       6000,        0,   230400, 0xfbf2581e
+0,          1,          1,        1,   230400, 0xfbf2581e
 1,       2936,       2936,     1468,     5872, 0x00000000
-0,      12000,      12000,        0,   230400, 0xfbf2581e
+0,          2,          2,        1,   230400, 0xfbf2581e
 1,       4404,       4404,     1468,     5872, 0x00000000
-0,      18000,      18000,        0,   230400, 0xfbf2581e
+0,          3,          3,        1,   230400, 0xfbf2581e
 1,       5872,       5872,     1468,     5872, 0x00000000
-0,      24000,      24000,        0,   230400, 0xfbf2581e
+0,          4,          4,        1,   230400, 0xfbf2581e
 1,       7340,       7340,     1468,     5872, 0x00000000
-0,      30000,      30000,        0,   230400, 0xfbf2581e
+0,          5,          5,        1,   230400, 0xfbf2581e
 1,       8808,       8808,     1468,     5872, 0x00000000
-0,      36000,      36000,        0,   230400, 0xfbf2581e
+0,          6,          6,        1,   230400, 0xfbf2581e
 1,      10276,      10276,     1468,     5872, 0x00000000
-0,      42000,      42000,        0,   230400, 0xfbf2581e
+0,          7,          7,        1,   230400, 0xfbf2581e
 1,      11744,      11744,     1468,     5872, 0x00000000
-0,      48000,      48000,        0,   230400, 0xfbf2581e
+0,          8,          8,        1,   230400, 0xfbf2581e
 1,      13212,      13212,     1468,     5872, 0x00000000
-0,      54000,      54000,        0,   230400, 0xfbf2581e
+0,          9,          9,        1,   230400, 0xfbf2581e
 1,      14680,      14680,     1468,     5872, 0x00000000
-0,      60000,      60000,        0,   230400, 0xfbf2581e
+0,         10,         10,        1,   230400, 0xfbf2581e
 1,      16148,      16148,     1468,     5872, 0x00000000
-0,      66000,      66000,        0,   230400, 0xfbf2581e
+0,         11,         11,        1,   230400, 0xfbf2581e
 1,      17616,      17616,     1468,     5872, 0x00000000
-0,      72000,      72000,        0,   230400, 0xfbf2581e
+0,         12,         12,        1,   230400, 0xfbf2581e
 1,      19084,      19084,     1468,     5872, 0x00000000
-0,      78000,      78000,        0,   230400, 0xfbf2581e
+0,         13,         13,        1,   230400, 0xfbf2581e
 1,      20552,      20552,     1468,     5872, 0x00000000
-0,      84000,      84000,        0,   230400, 0xfbf2581e
+0,         14,         14,        1,   230400, 0xfbf2581e
 1,      22020,      22020,     1468,     5872, 0xc6f64777
-0,      90000,      90000,        0,   230400, 0xf5a0a21d
+0,         15,         15,        1,   230400, 0xf5a0a21d
 1,      23488,      23488,     1468,     5872, 0x7c9e60e8
-0,      96000,      96000,        0,   230400, 0x909cc039
+0,         16,         16,        1,   230400, 0x909cc039
 1,      24956,      24956,     1468,     5872, 0x46525c54
-0,     102000,     102000,        0,   230400, 0x14d899dd
+0,         17,         17,        1,   230400, 0x14d899dd
 1,      26424,      26424,     1468,     5872, 0x842796bb
-0,     108000,     108000,        0,   230400, 0x0d246edf
+0,         18,         18,        1,   230400, 0x0d246edf
 1,      27892,      27892,     1468,     5872, 0xb1f6cbd5
-0,     114000,     114000,        0,   230400, 0x5345fe0d
+0,         19,         19,        1,   230400, 0x5345fe0d
 1,      29360,      29360,     1468,     5872, 0x0261a74b
-0,     120000,     120000,        0,   230400, 0x5abdff9a
+0,         20,         20,        1,   230400, 0x5abdff9a
 1,      30828,      30828,     1468,     5872, 0x8218b1f9
-0,     126000,     126000,        0,   230400, 0x1730d973
+0,         21,         21,        1,   230400, 0x1730d973
 1,      32296,      32296,     1468,     5872, 0xd7a2cae6
-0,     132000,     132000,        0,   230400, 0xec881be9
+0,         22,         22,        1,   230400, 0xec881be9
 1,      33764,      33764,     1468,     5872, 0x69d34562
-0,     138000,     138000,        0,   230400, 0xf4216895
+0,         23,         23,        1,   230400, 0xf4216895
 1,      35232,      35232,     1468,     5872, 0x9303ec65
-0,     144000,     144000,        0,   230400, 0x529d7a52
+0,         24,         24,        1,   230400, 0x529d7a52
 1,      36700,      36700,     1468,     5872, 0xd5d963a1
-0,     150000,     150000,        0,   230400, 0x93b4c7b9
+0,         25,         25,        1,   230400, 0x93b4c7b9
 1,      38168,      38168,     1468,     5872, 0x0557e06f
-0,     156000,     156000,        0,   230400, 0xedc65bcd
+0,         26,         26,        1,   230400, 0xedc65bcd
 1,      39636,      39636,     1468,     5872, 0x1eb48b41
-0,     162000,     162000,        0,   230400, 0xf0fb54ae
+0,         27,         27,        1,   230400, 0xf0fb54ae
 1,      41104,      41104,     1468,     5872, 0x70f5ca3f
-0,     168000,     168000,        0,   230400, 0x27864ce9
+0,         28,         28,        1,   230400, 0x27864ce9
 1,      42572,      42572,     1468,     5872, 0xd39e5c5e
-0,     174000,     174000,        0,   230400, 0xcd05012d
+0,         29,         29,        1,   230400, 0xcd05012d
 1,      44040,      44040,     1468,     5872, 0x29c59140
-0,     180000,     180000,        0,   230400, 0x019b6d84
+0,         30,         30,        1,   230400, 0x019b6d84
 1,      45508,      45508,     1468,     5872, 0x7d95e643
-0,     186000,     186000,        0,   230400, 0xcc05d416
+0,         31,         31,        1,   230400, 0xcc05d416
 1,      46976,      46976,     1468,     5872, 0x45353fd8
-0,     192000,     192000,        0,   230400, 0xb04c0248
+0,         32,         32,        1,   230400, 0xb04c0248
 1,      48444,      48444,     1468,     5872, 0xad7b1b27
-0,     198000,     198000,        0,   230400, 0x6806eb92
+0,         33,         33,        1,   230400, 0x6806eb92
 1,      49912,      49912,     1468,     5872, 0x1f0377b3
-0,     204000,     204000,        0,   230400, 0x60e9c001
+0,         34,         34,        1,   230400, 0x60e9c001
 1,      51380,      51380,     1468,     5872, 0x6074541e
-0,     210000,     210000,        0,   230400, 0x9b040261
+0,         35,         35,        1,   230400, 0x9b040261
 1,      52848,      52848,     1468,     5872, 0xa4f5e892
-0,     216000,     216000,        0,   230400, 0x6961fb90
+0,         36,         36,        1,   230400, 0x6961fb90
 1,      54316,      54316,     1468,     5872, 0x084bc696
-0,     222000,     222000,        0,   230400, 0xbf67ad24
+0,         37,         37,        1,   230400, 0xbf67ad24
 1,      55784,      55784,     1468,     5872, 0x67fdafce
-0,     228000,     228000,        0,   230400, 0x2270f328
+0,         38,         38,        1,   230400, 0x2270f328
 1,      57252,      57252,     1468,     5872, 0x8dfd249d
-0,     234000,     234000,        0,   230400, 0xd0c345f6
+0,         39,         39,        1,   230400, 0xd0c345f6
 1,      58720,      58720,     1468,     5872, 0x514184ee
-0,     240000,     240000,        0,   230400, 0xfd159212
+0,         40,         40,        1,   230400, 0xfd159212
 1,      60188,      60188,     1468,     5872, 0xc0090b0d
-0,     246000,     246000,        0,   230400, 0x085578ff
+0,         41,         41,        1,   230400, 0x085578ff
 1,      61656,      61656,     1468,     5872, 0xc1171cc8
-0,     252000,     252000,        0,   230400, 0xcca8afa6
+0,         42,         42,        1,   230400, 0xcca8afa6
 1,      63124,      63124,     1468,     5872, 0x7d7dd07e
-0,     258000,     258000,        0,   230400, 0x901ec91c
+0,         43,         43,        1,   230400, 0x901ec91c
 1,      64592,      64592,     1468,     5872, 0xe6aa619c
-0,     264000,     264000,        0,   230400, 0xf1cb99f3
+0,         44,         44,        1,   230400, 0xf1cb99f3
 1,      66060,      66060,     1468,     5872, 0xd5aac0df
-0,     270000,     270000,        0,   230400, 0x86d98f0c
+0,         45,         45,        1,   230400, 0x86d98f0c
 1,      67528,      67528,     1468,     5872, 0x3b68b390
-0,     276000,     276000,        0,   230400, 0x52970700
+0,         46,         46,        1,   230400, 0x52970700
diff --git a/tests/ref/fate/ea-tgv-ima-ea-sead b/tests/ref/fate/ea-tgv-ima-ea-sead
index c04faa9..bfc9cb5 100644
--- a/tests/ref/fate/ea-tgv-ima-ea-sead
+++ b/tests/ref/fate/ea-tgv-ima-ea-sead
@@ -1,81 +1,81 @@
-#tb 0: 1/90000
+#tb 0: 1/15
 #tb 1: 1/22050
-0,          0,          0,        0,   192000, 0xdfc2f225
+0,          0,          0,        1,   192000, 0xdfc2f225
 1,          0,          0,      736,     2944, 0x00000000
 1,        736,        736,     1472,     5888, 0x5ae3c2a4
-0,       6000,       6000,        0,   192000, 0x059b57bd
+0,          1,          1,        1,   192000, 0x059b57bd
 1,       2208,       2208,     1472,     5888, 0x158fbcb4
-0,      12000,      12000,        0,   192000, 0x766cb086
+0,          2,          2,        1,   192000, 0x766cb086
 1,       3680,       3680,     1472,     5888, 0x3fc85d35
-0,      18000,      18000,        0,   192000, 0x459e3bac
+0,          3,          3,        1,   192000, 0x459e3bac
 1,       5152,       5152,     1472,     5888, 0x4667ec2b
-0,      24000,      24000,        0,   192000, 0x5293e622
+0,          4,          4,        1,   192000, 0x5293e622
 1,       6624,       6624,     1472,     5888, 0x82744494
-0,      30000,      30000,        0,   192000, 0x898b03f4
+0,          5,          5,        1,   192000, 0x898b03f4
 1,       8096,       8096,     1472,     5888, 0x3b0cb86f
-0,      36000,      36000,        0,   192000, 0xb184a627
+0,          6,          6,        1,   192000, 0xb184a627
 1,       9568,       9568,     1472,     5888, 0x29493fbb
-0,      42000,      42000,        0,   192000, 0xa3fc650a
+0,          7,          7,        1,   192000, 0xa3fc650a
 1,      11040,      11040,     1472,     5888, 0xaa2d8595
-0,      48000,      48000,        0,   192000, 0xea448589
+0,          8,          8,        1,   192000, 0xea448589
 1,      12512,      12512,     1472,     5888, 0x2e563de6
-0,      54000,      54000,        0,   192000, 0x700e2b76
+0,          9,          9,        1,   192000, 0x700e2b76
 1,      13984,      13984,     1472,     5888, 0x225cca99
-0,      60000,      60000,        0,   192000, 0xa1a1d66d
+0,         10,         10,        1,   192000, 0xa1a1d66d
 1,      15456,      15456,     1472,     5888, 0x2b577599
-0,      66000,      66000,        0,   192000, 0xd63bc8a1
+0,         11,         11,        1,   192000, 0xd63bc8a1
 1,      16928,      16928,     1472,     5888, 0x3d967f32
-0,      72000,      72000,        0,   192000, 0x5f08c023
+0,         12,         12,        1,   192000, 0x5f08c023
 1,      18400,      18400,     1472,     5888, 0x16639a84
-0,      78000,      78000,        0,   192000, 0x8b75ec3b
+0,         13,         13,        1,   192000, 0x8b75ec3b
 1,      19872,      19872,     1472,     5888, 0x90549ba0
-0,      84000,      84000,        0,   192000, 0x62728ce4
+0,         14,         14,        1,   192000, 0x62728ce4
 1,      21344,      21344,     1472,     5888, 0xf46e6644
-0,      90000,      90000,        0,   192000, 0xaa007941
+0,         15,         15,        1,   192000, 0xaa007941
 1,      22816,      22816,     1472,     5888, 0x39a073ec
-0,      96000,      96000,        0,   192000, 0x55dc5b3b
+0,         16,         16,        1,   192000, 0x55dc5b3b
 1,      24288,      24288,     1472,     5888, 0xb1d7a93a
-0,     102000,     102000,        0,   192000, 0x72d836c2
+0,         17,         17,        1,   192000, 0x72d836c2
 1,      25760,      25760,     1472,     5888, 0x25e9795b
-0,     108000,     108000,        0,   192000, 0x1f2de2fc
+0,         18,         18,        1,   192000, 0x1f2de2fc
 1,      27232,      27232,     1472,     5888, 0xbbc07644
-0,     114000,     114000,        0,   192000, 0xb295dfdb
+0,         19,         19,        1,   192000, 0xb295dfdb
 1,      28704,      28704,     1472,     5888, 0x323f6a1b
-0,     120000,     120000,        0,   192000, 0xe5c5f634
+0,         20,         20,        1,   192000, 0xe5c5f634
 1,      30176,      30176,     1472,     5888, 0x7cae130b
-0,     126000,     126000,        0,   192000, 0x455a0464
+0,         21,         21,        1,   192000, 0x455a0464
 1,      31648,      31648,     1472,     5888, 0xd23bf9c6
-0,     132000,     132000,        0,   192000, 0x3bf2340d
+0,         22,         22,        1,   192000, 0x3bf2340d
 1,      33120,      33120,     1472,     5888, 0x5f73ef35
-0,     138000,     138000,        0,   192000, 0xe368f0fc
+0,         23,         23,        1,   192000, 0xe368f0fc
 1,      34592,      34592,     1472,     5888, 0xc66026be
-0,     144000,     144000,        0,   192000, 0xfa7549c0
+0,         24,         24,        1,   192000, 0xfa7549c0
 1,      36064,      36064,     1472,     5888, 0xc8fdb539
-0,     150000,     150000,        0,   192000, 0x4dd76f3d
+0,         25,         25,        1,   192000, 0x4dd76f3d
 1,      37536,      37536,     1472,     5888, 0x94c6bfbd
-0,     156000,     156000,        0,   192000, 0x50a49f6c
+0,         26,         26,        1,   192000, 0x50a49f6c
 1,      39008,      39008,     1472,     5888, 0xb77e1b83
-0,     162000,     162000,        0,   192000, 0xb6072f65
+0,         27,         27,        1,   192000, 0xb6072f65
 1,      40480,      40480,     1472,     5888, 0x6c6d6693
-0,     168000,     168000,        0,   192000, 0x093ce1a8
+0,         28,         28,        1,   192000, 0x093ce1a8
 1,      41952,      41952,     1472,     5888, 0xd9f064d4
-0,     174000,     174000,        0,   192000, 0x55afe3db
+0,         29,         29,        1,   192000, 0x55afe3db
 1,      43424,      43424,     1472,     5888, 0x85dd990d
-0,     180000,     180000,        0,   192000, 0x81c3bfab
+0,         30,         30,        1,   192000, 0x81c3bfab
 1,      44896,      44896,     1472,     5888, 0x385e021b
-0,     186000,     186000,        0,   192000, 0x583ebd3d
+0,         31,         31,        1,   192000, 0x583ebd3d
 1,      46368,      46368,     1472,     5888, 0xac09fd02
-0,     192000,     192000,        0,   192000, 0x2504f003
+0,         32,         32,        1,   192000, 0x2504f003
 1,      47840,      47840,     1472,     5888, 0xc6dcdff2
-0,     198000,     198000,        0,   192000, 0x44ade2af
+0,         33,         33,        1,   192000, 0x44ade2af
 1,      49312,      49312,     1472,     5888, 0x86a6944d
-0,     204000,     204000,        0,   192000, 0x77cbcfd8
+0,         34,         34,        1,   192000, 0x77cbcfd8
 1,      50784,      50784,     1472,     5888, 0x8587b964
-0,     210000,     210000,        0,   192000, 0xac7ddfa1
+0,         35,         35,        1,   192000, 0xac7ddfa1
 1,      52256,      52256,     1472,     5888, 0x2b0355ff
-0,     216000,     216000,        0,   192000, 0x79f7cfe8
+0,         36,         36,        1,   192000, 0x79f7cfe8
 1,      53728,      53728,     1472,     5888, 0xe4148a85
-0,     222000,     222000,        0,   192000, 0xdf2898fd
+0,         37,         37,        1,   192000, 0xdf2898fd
 1,      55200,      55200,     1472,     5888, 0xdf02ed4f
 1,      56672,      56672,     1472,     5888, 0x87a54b15
 1,      58144,      58144,     1472,     5888, 0x3ad2be45



More information about the ffmpeg-cvslog mailing list