Appendix A. Video Library Controls and Compression Library Parameters for the OCTANE Compression Option

This appendix summarizes Video Library controls and Compression Library parameters for the OCTANE Compression option:

Device Node Controls

Table A-1 summarizes device node controls

Table A-1. OCTANE Compression Device Node Controls

Control

Default

Type

Use

VL_MGC_DEFAULT_ANALOG
_PLAY_SYNC_SOURCE

VL_MGC_SYNC_SOURCE
_ANALOG_GENLOCK

intVal

Sets default value of sync source for playback to analog destination. Values are

VL_MGC_SYNC_SOURCE_DEFAULT,
VL_MGC_SYNC_SOURCE_ANALOG_IN, or VL_MGC_SYNC_SOURCE_ANALOG
_GENLOCK

VL_MGC_DEFAULT_DIGITAL
_PLAY_SYNC_SOURCE

VL_MGC_SYNC_SOURCE
_DIGITAL_GENLOCK

intVal

Sets default value of sync source for playback to digital destination. Values are

VL_MGC_SYNC_SOURCE_DEFAULT or VL_MGC_SYNC_SOURCE_DIGITAL
_GENLOCK


Codec Node Parameters

Codec parameters fall into several categories:

  • image frame dimensions

  • data formats

  • buffer characteristics

  • compression ratio and quality control

  • compression algorithms

For more information on these categories, see “Compression Library Parameter Definitions” in Chapter 6.

Table A-2 summarizes codec parameters.

Table A-2. OCTANE Compression Image Format Parameters

Parameter

Values or Range

Use

CL_ALGORITHM_ID

Current ID

Returns ID of current algorithm.

CL_ALGORITHM_VERSION

Current version

Returns version of current algorithm.

CL_BITRATE

10,000 to 100,000,000 bits per second of compressed data (default 0: no bitrate control)

Specifies a target bit rate to which to approximate the compressed data.

CL_BITS_PER_COMPONENT

Always 8 for OCTANE Compression

Number of bits per component.

CL_BLOCK_SIZE

0–2 billion
Default: 1; depends on algorithm

Natural block size of algorithm in samples. It is most efficient to specify numberOfFrames to be a multiple of the block size when calling clCompress() or clDecompress().

CL_COMPONENTS

Always 3 for OCTANE Compression

Read-only value indicating number of components in the data.

CL_COMPRESSED_BUFFER
_SIZE

0–2 billion

Default: maximum possible size, taking into account all the factors such as algorithm, encoding method, data type, and so on.

Maximum number of bytes in compressed data buffer. For a smaller buffer than the default, set this value explicitly. If clCompress() is called with numberOfFrames larger than 1, set this value to the maximum compressed size of one frame × numberOfFrames.

CL_COMPRESSION_RATIO

JPEG: 15.0:1

Default depends on original format and algorithm

Determines whether compression ratio is a target or is exact. Some algorithms (MVC1, JPEG, and MPEG) are tunable, that is, they allow quality to be traded for compression ratio.

CL_ENABLE_IMAGEINFO

0 (FALSE (default)), 1 (TRUE)

Set to TRUE before getting compressed image information (hardware-assisted JPEG operations).

CL_END_OF_SEQUENCE
(MPEG_VIDEO only)

0 (FALSE (default)), 1 (TRUE)

Set by decompressor when it arrives at end of sequence.

CL_EXACT_COMPRESSION
_RATIO

Always 0 for OCTANE Compression

Determines whether compression ratio is a target or must be exact.

CL_FRAME_BUFFER_SIZE

0–2 billion

Default: size of one frame

Maximum amount of compressed data needed for one frame. If clDecompress() is called with numberOfFrames larger than 1, this value should be the frame size × numberOfFrames.

CL_FRAME_RATE

0–1 million; default: 30.0

Requested number of frames per second.

CL_FRAME_TYPE

0–2
CL_KEYFRAME, CL_INTRA: frame is a keyframe
CL_PREDICTED: frame contains information about its succeeding frames
CL_BIDIRECTIONAL: frame contains information about frames that precede and succeed it

Supplied by decompressor.

CL_IMAGE_HEIGHT



CL_IMAGE_WIDTH

Range: 16–4088, in multiples of 8 (NTSC must use either 240 or 248; default is 248)
Memory-to-memory decompression can be any size less than or equal to
CL_INTERNAL_IMAGE_HEIGHT

Range: 16-4080 in multiples of 16 (default: 640)
Memory-to-memory decompression can be any size less than or equal to CL_INTERNAL_IMAGE_WIDTH

Compression: height in pixels of original uncompressed image.
Decompression: height in pixels of final uncompressed image.

Compression: width in pixels of original uncompressed image.
Decompression: width in pixels of final uncompressed image.

