1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783
|
#LyX 1.1 created this file. For more info see http://www.lyx.org/
\lyxformat 218
\textclass IEEEtran
\begin_preamble
\pagestyle{empty}
\end_preamble
\language english
\inputencoding latin1
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize letterpaper
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 2
\papersides 1
\paperpagestyle default
\layout Standard
\pextra_type 3 \pextra_widthp 100
\series bold
\size largest
DIGITAL TIME CODE SYSTEM
\layout Standard
\align center
Matthew R.
Flax
\newline
School of Electrical Engineering & Telecommunications, University of NSW
\newline
flatmax@ieee.org
\newline
Jesse S.
Jin
\newline
School of Computer Science & Engineering, University of NSW
\newline
Department of Computer Science, University of Sydney
\newline
jesse@cs.usyd.edu.au
\layout Standard
\SpecialChar ~
\layout Standard
\SpecialChar ~
\layout Standard
\SpecialChar ~
\layout Standard
\line_top
proceedings - cybersonica 2002, pages 61-64
\layout Standard
http://www.cybersonica.org/
\layout Title
\pagebreak_top
DIGITAL TIME CODE SYSTEM
\layout Author
Matthew R.
Flax
\newline
School of Electrical Engineering & Telecommunications, University of NSW
\newline
flatmax@ieee.org
\newline
Jesse S.
Jin
\newline
School of Computer Science & Engineering, University of NSW
\newline
Department of Computer Science, University of Sydney
\newline
jesse@cs.usyd.edu.au
\layout Abstract
A time code system is described which allows linear and non-linear alteration
for multimedia systems and streams.
The time code system is adaptable to any time code protocol.
The time code system is computationally inexpensive.
\layout LaTeX
\backslash
thispagestyle{empty}
\layout Section
Introduction
\layout Standard
Time code is temporal control of multimedia systems and streams.
Examples of systems which are controlled by time code are ATA packet interface
(ATAPI) devices
\begin_inset LatexCommand \cite{key-2}
\end_inset
such as CDROM drives, music instrument digital interface (MIDI) devices
\begin_inset LatexCommand \cite{key-4}
\end_inset
such as hardware MIDI sequencers and much video SMPTE
\begin_inset LatexCommand \cite{key-5}
\end_inset
based hardware.
Streams and systems alike are controlled by many specific time code protocols
such as SMPTE, midi time code (MTC), ATAPI MSF address and so on.
\layout Standard
The specific aim of this article is to outline a time code abstract data
type which is suitable for human computer interaction and bears low computation
al complexity.
By the same token such a time code must be associated with a window of
media samples or frames.
The time code interfaces a window of media to a large stream of media windows,
which may overlap.
The data type which is abstracted is typically a natural number, termed
an unsigned integer.
\layout Standard
The abstract data type is applicable to ANY time code protocol.
It is not a protocol.
It is an abstraction of a natural number to a user specified protocol.
Each time code reference is allocated a media data buffer.
Time and data are closely coupled.
These two attributes are unique to this time code abstract data type.
\layout Subsection
HCI
\layout Standard
Alteration of time code allows the user to position oneself non-linearly
in a multimedia device or stream.
The only element which limits the user to accurate and direct location
in a stream should be channel bandwidth, where the user may specify a location
in time, however bandwidth congestion in the media transport limit the
direct location.
Linear and non-linear interface to time code should be possible.
Linear interface typically compromises accuracy in location for ease of
location.
Non-linear interface allows accuracy however compromises ease of location.
\layout Standard
An example of a linear time code locator is the location slider.
Using this type of device it is easy to locate oneself non-linearly in
a stream, however location is limited to the slider accuracy, which is
typically quantised.
As an example of quantisation, assume a horizontal slider is used to locate
an audio stream which is of compact disk (CD) quality and is of one hour
in length.
Also assume the slider spans one thousand pixels and hence has one thousand
possible locations.
CD quality audio has 44100 frames per second.
An hours worth of audio contains around
\begin_inset Formula \( 159x10^{6} \)
\end_inset
frames.
Each slider location quanta is
\begin_inset Formula \( 159x10^{3} \)
\end_inset
frames of audio, that is 3.6 seconds of audio.
In this example media location accuracy is compromised by quantisation
to within 3.6 seconds of the desired location.
\layout Standard
An example of non-linear time code location is digit based alteration.
An example of such a location alteration method is the setting method used
by digital watches based on digit interface.
To locate oneself in time one has to step through time digit by digit.
It takes more effort to locate oneself in time, however accuracy is not
compromised.
\layout Subsection
Computational Complexity
\layout Standard
Integer manipulation is the cheapest data type for computer processors to
manipulate.
In order to retain cheap computational complexity, all operations on time
code are implemented in integer operations of addition, subtraction, multiplica
tion, division and modulus.
By the same token it is desired that digit based abstraction of the integer
operates with the same minimal computational complexity.
For this reason it is possible to implement such an abstraction system
using object inheritance.
\layout Section
Time code abstraction
\layout Standard
Label the base integer a
\shape italic
counter
\shape default
, this is its job, to count.
It is the base most object.
\layout Standard
Assume that time code is broken into many
\shape italic
field
\shape default
s.
As an example world time is broken into many many fields, to name a few
from largest time to least {millennium, centuries, decades, years, months,
weeks, days, hours, minutes, seconds, milliseconds}.
Each field must retain its count and inherits the counter object to accomplish
this.
\layout Standard
A master is required to manage the co-ordination of each of the fields of
the time code with respect to the underlying base counter.
At each point in time the individual fields must accurately represent (count
up to) the same total which is counted by the
\shape italic
master counter
\shape default
element.
The master counter element maintains the master count by inheriting the
base counter object.
\layout Standard
A window or array of frames is also based on a master counter.
The user might want to alter the window size in a linear or non-linear
way.
So each media window or array of frames must be controlled by a master
counter, labelled a
\shape italic
master counter array
\shape default
.
A master counter is inherited for array or window size manipulation.
\layout Standard
Finally
\shape italic
time code
\shape default
is encapsulated by a beginning and a finish.
These are the absolute limits of the media stream beyond which no media
is defined or exists.
Within the physical limits one may set a start and end location between
which a window steps.
A current time code location continuously steps with the window.
Such a structure seems complex, however entails the requirements of a manageabl
e and flexibly alterable time code system.
This system is depicted in Figure
\begin_inset LatexCommand \ref{timecodestructure}
\end_inset
.
\layout Standard
\begin_float fig
\layout Standard
\align center
\begin_inset Figure size 246 70
file figs/timeCodePic.eps
flags 9
\end_inset
\layout Caption
Time code structure.
Physical media limits are specified by the 'Beginning' and 'Finish'.
A desired media segment is specified by the 'Start' and 'End'.
The current location of the media window is specified by the 'Current'
counter.
\begin_inset LatexCommand \label{timecodestructure}
\end_inset
\end_float
\layout Standard
Figure
\begin_inset LatexCommand \ref{objectInheritence}
\end_inset
depicts the specified inheritance hierarchy.
\layout Standard
\begin_float fig
\layout Standard
\align center
\begin_inset Figure size 173 132
file figs/timeCode.eps
flags 9
\end_inset
\layout Caption
Time code object inheritance hierarchy.
\begin_inset LatexCommand \label{objectInheritence}
\end_inset
\end_float
\layout Standard
Internal to each object in the time code hierarchy are elements which are
required for time code system operation.
Figure
\begin_inset LatexCommand \ref{timecodeinternals}
\end_inset
depicts the hierarchy and its internal elements.
Data types specified are in the C programming language notation and are
as follows :
\layout Description
int An integer number limited by word size.
\layout Description
uint An unsigned integer which is greater or equal to zero.
\layout Description
uchar An unsigned eight bit number which is greater then or equal to zero.
\layout Description
TYPE\SpecialChar ~
* \SpecialChar ~
\SpecialChar ~
A memory pointer to an array of TYPE.
\layout Description
TYPE\SpecialChar ~
** \SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
An array of memory pointers to arrays of TYPE.
\layout Standard
\shape italic
Counter
\shape default
, the base of the hierarchy (located at the bottom of the Figure).
The counter counts between a minimum and maximum value.
If any operations force the count above or below the max/min, then carry
is indicated.
This is essentially a self contained arithmetic logic unit ALU.
Inherent in this is a looping mechanism, where if the maximum is exceeded,
then a modulus operator loops to the remainder above the minimum.
The same applies for the case when the minimum is under-ceded.
\layout Standard
\shape italic
Field
\shape default
, a leaf node in the hierarchy (located middle left in the Figure).
The field is a counter with a digit display.
The counter maximum determines the number of digits required by the field,
called the digit count.
Each digit is alterable in a field, either incremented or decremented.
When a digit is altered, the inherited counter adjusts accordingly such
that the counter represents the number indicated by the digits.
The counter is also alterable, in which case the digits adjust to represent
the counter value.
As the number of digits depends on the maximum value, digits are dynamically
created and pointed to in computer memory space.
\layout Standard
\shape italic
Master Counter
\shape default
, a limb in the hierarchy (located middle right in the Figure).
The master counter maintains the master count.
It synchronises the individual fields with the master count.
When the master count is altered, then relevant fields are altered to add
in total at all times to the master count.
Again vice versa applies, when a field is altered, the master count is
constantly the sum of all the fields.
A master count may be split into arbitrary numbers of fields.
Each field is dynamically created and pointed to in memory space.
At this point in the hierarchy, the tasks of linear and non-linear representati
on are accomplished.
Linearly the base counter object is adjustable.
Non-linearly individual digits in individual fields are adjustable.
\layout Standard
\shape italic
Master Counter Array
\shape default
, a leaf node in the hierarchy (located top left in the Figure).
This object controls the size of the window (a dynamically allocated array)
of media frames.
A master counter allows alteration of the size of the media window or frame
count.
Frame size is specified in terms of word count.
The data type of the array is adjustable.
\layout Standard
\shape italic
Time Code
\shape default
, a leaf node in the hierarchy (located top right).
This object encapsulates time code which is consistently within the physical
limits of the underlying media stream or system.
Start and end points, as well as window size are flexibly alterable.
Such a time code
\begin_inset Formula \( (t) \)
\end_inset
is made of a beginning
\begin_inset Formula \( (b) \)
\end_inset
, a start
\begin_inset Formula \( (s) \)
\end_inset
, a current
\begin_inset Formula \( (c) \)
\end_inset
, an end
\begin_inset Formula \( (e) \)
\end_inset
, a finish
\begin_inset Formula \( (f) \)
\end_inset
and a window
\begin_inset Formula \( (w) \)
\end_inset
.
At all times
\begin_inset Formula \( b\leq s\leq e\leq f \)
\end_inset
.
This allows the start and end to shift but not overlap.
The current location obeys
\begin_inset Formula \( s\leq c<e \)
\end_inset
.
The window should have the following properties
\begin_inset Formula \( w\leq (e-s) \)
\end_inset
.
This defines a multimedia time code.
\begin_float fig
\layout Standard
\align center
\begin_inset Figure size 209 195
file figs/timeCodeInternal.eps
flags 9
\end_inset
\layout Caption
Time Code hierarchy internal elements
\begin_inset LatexCommand \label{timecodeinternals}
\end_inset
\end_float
\layout Section
Experiment
\layout Standard
An implementation of the time code hierarchy is available
\begin_inset LatexCommand \cite{key-6}
\end_inset
.
This is used in experiment to give examples of each element in operation.
\layout Standard
Counter, in this example three initial counters
\begin_inset Formula \( \{c,\, d,\, e\} \)
\end_inset
are set up where
\begin_inset Formula \( \left\{ \begin{array}{cc}
c=212; & 0\leq c<300\\
d=13; & 0\leq d<300\\
e=0; & 0\leq e<100
\end{array}\right\} \)
\end_inset
.
The following is computed
\begin_inset Formula \( e=e+(c+d) \)
\end_inset
this yields the result
\begin_inset Formula \[
e=25;\, \, carry=2\]
\end_inset
an interpretation of this result is that the addition
\begin_inset Formula \( (c+d) \)
\end_inset
yields 225, when added to
\begin_inset Formula \( e \)
\end_inset
yields 225, which wraps twice above the maximum value of
\begin_inset Formula \( e \)
\end_inset
.
The result is the modulus
\begin_inset Formula \( e=25 \)
\end_inset
and two carries.
\layout Standard
Field, in this example a field
\begin_inset Formula \( (f) \)
\end_inset
is set up such that
\begin_inset Formula \( f=1;\, \, 0\leq f<21 \)
\end_inset
.
As the field maximum is set to twenty one, two digits are required to represent
this field.
Three operations are carried out on this field and each of the results
are represented in Figure
\begin_inset LatexCommand \ref{fieldex}
\end_inset
.
The initial value of the field is one.
Operation 'b]' increments the unit digit twice, hence adding two to the
underlying counter.
The value of the field is now
\begin_inset Formula \( f=3 \)
\end_inset
.
Operation 'c]' increments the tens digit.
The value of the field is now
\begin_inset Formula \( f=13 \)
\end_inset
.
Operation 'c]' increments the tens digit again.
In this case the counter carries once as its value is
\begin_inset Formula \( f=23 \)
\end_inset
, as the maximum is exceeded the field and counter now equals two,
\begin_inset Formula \( f=2;\, \, carry=1 \)
\end_inset
.
\layout Standard
\begin_float fig
\layout Standard
\align center
a]\SpecialChar ~
\begin_inset Figure size 49 35
file figs/field1.eps
flags 11
\end_inset
\SpecialChar ~
\SpecialChar ~
b]\SpecialChar ~
\begin_inset Figure size 49 35
file figs/field2.eps
flags 11
\end_inset
\layout Standard
\align center
c]\SpecialChar ~
\begin_inset Figure size 49 35
file figs/field3.eps
flags 11
\end_inset
\SpecialChar ~
\SpecialChar ~
d]\SpecialChar ~
\begin_inset Figure size 49 35
file figs/field4.eps
flags 11
\end_inset
\layout Caption
Field example.
a] Initial value, b] unit digit increment twice, c] tens digit increment,
d] tens digit increment
\begin_inset LatexCommand \label{fieldex}
\end_inset
\end_float
\layout Standard
Master Counter, we create a master counter
\begin_inset Formula \( (c) \)
\end_inset
with three fields, hours
\begin_inset Formula \( (h) \)
\end_inset
, minutes
\begin_inset Formula \( (m) \)
\end_inset
and seconds
\begin_inset Formula \( (s) \)
\end_inset
in this case we require the following conditions to apply
\begin_inset Formula \[
\begin{array}{cc}
h=0; & 0\leq h<24\\
m=0; & 0\leq m<60\\
s=0; & 0\leq s<60
\end{array}\]
\end_inset
We also choose a minimum of two minutes and a maximum of twenty three hours,
fifty nine minutes and fifty nine seconds is assumed.
Hence in seconds,
\begin_inset Formula \( 120\leq c<86400 \)
\end_inset
and initially
\begin_inset Formula \( c=120 \)
\end_inset
.
A single operation is carried out on the master counter.
Figure
\begin_inset LatexCommand \ref{mastercounterex}
\end_inset
depicts these operations.
Initially
\begin_inset Formula \( c \)
\end_inset
is set to two minutes (one hundred and twenty seconds) as that is the minimum
possible value.
Operation 'b]' decrements the seconds unit digit by one.
As the minimum value is under-ceded, the master counter wraps to the highest
value, namely twenty three hours, fifty nine minutes and fifty nine seconds.
The carry is set to negative one indicating under-ceding the minimum once.
\layout Standard
\begin_float fig
\layout Standard
\align center
a]\SpecialChar ~
\begin_inset Figure size 171 31
file figs/mastercounter1.eps
flags 11
\end_inset
\layout Standard
\align center
b]\SpecialChar ~
\begin_inset Figure size 171 31
file figs/mastercounter2.eps
flags 11
\end_inset
\layout Caption
Master counter example.
a] Initial value, b] Seconds unit digit decrement.
\begin_inset LatexCommand \label{mastercounterex}
\end_inset
\end_float
\layout Section
Conclusion
\layout Standard
Linear time code representation allows mathematical manipulation.
Simple media location is also accomplished, however accuracy is compromised.
Non-linear time code representation allows accurate media frame location.
Such a high level description of the media stream location (field by field,
digit by digit) is good for interaction.
\layout Standard
This article and the software referenced is unique in its ability to control
any time code protocol.
Media data is closely coupled to the time reference and this is an advantage
for systems which require media data shifting and location.
\layout Bibliography
\bibitem {key-2}
Small Form Factor Committee Specification of ATA Packet Interface for CD-ROMs.
SFF-8020i
\layout Bibliography
\bibitem {key-4}
Complete MIDI 1.0 Detailed Specification, MIDI Manufacturers Association
\layout Bibliography
\bibitem {key-5}
Society of Motion Picture and Television Engineers (SMPTE) time code
\layout Bibliography
\bibitem {key-6}
Time code implementation available from : http://mffmtimecode.sourceforge.net/
\the_end
|