View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000120 | JVT JM H.264/AVC reference software | decoder | public | 2008-08-06 20:44 | 2008-09-02 16:01 |
Reporter | Weiwei Chen | Assigned To | Karsten Suehring | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | JM 13.0 | ||||
Fixed in Version | JM 14.2 | ||||
Summary | 0000120: tmp_time sometimes shows negative value which makes confusion | ||||
Description | In 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 Information | In 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? | ||||
Tags | No tags attached. | ||||
|
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. |
|
I have updated the code to use gettimeofday() in non-Windows environments and QueryPerformanceCounter() in Windows. Hope this does not break any platforms. |
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 |