DM_IMAGE_INTERLACING

NTSC or CCIR(525):
DM_IMAGE_INTERLACED_EVEN

PAL or CCIR(625):
DM_IMAGE_INTERLACED_ODD

Interlacing: the option operates on interlaced NTSC or PAL video data for video-to-memory compression and memory-to-video decompression. Even and odd fields are compressed as separate images.

CL_IMPACT_CODEC
_CONTROL

CL_IMPACT_START (default)

CL_IMPACT_STOP

Initializes and configures hardware for compression or decompression.

For more information, see

“Determining the JPEG Codec” in Chapter 4.

CL_IMPACT_FRAME
_INTERLEAVE

0 (FALSE (default)), 1 (TRUE)

Determines whether to interleave fields as they are being decompressed to memory.

CL_IMPACT_INTERLEAVE
_MODE

CL_IMPACT_INTERLEAVE_EVEN (use for PAL and CCIR(625)

CL_IMPACT_INTERLEAVE_ODD (default; use for NTSC and CCIR(525))

Sets type of frame interleaving (whether odd or even field occupies top line of uncompressed region of memory), when CL_IMPACT_FRAME_INTERLEAVE is TRUE.

CL_IMPACT_VIDEO_INPUT
_CONTROL

CL_IMPACT_VIDEO_CHANNEL0

CL_IMPACT_VIDEO_CHANNEL1

Determines which codec was allocated. When CL_EXTERNAL_DEVICE is used, it specifies the CL_CODEC node to be used by the VL.

CL_INTERNAL_FORMAT

Always CL_FORMAT_YCbCr422 for OCTANE Compression

Selects “natural” format for the video algorithm in use, which can be compressed without color-space conversion.

CL_INTERNAL_IMAGE
_HEIGHT

CL_INTERNAL_IMAGE
_WIDTH

 

Range: 16–4088
Default: 248

 

Range: 16-4080
Default: 640

Compression: height in pixels of final uncompressed image height.
Decompression: height in pixels of original compressed image.

Compression: width in pixels of final uncompressed image.
Decompression: width in pixels of original compressed image.

CL_JPEG_COMPONENT
_TABLES (JPEG only)

0, 1; set by CL_INTERNAL_FORMAT

Specifies IDs of AC or C Huffman table for each component.

CL_JPEG_QUALITY_FACTOR
(JPEG only)

0-100 (default 75)

Specifies an overall JPEG quality factor for scaling the default JPEG quantization tables:

CL_JPEG_QUALITY_DEFAULT to set default compression quality; range 1-100, with 25-95 being the most useful quality factor range.

CL_JPEG_QUALITY_NO_SCALE to bypass quantization table scaling.

CL_JPEG_QUANTIZATION
_TABLES
(JPEG only)

0-100

See

“Compression Library Parameter Definitions” in Chapter 6

Sets the quantization tables manually to custom-designed tables stored as reference tables, which this control downloads to codec.

CL_ORIENTATION

CL_TOP_DOWN (default)
CL_BOTTOM_UP
DM_TOP_TO_BOTTOM (for Silicon Graphics movies)

Image orientation: compress or decompress images that have top-to-bottom or bottom-to-top orientation. Compressed data is always top down unless specified otherwise.

CL_ORIGINAL_FORMAT

CL_RGB,
CL_RGBX (default),
CL_FORMAT_YCbCr422,
CL_FORMAT_XBGR

Symbolic constant from the following, depending on its data type.

Compression: sets format of original video.

Decompression: sets format desired after decompression for video.

CL_PREROLL

0–2 billion

Default: 0, depends on algorithm

Number of blocks of frames to supply to clDecompress() before decompressed frames are returned.


Memory Node Controls

Table A-3 summarizes memory node controls.


Note: For more detail on VL controls, see Chapter 3.


Table A-3. OCTANE Compression Memory Node Controls

Control

Values or Range

Type

Use

VL_CAP_TYPE

VL_CAPTURE_NONINTERLEAVED

VL_CAPTURE_INTERLEAVED

VL_CAPTURE_EVEN_FIELDS

VL_CAPTURE_ODD_FIELDS

VL-CAPTURE_FIELDS

intVal

Type of field(s) or frame(s) to capture

VL_FORMAT

VL_FORMAT_SMPTE_YUV: 8-bit YCrCb

VL_FORMAT_RGB: full-range 8-bit (0-255) RGBA

intVal

Video format on the physical connector

VL_FREEZE

0,1

boolVal

Data transfer freeze; suspends transfer at the drain node, used only for analog video out

VL_MGC_HASPECT
VL_MGC_VASPECT

0 < value ≤ 1/VL_ZOOM

fractVal

Fraction less than or equal to 1 that shrinks the horizontal or vertical aspect, respectively

VL_MGC_PAD_TOP
VL_MGC_PAD_BOTTOM

\xb3 0

intVal

Number of lines to pad at the top or bottom (respectively) of the image on capture

VL_MGC_PAD_LEFT
VL_MGC_PAD_RIGHT

\xb3 0

intVal

Number of pixels to pad at the left or right (respectively) of the image on capture

VL_MGC_ENABLE

0, 1

boolVal

Boolean value that activates or deactivates padding

VL_MGC_PAD_Y
VL_MGC_PAD_U
VL_MGC_PAD_V

1 ≤ value ≤ 254

intVal

Value between 16 and 235 that specifies the padding color of the Y, U, or V value, respectively; default is black

VL_MGC_VIDEO_TOP_CLIP

\xb3 0

intVal

Number of lines to clip from the top on playback to video output

VL_MGC_F1_EXTRA_OFFSET
VL_MGC_F2_EXTRA_OFFSET

Range depends on other controls

intVal

Number of lines to offset on capture and playback of frame 1 or 2, respectively

VL_MGC_VOUT
_STARVATION

VL_MGV_DMA_VO_STARV_RPT (default)

VL_MGV_DMA_VO_STARV_FLD

intVal

See Table A-4

VL_OFFSET

(0,0)

xyVal

Position within larger area

VL_PACKING

See Table 3-7 for values

intVal

Pixel packing (conversion) format

VL_RATE

Depends on capture type as specified by VL_CAP_TYPE

fractVal

Field or frame transfer speed

VL_SIZE

Depends on timing and capture type

xyVal

Clipping size

VL_TIMING

See Table 3-5 for values

intVal

Video timing

VL_ZOOM

Memory nodes only: n/m where n

≤ m

 

fractVal

Decimation ratio


Memory Node DMA Controls

Table A-4 summarizes memory node DMA controls

Table A-4. OCTANE Compression Memory Node DMA Controls

Control

Values

Type

Use

VL_MGC_DMA
_VIN_ROUND

VL_MGC_DMA_RND_OFF (default)

VL_MGC_DMA_RND_ON

 

intVal

For capture and compression only, when the source is 10-bit digital video from the OCTANE Video board, this control sets GIO DMA memory drain or codec drain to round from 10-bit to 8-bit as follows:

VL_MGC_DMA_RND_OFF: disables rounding, truncates instead.

VL_MGC_DMA_RND_ON: enables rounding.

Only active area data is rounded.

VL_MGC_DMA
_ROUND_TYPE

VL_MGC_DMA_RND_SMPLE (default)

VL_MGC_DMA_RND_RAND

intVal

For GIO DMA memory drain and codec drain nodes only, sets the rounding type:

VL_MGC_DMA_RND_SMPLE (simple rounding): rounds up if bit 1 is one, or rounds down if bit 1 is zero.

VL_MGC_DMA_RND_RAND: (randomized rounding): makes the decision whether or not to round up based on comparing the two least significant bits to a random sequence.

VL_MGC_DMA
_RAND_ROUND
_MODE

VL_MGC_DMA_RND_RAND
_RPT (default)

VL_MGC_DMA_RND_RAND
_FREE

intVal

For GIO DMA memory drain or codec drain, determines whether or not the random sequence used for randomized rounding is repeated.

VL_MGC_DMA_RND_RAND_RPT: repeats the random sequence; in this case a shift register is seeded to a fixed value at the start of each odd field.

VL_MGC_DMA_RND_RAND_FREE: causes the random sequence to free-wheel.

VL_MGC
_DOMINANCE_FIELD

VL_MGC_DOMINANCE_F1 (default)

VL_MGC_DOMINANCE_F2

intVal

Sets the field dominance mode, which determines the order in which the fields are read from memory. This control applies only to the frame-oriented capture types (VL_CAPTURE_INTERLEAVED and VL_CAPTURE_NONINTERLEAVED). For more information, see “Setting Field Dominance” in Chapter 3.

VL_MGC_BUFFER
_QUANTUM

Default: 1

intVal

The granularity, or quantum, of data transfer required by the application. The video data is padded at the end so that the size of a field/frame is a multiple of VL_MGC_BUFFER_QUANTUM. This control is intended for applications that do I/O directly from the ring buffer, and may consequently require the frame or field size to be a multiple of the device block size. Direct I/O, for example, usually requires that 512 bytes of data be transferred at a time.

VL_MGC_VOUT
_STARVATION

VL_MGV_DMA_VO_STARV_RPT (default)

VL_MGV_DMA_VO_STARV_FLD

The default value for this control is VL_MGV_DMA_VO_STARV_RPT. Therefore, the ring buffer used in the transfer must contain a minimum of two buffer entries (four for VL_CAPTURE
_NONINTERLEAVED), so that one buffer can be repeated by the system while the application is filling the second. If only one buffer is used, then the first buffer output is repeated indefinitely and vlGetNextFree() never returns a free buffer.

intVal

For memory and codec source nodes only, sets the video output policy to use in data transfer using a GIO DMA channel when the memory node underflows the ring buffer (that is, the application has not filled the ring buffer at the rate that the memory node consumes it, or is repeating data because of rate control). An application can choose between two starvation policies:

VL_MGV_DMA_VO_STARV_RPT: Repeats the last unit transferred (field or frame), until the next transfer unit becomes available. For this repetition, the unit is DMAed continuously.

VL_MGV_DMA_VO_STARV_FLD: For frames, repeat only the last field until the next transfer unit is available. Once starvation is detected, the nondominant field is output as both the F1 and F2 fields. This policy halves the vertical resolution but eliminates interfield motion blur. In order to repeat, the field is DMAed continuously.

If the capture type is a field, this control value causes identical behavior identical to VL_MGV_DMA_VO_STARV_RPT.

In each case, video output from system memory resumes when the application places the next field/frame in the ring buffer via vlPutValid().


Analog Input and Output Device Controls

Table A-5 summarizes analog input device (that is, video) controls.

Table A-5. OCTANE Compression Analog Input Device Controls

Control

Default

Type

Use

VL_MGC_APERTURE

2 = 0.5

intVal

Sets aperture factors for luminance for composite and Y/C inputs

VL_MGC_AUFD

0 = off
1 = on (default)

boolVal

Sets automatic field detect

VL_MGC_BANDPASS

1 = one

intVal

Selects bandpass filters for luminance for composite and Y/C inputs

VL_MGC_CHROMA_AGC

0 = slow

intVal

Sets automatic gain control speed for chrominance for composite or Y/C

VL_MGC_CHROMA_GAIN

44/255

fractVal

Adjusts burst and chrominance output level of composite and Y/C simultaneously

VL_MGC_COLOR_KILL_THRES

-938/42

fractVal

Controls level at which burst amplitude decides if composite or Y/C input is color or monochrome when color mode is automatically set

VL_MGC_CORING

1

intVal

Selects coring levels for luminance for composite and Y/C inputs

VL_MGC_FORCE_COLOR

1 = FALSE

boolVal

Forces color input

VL_MGC_LUMA_DELAY

Depends on format

intVal

Changes composite or Y/C luminance delay without affecting chrominance delay

VL_MGC_PAL_SENS

Fraction range:
0,255,1
Default 144

intVal

In PAL timing, the chroma modulation phase inverts every line. Dropouts off the tape can disrupt this pattern. Use this control to set the recovery time constant (maximum for poor quality tape).

VL_MGC_PREFILTER

0 - off

boolVal

Boosts luminance frequency response for composite and Y/C formats

VL_MGC_VNOISE_REDUCER

normal

intVal

Selects mode of vertical noise reduction

VL_MGC_VTR_LOCK

1 = on

boolVal

Locks videotape recorder

Table A-6 summarizes analog output device controls.

Table A-6. OCTANE Compression Analog Output Device Controls

Control

Default

Type

Use

VL_MGC_ANTI_DITHER

Off

boolVal

Removes interference between frequency components generated by dithered graphics images (Y/C and composite out only) and chrominance frequency present in video signals by using a notch filter in luminance

VL_MGC_CHROMA_BAND

0 = standard

boolVal

Selects standard chrominance bandwidth of about 1.3 MHz or enhanced bandwidth (nonstandard) of about 2.5 MHz for composite and Y/C outputs

VL_MGC_COLOR_OUT_KILL

Off

boolVal

Makes composite or Y/C output into monochrome by turning off color burst and chrominance

VL_MGC_DELAY_SYNC

0

fractVal

Like VL_MGC_H_OFFSET or VL_MGC_V_OFFSET, delays timing of entire video signal (sync and picture) relative to timing reference such as genlock; no effect in slave mode for output timing, but with a narrow range: resolution in pixel clock steps

VL_MGC_C_GAIN
VL_MGC_YC_GAIN

1

fractVal

Adjusts burst and chrominance output level of composite and C or Y/C (respectively) simultaneously

VL_MGC_H_OFFSET
VL_MGC_V_OFFSET

0

fractVal

Delays timing of entire video signal (sync and picture) relative to timing reference such as genlock; no effect in slave mode for output timing

VL_MGC_SCH_PHASE

0

fractVal

Adjusts SC-H phase +/- 180 degrees

VL_MGC_SUB_FREQ

0

fractVal

Provides fine adjustment of composite and Y/C output color subcarrier frequency