Storyboard system for the simultaneous timing of multiple independent video animation clips5659792Abstract An automated storyboard system, which is updated for the creation of information sequences. The storyboard includes an array of cells arranged in columns, with the content of each cell indicating an information source having a certain active duration. For each column of the storyboard which contains active cells a determination is made as to which of the cells contains an information source having a shortest one of the active durations. The column is marked to have a column time duration of the cell of shortest active duration, with the cell of the shortest active duration being terminated at the end of the column. When other active cells exist for the column, a further column is added next to the column, with the further column containing the other active cells. The active cells have an updated active duration which is equal to their previous active duration less the column time duration. Claims We claim: Description FIELD OF THE INVENTION
______________________________________
Change
Cell Delete contents
stopped
contains
Place clip in cell
of cell flag Edit cell
______________________________________
nothing
change cell to new
not meaningful,
not not
clip, set time =
leave cell as
meaning-
meaningful
clip's duration,
nothing ful
clear stopped flag leave
flag clear
clip preserve changed
change cell to
change set time =
data from old clip
nothing, flag clip's
to new clip, change
set time = 0, duration
cell to new clip,
clear stopped
set time = clip's
flag
duration, preserve
stopped flag
contin-
set stopped flag in
not meaningful,
change not
uation
previous cell in
leave cell as
flag meaningful
same row, change
continuation
cell to new clip,
set time =
clip's duration,
preserve stopped
flag
______________________________________
The other action of inserting a clip between cells, is implemented by one of two actions: if inserting between two columns, add a column containing nothings and the clip (all clear stopped flags); or if inserting between rows, add a row containing nothings and the clip (all clear stopped flags). Once an action has been performed on a particular cell within a column, the storyboard must be changed to reflect the changes to the cell. Effectively, the minimum time for the column needs to be recalculated, and the effects propagated as far as necessary throughout the storyboard. The structure of a computer program in pseudo code implementing the process for recalculating is as follows:
______________________________________
while not finished
recalculate column
if column changed during recalculation
advance to next column
else
finished
______________________________________
The Pseudo-Code for recalculating a column is as follows:
______________________________________
set minimum time of column to be infinity
for each cell in column
recalculate cell
adjust minimum time of column
for each cell of column
set time = time - minimum time of column
if entire column is full of nothings
delete column
______________________________________
Recalculating a cell is based on the time remaining for the cell in the previous column on the same row. This time is called t. Eventually, a time will be calculated for the time remaining in the current column. This will be the t for use in calculating the next column. The following table shows the actions to perform in order to recalculate a particular cell.
______________________________________
Cell type
t .ltoreq. 0 t > 0
______________________________________
nothing leave cell as nothing
change cell to continuation
marker with clear stopped flag,
set time = t, update
minimum time (m) for column
clip leave cell as clip with
insert new column of nothings,
original stopped flag,
re-evaluate from new column
leave time as clip's
duration, update
minimum time (m) for
column
continuation
change cell to nothing,
leave cell as continuation marker
marker set time = 0 with original stopped flag,
set time = t, update
minimum time (m) for column
______________________________________
The only way a cell can change (apart from a user action on a cell) is for a cell in the previous column to change. Therefore, if a column has not changed, then no subsequent columns will change. A storyboard may be played. Playing involves rendering each of the clips in a column for the specified duration, and then stopping or continuing the clip based upon the next column. For a full discussion of the rendering of a storyboard, the reader is referred to Australian Patent Application No. 53188/94 claiming priority form Australian Patent Application No. PL6833 filed 15 Jan. 1993 and entitled "Render System for rendering of Storyboard Structures on a Real-Time Animation System", and to which U.S. patent application Ser. No. 08/181,246 corresponds, the disclosure of which is hereby incorporated by cross-reference. Each storyboard incorporates a number of data structures and corresponding programs which are initially stored on ROM and RAM cards before being loaded into the AVAPS 1. The data structures are then manipulated by programs run on the AVAPS 1 under the command and control of the user. The various data structures utilized by the user will now be described with reference to FIG. 7 to FIG. 17. Referring now to FIG. 7 there is shown a storyboard directory entry 9. Each storyboard has an entry in the Storyboard Directory either on a ROM card or a RAM card containing at least the following information: Icon is a pointer to the icon for a particular storyboard. Since storyboards normally may have no visible icons in the user-interface, this value can be NULL; Name is a pointer to the name for the storyboard. This is a textual description of the storyboard, and will have a maximum size associated with it (imposed implicitly by the AVAPS 1). A fixed amount of space is allocated for RAM card storyboard name storage to enable renaming of storyboards without fragmentation of the RAMcard; and ROMStoryboard is a pointer to a ROMStoryboard structure. Referring now to FIG. 8 there is shown a ROM storyboard structure 10. The storyboard structure is a means of accessing the various components that make up a storyboard. Each storyboard saved to a ROMcard has this structure. Storyboards in RAM also have this structure, with some additional information added to increase access speed. In particular: ROMCardUsage is a pointer to the first element in a linked list indicating status information about the ROM cards used by the storyboard. This linked list is known as a ROMCard Usage Table; #Rows indicates the number of active rows in the storyboard; #Columns indicates how many active columns are in the storyboard; and Cells is a pointer to the storyboard's cells, stored contiguously a column at a time. Referring now to FIG. 9 there is shown the ROMCard Usage Table. It is important to keep track of which ROMcards are used by a storyboard. The ROMCard usage table record keeps track of this information, as well as where the ROMcard is in the AVAPS memory. The information stored in the ROMcard usage table is as follows: ROMcardID is the identification (ID) associated with a particular ROMcard that makes it unique; ROMcardname points to a text string defining the name of the ROMcard. This is useful when prompting the user for a particular card, where the name of the ROMcard has more meaning to the user rather than the ID; UsageCount indicates how many clips and editable local variable block (LVB) entries reference a particular ROMcard; and Next is the address of the next ROMcard Usage entry in this Storyboard. A NULL pointer indicates that there are no further ROMcards used. Referring now to FIG. 10 there is shown a cell structure 12. A column consists of an array of cells. Each cell includes the following information: Type may be one of the following: Empty, ClipReference, and ContinuationMarker; Clip Ref Marker is NULL when the Type=Empty. It is a pointer to a Clip Reference when the Type=ClipReference or ContinuationMarker; TimeRemaining indicates how much time is remaining for an active clip after this cell has completed; Flags is a set of booleans. The structure of this record can be found in FIG. 11 and includes a Stopped flag and a Changed flag in addition to a number of reserved flags for future use; The Stopped flag, when set, signifies that the clip to terminate when the cell's column terminates; The Changed flag is used internally by a Storyboard Manager to maintain what cells of a storyboard have changed since the last evaluation; The unused reserved bits should be set to 0. Referring now to FIG. 12 there is shown a clip reference pointed to by a cell in a storyboard. A clip reference 13 contains the following information: ClipAddress is the address pointed to by the ClipRef/Marker as shown in FIG. 10. #Component Types indicates how many editable component types a given clip has in its local variable block (LVB); LVB points to the user LVB structure for the clip. Note that the LVB pointed to by this reference is a different LVB than the actual clip. The LVB contains the user editable portions of each clip. Duration summarizes the duration of the clip in AVAPS time units; #ColorUsed summarizes how many color layers are required by the clip; #OpaqueEffects summarizes how many opaque effects are used by the clip; #TranspEffects summarizes how many transparent effects are used by the clip; #Externals indicates how many external variables are required by the clip; Externals points to an array of externals. Instantiated externals are non-NULL; Resolved indicates whether the clip reference is resolved or not. A resolved clip reference has all its components on loaded ROMcards, and can therefore be played; #Convertedhandles indicates how many non-primitive handles are in the clip; ConvertedHandles is a pointer to a list of pointers to converted handles (e.g. a TextHandle would be converted to a GraphicHandle and stored via the ClipRef); #RTOObjects defines how many RTO objects are used by the clip; and MemForRenderClip defines how much memory is required for the clip to be rendered. It includes two sets of MemForObjects. Referring now to FIG. 13 there is shown a clip address 14. A clip address indicates where to find a particular clip. A clip address has the following structure: ROMcardID indicates the ID (identity) of the ROMcard to use to find the particular clip; Dir Index indicates which directory number within the particular ROMcard the clip can be found. This can also be used to determine which clip family the clip belongs to; Clip Index indicates which entry number in the directory on the particular ROMcard should be used to access the clip; and ClipDirEntry points to the resolved directory entry structure on the ROM card where the clip is kept. The storyboards, which reside on the RAMCards, are initially copied to the internal RAM of the AVAPS 1. Storyboards in RAM are maintained by the storyboard and associated data structures which are used in addition to the structures stored on the various memory cards. Referring now to FIG. 14 there is shown a storyboard in RAM 15. When a storyboard is copied from ROM or RAMcard to RAM, additional information is kept to increase access speed to various components. The storyboard in RAM has the following structure: ROMStoryboard is the base storyboard structure as described in FIG. 8; #ClipsPlaying indicates how many of the storyboard's clips are currently being played. A storyboard can only be modified while no clips are being played; #UnResolvedClips indicates how many of the clips in the storyboard are still unresolved--that is, they need a ROMcard to be inserted so that the clip can be played; #UnresolvedExternals indicates how many externals in the storyboard still require resolving before the storyboard can be played; MaxRows indicates the maximum number of rows allocated for storyboard growth; MaxColumns indicates the maximum number of columns allocated for storyboard growth; CurrentColumn indicates the number of the current column either being played (if playing), or last played (if no longer playing); ColumnTable points to a table detailing information about the cells of the storyboard in RAM. This is used instead of the cells components of a ROMStoryboard; #ClipMarkers indicates how many clip markers are currently in the storyboard; ClipMarkerTable is a pointer to the table containing clip marker information; and RowTable is a pointer to the table containing row information. A storyboard consists of a spreadsheet of columns and rows. Since the storyboard reorganises itself in terms of columns (which are added and deleted dynamically as previously described), the storyboard itself is kept in a column order. The column table indicates the current column order of the storyboard as an array of column pointers. Shuffling the order of columns in a storyboard, and inserting and deleting columns is simply a matter of shuffling entries in this table. Referring now to FIG. 15 there is shown an entry in the column table 16. The number of valid entries in the ColumnTable is given by the #Columns value in the ROMStoryboard structure. The information provided is as follows: Cells is a pointer to an array of cells for a particular column in the storyboard. The number of valid cells in a column is given by the #Rows value in the storyboard structure; and #ClipMarkers indicates how many clip markers are present in the column. Referring now to FIG. 16 there is shown a RowTable entry 17. While a storyboard is being edited, the number of clips in each row is maintained. When a row between two non-empty rows becomes empty, then the empty row is deleted from the storyboard, and the remainder of the storyboard is shifted up to take the place of the deleted row. The RowTable contains the row information required to achieve this functionality. The Row Table is a table of RowTable Entries with the following information: ComponentCount is the number of non-empty and non-continuation-marker cells in the row. In order to manipulate storyboards within the AVAPS 1, operations are performed on the aforementioned data structures. These operations are implemented in software codes and include providing means for the automatic manipulation of elements of a storyboard, including the manipulation of clips within a storyboard and the automatic placement of continuation markers to reflect the changes in timing within the storyboard. The functions provided are as outlined in the following paragraphs: New Storyboard This operation creates a new, empty storyboard of a given size. The parameters for this operation are: number of rows number of columns address of place to store the address of the new storyboard. A pseudo-code representation of this process is provided as follows:
______________________________________
ColumnSize = #Rows * CellSize
A = SpreadsheetSize = #Columns * ColumnSize
B = ClipMarkerTableSize = MaxClipMarkers * sizeof(ClipMarkerTable
entry)
C = ColumnTableSize = #Columns * sizeof(ColumnTable entry)
D = RowTableSize = #Rows * sizeof(RowTable entry)
Mem Required = A + B + C + D + sizeof(Storyboard)
Allocate the single portion of memory required for the storyboard
If unable to allocate
return NotEnoughMemory
Set the maximum number of rows and columns
Set the number of active rows and columns
For each column:
set the number of clip markers in the ColumnTable to 0
set the address of the column in the ColumnTable
For each row:
MakeEmpty(cell)
For each row
set the ComponentCount in the RowTable to be 0
Set ROMcardUsageTable to be NULL
Store address of new storyboard in specified location
#UnresolvedClips = 0
#UnresolvedExternals = 0
return OK
______________________________________
Clear Storyboard This operation clears all the cells of a given storyboard by deleting all clips and clip markers from it. The parameters for this operation are: address of the storyboard to clear; A pseudo-code representation of this process is provided as follows:
______________________________________
If (Storyboard is playing)
return StoryboardPlaying
For each column from 0 to #Columns
For each row in column
Sub.sub.-- Delete Cell
EvaluateCompleteStoryboard
return OK
______________________________________
Delete Contents Of Cell This operation deletes the contents of a cell in the specified storyboard and frees any memory associated with any clip references that were present. The parameters for this operation are: address of the storyboard being used; row number of the cell; and column number of the cell. A pseudo-code representation of this process is provided as follows:
______________________________________
If (Storyboard is playing)
return StoryboardPlaying
ErrorCode = Get Cell Address(row, column, cell)
If (ErrorCode = OK)
If (cell.type = Empty or ContinuationMarker)
return CellContainsNonDeletableComponent
Sub.sub.-- Delete Cell
ErrorCode = EvaluateStoryboard(Column)
return ErrorCode
______________________________________
Add Clip This operation adds a clip to the specified cell. The parameters for this operation are: address of the storyboard being used; a ClipAddress structure. If ClipDirEntry is NULL, it will be filled in; row number of the cell; and column number of the cell. A pseudo-code representation of this process is provided as follows:
______________________________________
If (Storyboard is playing)
return StoryboardPlaying
ErrorCode = Get Cell Address(row, column, cell)
If (ErrorCode = OK)
ec = column
If (cell.type = CONTINUATION.sub.-- MARKER)
ec--
Sub.sub.-- SetStoppedFlag(row, ec, TRUE)
Sub.sub.-- Add Clip(Row, column)
EvaluateStoryboard(ec)
return ErrorCode
______________________________________
Add Clip Between Cells This operation adds a clip between the specified cells, adding a column or row or both as necessary. The parameters for this operation are: address of the storyboard being used; a ClipAddress structure (see FIG. 13). If ClipDirEntry is NULL, it will be filled in; row number of the first cell; column number of the first cell; row number of the second cell; column number of the second cell; and A pseudo-code representation of this process is provided as follows:
______________________________________
If (Storyboard is playing)
return StoryboardPlaying
ErrorCode = InsertCell
If (ErrorCode = OK)
ec = column
If ((GetCellAddress(row, ec+1, next.sub.-- cell) = OK) AND
(next.sub.-- cell.type = CONTINUATION.sub.-- MARKER))
ec--
Sub.sub.-- SetStoppedFlag(row, ec, TRUE)
Sub.sub.-- Add Clip(row, column)
EvaluateStoryboard(ec)
return ErrorCode
______________________________________
Move Cell This operation moves the contents of a particular cell to another. The parameters for this operation are: address of the storyboard being used; source row number of the cell; source column number of the cell; destination row number for the cell contents; and destination column number for the cell contents. A pseudo-code representation of this process is provided as follows:
______________________________________
If (Storyboard is playing)
return StoryboardPlaying
ErrorCode = ValidateFromCell(from.sub.-- row, from.sub.-- column,
from.sub.-- cell)
If (ErrorCode = OK)
ErrorCode = Get Cell Address(to.sub.-- row, to.sub.-- column, to.sub.--
cell)
If ((ErrorCode = OK) AND (to.sub.-- cell != from.sub.-- cell))
If (to.sub.-- cell.type = CONTINUATION.sub.-- MARKER)
Sub.sub.-- SetStoppedFlag(to.sub.-- row, to.sub.-- column-1, TRUE)
Sub.sub.-- Delete Cell (to.sub.-- cell)
*to.sub.-- cell = *from.sub.-- cell
Make.sub.-- Empty(from.sub.-- cell)
IncrementRowUsage(to.sub.-- row)
DecrementRowUsage(from.sub.-- row)
if (to.sub.-- cell.type = CLIP.sub.-- MARKER)
Update.sub.-- CM.sub.-- Entry(to.sub.-- cell.cm.sub.-- id, to.sub.--
column)
EvaluateCompleteStoryboard
return ErrorCode
______________________________________
Move Cell Between Cells This operation moves the contents of a particular cell to another cell created between two cells. The parameters for this operation are: address of the storyboard being used; source row number of the cell; source column number of the cell; destination row number of the first cell; destination column number of the first cell; destination row number of the second cell; and destination column number of the second cell. A pseudo-code representation of this process is provided as follows:
______________________________________
If (Storyboard is playing)
return StoryboardPlaying
ErrorCode = ValidateFromCell(from.sub.-- row, from.sub.-- column,
from.sub.-- cell)
If (ErrorCode = OK)
ErrorCode = InsertCell
If (ErrorCode = OK)
If ((GetCellAddress(row, column-1, prev.sub.-- cell) = OK) AND
(cell2.type = CONTINUATION.sub.-- MARKER))
Sub.sub.-- SetStoppedFlag(row, column-1, TRUE)
If (row1 != row2) AND (row1 < from.sub.-- row)
from.sub.-- row++
If (column1 != column2) AND (column1 < from.sub.-- column)
from.sub.-- column++
ErrorCode = MoveCell(from.sub.-- column, from.sub.-- row, row, column)
return ErrorCode
______________________________________
Copy Cell This operation copies the contents of a particular cell to another (only valid for clips). The parameters for this operation are: address of the storyboard being used; source row number of the cell; source column number of the cell; destination row number for the cell contents; and destination column number for the cell contents. A pseudo-code representation of this process is provided as follows:
______________________________________
return Copy.sub.-- Cell.sub.-- To.sub.-- Storyboard(this)
______________________________________
Copy Cell Between Cells This operation copies the contents of a particular cell to another cell created between two cells. The parameters for this operation are: address of the storyboard being used; source row number of the cell; source column number of the cell; destination row number of the first cell; destination column number of the first cell; the destination row number of the second cell; and destination column number of the second cell. A pseudo-code representation of this process is provided as follows:
______________________________________
If (Storyboard is playing)
return StoryboardPlaying
ErrorCode = ValidateFromCell(from.sub.-- row, from.sub.-- column,
from.sub.-- cell)
If (ErrorCode = OK)
ErrorCode = InsertCell
% Can copy the cell, we just must be careful about where to
If (ErrorCode = OK)
ec = column
If ((GetCellAddress(row, column+1, next.sub.-- cell) = OK) AND
(next.sub.-- cell.type = CONTINUATION MARKER))
ec--
Sub.sub.-- SetStoppedFlag(row, ec, TRUE)
% Fix up from address (may have changed due to an inserted column)
If ((row1 != row2) AND (row1 < from.sub.-- row))
from.sub.-- row++
If((column1 != column2) AND (column1 < from.sub.-- column))
from.sub.-- column++
GetCellAddress(from.sub.-- row, from.sub.-- column, from.sub.-- cell)
Sub.sub.-- Delete Cell (to.sub.-- cell)
ErrorCode = Sub.sub.-- Copy cell(from.sub.-- cell, to.sub.-- cell
if (ErrorCode = OK)
EvaluateStoryboard(ec)
return ErrorCode
______________________________________
Get Cell Contents Referring now to FIG. 17 there is shown the basic cell information 18 copied in Get Cell Contents. Copies of the basic cell structure is made to a caller specified address. The information copied is: Type is one of Empty, Clip, ContinuationMarker as defined previously; Flags is the cell flags structure containing the stopped flag as defined previously; ClipAddress indicates where to find the clip (on which ROMcard) if Type=Clip. It is invalid otherwise. The structure of the record is as defined previously; Clip Marker. If Type=ClipMarker, it holds the clip marker ID of the cell; ColorUsage summarizes the colorusage for the particular clip if Type=Clip. It is 0 otherwise; #OpaqueEffects summarizes the opaque effects usage for the particular clip if Type=Clip. It is 0 otherwise; #TranspEffects summarizes the transparent effects usage for the particular clip if Type=Clip. It is 0 otherwise; Duration summarizes file duration of the clip if Type=Clip. It is 0 otherwise; #Externals indicates how many externals the clip uses; and ResolvedFlag indicates if the clip can be run with the current ROMcard status. The parameters for this operation are: address of the storyboard being used; row number of the cell; column number of the cell; and address of location to copy the cell information. A pseudo-code representation of this process is provided as follows:
______________________________________
ErrorCode = Get Cell Address(row, column, cell)
If (ErrorCode = OK)
Store base components of cell from clipref at specified address
return ErrorCode
______________________________________
Get Column Level Usage This operation returns the color and effect usage for a particular column. The parameters for this operation are: address of the storyboard being used; column number; address of location to copy the color information; and address of location to copy the effect information. A pseudo-code representation of this process is provided as follows:
______________________________________
ErrorCode = ValidateCell (Column, 0)
If (ErrorCode = OK)
For each cell in column
Add Effects and Color usage to total
Store total usage in desired location
return ErrorCode
______________________________________
Validate From Cell This operation gets the from cell's address and validates the cell type for move/copy. A pseudo-code representation of this process is provided as follows:
______________________________________
ErrorCode = GetCellAddress(from.sub.-- row, from.sub.-- column,
from.sub.-- cell
If (ErrorCode = OK)
If (from.sub.-- cell.type = EMPTY OR CONTINUATION.sub.-- MARKER)
ErrorCode = InvalidCellType
return ErrorCode
______________________________________
Column Number From Address A pseudo-code representation of this process is provided as follows:
______________________________________
For each entry in ColumnTable up to #Columns
If (Column Table[entry].cells = column)
Store column number (entry) in specified location
return OK
return NoSuchColumn
______________________________________
Get ClipRef Address A pseudo-code representation of this process is provided as follows:
______________________________________
ErrorCode = GetCellAddress(row, column, cell)
If (ErrorCode = OK)
If (cell->type = Clip)
store cell->clipref in specified location
Else
ErrorCode = CellDoesNotContainClip
return ErrorCode
______________________________________
Get Cell Address A pseudo-code representation of this process is provided as follows:
______________________________________
ErrorCode = ValidateCell
If (ErrorCode = OK)
store address of cell in specified location
(cell address = address of (columntable[column].cells[row]))
return ErrorCode
______________________________________
Validate Cell A pseudo-code representation of this process is provided as follows:
______________________________________
If (Column# > Max.sub.-- columns)
return ColumnOutOfRange
If (Row# > Max.sub.-- rows
return RowOutOfRange
return OK
______________________________________
Make Empty A pseudo-code representation of this process is provided as follows:
______________________________________
cell.fwdarw.type = Empty
cell.fwdarw.flags = 0
cell.fwdarw.clipref = NULL
cell.fwdarw.time.sub.-- remaining = 0
______________________________________
Insert Cell This operation makes sure that the cell being inserted is valid, and then inserts it into the storyboard, inserting a row, column or both if necessary. A pseudo-code representation of this process is provided as follows:
______________________________________
ErrorCode = ValidateCell(row1#, column1#)
If ErrorCode = OK
ErrorCode = ValidateCell(row1#, column1#)
If ErrorCode != OK
return ErrorCode
row = max(Row1#, Row2#)
min.sub.-- row = min(Row1#, Row2#)
column = max(Column1#, Column2#)
min.sub.-- column = min(Column1#, Column2#)
% Now validate that they are adjacent
if ((row - min.sub.-- row) > 1) OR ((column - min.sub.-- column) > 1))
return CellsNotAdjacent
% Do the work
If (Column1# != Column2#)
InsertColumn(column)
If (Row1# != Row2#)
InsertRow(row)
store row in specified location
store column in specified location
err = GetCellAddress(row, column, cell)
return OK
______________________________________
Insert Row This operation inserts a row at row N on all active columns within a storyboard. A pseudo-code representation of this process is provided as follows:
______________________________________
If (N > (#rows+1))
return RowOutOfRange
If (# rows = max.sub.-- rows)
return OutOfMemory
for each active column
for (r = max.sub.-- rows-1 up to N)
copy data from cell[r] to cell[r+1]
set cell[r] to be Empty
% Fix up the row table. The new row inserted has no entries yet
for (r = max.sub.-- rows-1 up to N)
copy row.sub.-- table[r] to row.sub.-- table[r+1]
row.sub.-- table[r] = 0
#rows++
return OK
______________________________________
Delete Rows This operation deletes from R1 up to (but not including) R2 from all columns in SB. A pseudo-code representation of this process is provided as follows:
______________________________________
If (R2 > max.sub.-- rows)
return RowOutOfRange
column = columns[0]
count = max.sub.-- columns)
while (count)
% first copy the data in the column (i.e. the cells)
to = r1
from = r2
while (from < max.sub.-- rows)
cell[to] = cell[from]
from++
to++
while (to < max.sub.-- rows)
MakeEmpty(cell[to])
to++
% now update the row table
to = r1
from = r2
while (from < max.sub.-- rows)
row.sub.-- table[to] = row.sub.-- table[from]
from++
to++
while (to < max.sub.-- rows)
row.sub.-- table[to].count = 0
to++
column++
count--
return OK
______________________________________
Insert Column This operation inserts a column at column N. A pseudo-code representation of this process is provided as follows:
______________________________________
m = max.sub.-- columns - 1
if (c >= m)
return ColumnOutOfRange
row = 0
cell = columntable[c].cells
while (row < #rows)
if (cell.sub.-- type != Empty)
return StoryboardTooSmall
row++
cell++
% Now can insert the column
tmp = columntable[m]
while (m > c)
columntable[m] = columntable[m-1]
m--
columntable[m] = temp
return OK
______________________________________
Delete Columns This operation deletes columns from C1 up to (but not including) C2. A pseudo-code representation of this process is provided as follows:
______________________________________
if (c2 > max.sub.-- columns)
return ColumnOutOfRange
while (c2 > c1)
temp = columns[c1]
i = c1+1
while (i < max.sub.-- columns)
columns[i-1] = columns[i]
columns[i-1] = temp
c2--
return OK
______________________________________
Increment Row Usage This operation updates the usage information of a particular row. A pseudo-code representation of this process is provided as follows:
______________________________________
rowtable[row]++
______________________________________
Decrement Row Usage This operation updates the usage of a particular row. A pseudo-code representation of this process is provided as follows:
______________________________________
rowtable[row]--
______________________________________
Compress Rows This operation goes through all the rows deleting blank ones as necessary. At the end of processing, #rows will reflect the true number of active rows in the storyboard. A pseudo-code representation of this process is provided as follows:
______________________________________
last.sub.-- active.sub.-- row = -1
rows.sub.-- to.sub.-- move = 0
row = 0
num.sub.-- rows = max.sub.-- rows
while (row < num.sub.-- rows)
if (RowTable[row].count = 0)
rows.sub.-- to.sub.-- move++
else
if (rows.sub.-- to.sub.-- move > 0)
last.sub.-- active.sub.-- row++
DeleteRows(last.sub.-- active.sub.-- row, row)
row = last.sub.-- active.sub.-- row
num.sub.-- rows -= rows.sub.-- to.sub.-- move
rows.sub.-- to.sub.-- move = 0
else
last.sub.-- active.sub.-- row = row
row++
#rows = last.sub.-- active.sub.-- row + 1
______________________________________
Evaluate Storyboard This operation evaluates all columns until the end of the storyboard is met. When column=start column for evaluations, this is corrected to be valid due to possible changes from inserting between cells. A pseudo-code representation of this process is provided as follows:
______________________________________
if (column < 0)
column = 0
CompressRows
% See if the change was made outside the range of the active board.
% If so, delete any columns from the active.sub.-- board up to the new
one
if (column >= #columns)
columns.sub.-- to.sub.-- move = column - #columns
#columns++
if (columns.sub.-- to.sub.-- move > 0)
DeleteColumns(#columns, column)
#columns++
return OK
% Otherwise re-evaluate the storyboard from the column of change to a
% point where there is no change
last.sub.-- active.sub.-- column = column - 1
columns.sub.-- to.sub.-- move = 0
while (column < #columns)
column.sub.-- status = Evaluate.sub.-- Column(column, is.sub.-- active)
switch (column.sub.-- status)
case CANNOT.sub.-- INSERT:
return StoryboardTooSmall
case INSERTED
#columns++
if (#columns > max.sub.-- columns)
#columns = max.sub.-- columns
return StoryboardTooSmall
case CHANGED:
case NOCHANGE:
if (! is.sub.-- active)
columns.sub.-- to.sub.-- move++
if (is.sub.-- active OR (column = #columns - 1))
if (columns.sub.-- to.sub.-- move > 0)
last.sub.-- active.sub.-- column++
DeleteColumns(last.sub.-- active.sub.-- column, column)
column = last.sub.-- active.sub.-- column
#columns -= columns.sub.-- to.sub.-- move
columns.sub.-- to.sub.-- move = 0
else
last.sub.-- active.sub.-- column = column
if (column.sub.-- status = CHANGED)
column++
else
column = #columns
column = #columns
return OK
______________________________________
Evaluate Entire Storyboard This operation evaluates all colunms until the end of the storyboard is met. A pseudo-code representation of this process is provided as follows:
______________________________________
CompressRows
column = 0
last.sub.-- active.sub.-- column = -1
num.sub.-- cols = max.sub.-- columns
while (column < num.sub.-- cols)
switch (Evaluate.sub.-- Column(column, is.sub.-- active))
case CANNOT.sub.-- INSERT:
return StoryboardTooSmall
case INSERTED:
num.sub.-- cols++
if (num.sub.-- cols > max.sub.-- columns)
num.sub.-- cols = max.sub.-- columns
case CHANGED:
case NOCHANGE:
if (is.sub.-- active)
if (columns.sub.-- to.sub.-- move > 0)
last.sub.-- active.sub.-- column++
DeleteColumns(last.sub.-- active.sub.-- column, column)
column = last.sub.-- active.sub.-- column
num.sub.-- cols -= columns.sub.-- to.sub.-- move
columns.sub.-- to.sub.-- move = 0
last.sub.-- active.sub.-- column = column
else
columns.sub.-- to.sub.-- move++
column++
#columns = last.sub.-- active.sub.-- column + 1
return OK
______________________________________
Evaluate Column This operation evaluates a particular column and set is.sub.-- active flag. It assumes that the column is inactive. A pseudo-code representation of this process is provided as follows:
______________________________________
is.sub.-- active = FALSE
status = UNCHANGED
min.sub.-- time = INFINITE
% Get the current cell and previous column's cell
cell = columntable[column].cells
if (column = 0)
prev.sub.-- cell = blank.sub.-- cell
else
prev.sub.-- cell = columntable[column-1].cells
% Now go through the cells one by one
row = 0
while (row < #rows)
t = prev.sub.-- cell.fwdarw.time.sub.-- remaining
% Update status if the cell had changed due to some external source
if (cell.fwdarw.flags.changed)
status = CHANGED
cell.fwdarw.flags.changed = FALSE
% Is a clip attempting to continue into this column?
if (t > 0)
switch (cell.fwdarw.type)
case EMPTY:
cell.fwdarw.type = CONTINUATION.sub.-- MARKER
cell.fwdarw.flags.stopped = FALSE
cell.fwdarw.time.sub.-- remaining = t
min.sub.-- time = min(min.sub.-- time, t)
case CLIP:
case CLIP.sub.-- MARKER:
is.sub.-- active = TRUE
if (status = CHANGED)
cell.fwdarw.flags.changed = TRUE
err = InsertColumn(column)
if (err = OK)
return INSERTED
else
return CANNOT.sub.-- INSERT
case CONTINUATION.sub.-- MARKER:
cell.fwdarw.time.sub.-- remaining = t
cell.fwdarw.clipref = prev.sub.-- cell.fwdarw.clipref
min.sub.-- time = min(min.sub.-- time, t)
else
% (t <= 0)
switch (cell.fwdarw.type)
case EMPTY:
do nothing
case CLIP:
cell.fwdarw.time.sub.-- .sub.-- remaining = cell.fwdarw.clipref.fwdarw.dur
ation
min.sub.-- time = min(min.sub.-- time, cell.fwdarw.time.sub.-- remaining)
case CLIP.sub.-- MARKER:
is.sub.-- active = TRUE
case CONTINUATION.sub.-- MARKER:
Make Empty(cell)
status = CHANGED
fi
% Update to be at the next cell
cell++
if (column > 0)
prev.sub.-- cell++
row++
% Can now determine if the column is active (if not registered already)
if (min.sub.-- time = 0)
is.sub.-- active = TRUE
If (is.sub.-- active AND (min.sub.-- time > 0))
% Finally go through and adjust the time of each cell by min.sub.-- time
cell = columntable[column].cells
row = 0
while (row < #rows)
t = cell.fwdarw.time.sub.-- remaining
if (min.sub.-- time = INFINITE)
t = 0
else
if (t < INFINITE)
t-= min.sub.-- time
if (cell.fwdarw.flags.stopped)
t = 0
cell.fwdarw.time.sub.-- remaining = t
cell++
row++
return status
______________________________________
The foregoing can be performed on any suitably programmed computerised device such as that referred to previously by cross-reference. Accordingly, the preferred embodiment provides a means for the automatic manipulation of elements of a storyboard, including the manipulation of clips within a storyboard and the automatic placement of continuation markers to reflect the changes in timings within the storyboard. The foregoing describes only one embodiment of the present invention. Modifications, including the implementation of the storyboard on different computer platforms in different computer programming languages, can be made thereto without departing from the scope of the present invention. For example, although the preferred embodiment is configured for use with RTO technology, other graphics arrangements can be manipulated in corresponding ways.
|
Same subclass Same class Consider this |
||||||||||
