OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d03be26
)
Add ticker_abs function that returns the number of ticks to get the
author
Philip Gladstone
<philipjsg@users.sourceforge.net>
Mon, 17 Jun 2002 03:08:29 +0000
(
03:08
+0000)
committer
Philip Gladstone
<philipjsg@users.sourceforge.net>
Mon, 17 Jun 2002 03:08:29 +0000
(
03:08
+0000)
supplied frame (or sample) number. This is not the same as ticker_tick
Originally committed as revision 692 to svn://svn.ffmpeg.org/ffmpeg/trunk
libav/tick.h
patch
|
blob
|
history
diff --git
a/libav/tick.h
b/libav/tick.h
index
8a8e42b
..
e2d747e
100644
(file)
--- a/
libav/tick.h
+++ b/
libav/tick.h
@@
-39,3
+39,19
@@
static inline int ticker_tick(Ticker *tick, int num)
#endif
return n;
}
+
+static inline INT64 ticker_abs(Ticker *tick, int num)
+{
+ INT64 n = (INT64) num * tick->div;
+ INT64 value = (INT64) num * tick->mod;
+
+ if (value > 0) {
+ n += (value / tick->inrate);
+ value = value % tick->inrate;
+ if (value > 0) {
+ /* value -= tick->inrate; */
+ n++;
+ }
+ }
+ return n;
+}