View Issue Details

IDProjectCategoryView StatusLast Update
0000120JVT JM H.264/AVC reference softwaredecoderpublic2008-09-02 16:01
ReporterWeiwei Chen Assigned ToKarsten Suehring  
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Product VersionJM 13.0 
Fixed in VersionJM 14.2 
Summary0000120: tmp_time sometimes shows negative value which makes confusion
DescriptionIn image.c, tmp_time is calculated for decoding each frame. The value of tmp_time sometimes shows negative. Since two functions are used for getting the seconds and milliseconds of the decoding time, and there should be context switches between these two functions, the seconds and milliseconds may not be gotten at the same time. Thus some wired values show up.
Additional InformationIn the source code, ftime() and time() are used for getting the second and millisecond of the system separately. Actually, ftime() is obsolete in Linux system now. Why not we use gettimeofday() to get both the second and millisecond of the system time?
TagsNo tags attached.

Activities

Karsten Suehring

2008-09-01 16:22

administrator   ~0000225

The usage of time() and ftime() looks indeed inconsistent. I would actually prefer switching to ftime() only because it's the only function that is supported on both Windows and UNIX. Using gettimeofday() would require more platform dependent code. I haven't found sources why ftime() has been made obsolete on Linux. I don't think that's been a good decision.

Karsten Suehring

2008-09-02 16:01

administrator   ~0000227

I have updated the code to use gettimeofday() in non-Windows environments and QueryPerformanceCounter() in Windows. Hope this does not break any platforms.

Issue History

Date Modified Username Field Change
2008-08-06 20:44 Weiwei Chen New Issue
2008-09-01 16:22 Karsten Suehring Note Added: 0000225
2008-09-01 16:22 Karsten Suehring Status new => feedback
2008-09-02 16:01 Karsten Suehring Note Added: 0000227
2008-09-02 16:01 Karsten Suehring Status feedback => resolved
2008-09-02 16:01 Karsten Suehring Fixed in Version => JM 14.1-dev
2008-09-02 16:01 Karsten Suehring Resolution open => fixed
2008-09-02 16:01 Karsten Suehring Assigned To => Karsten Suehring