@database "dctv.guide"
@Node Main "dctv.guide"
    @{" AllocDCTVCvt() " Link "AllocDCTVCvt()"}
    @{" AllocDCTVCvtTagList() " Link "AllocDCTVCvtTagList()"}
    @{" AllocDCTVCvtTags() " Link "AllocDCTVCvtTags()"}
    @{" CvtDCTVLine() " Link "CvtDCTVLine()"}
    @{" DCTVCvtLine() " Link "DCTVCvtLine()"}
    @{" DCTVFormat() " Link "DCTVFormat()"}
    @{" FormatDCTV() " Link "FormatDCTV()"}
    @{" FreeDCTVCvt() " Link "FreeDCTVCvt()"}
    @{" InitDCTVCvt() " Link "InitDCTVCvt()"}
    @{" ReadDCTVPixel() " Link "ReadDCTVPixel()"}
    @{" SetDCTVColorTable() " Link "SetDCTVColorTable()"}
    @{" TestDCTVSignature() " Link "TestDCTVSignature()"}
@EndNode

@Node "AllocDCTVCvt()" "dctv.library/AllocDCTVCvt"

NAME
@{b}	AllocDCTVCvt -- Old form of AllocDCTVCvtTagList().@{ub}

SYNOPSIS
@{b}	struct DCTVCvtHandle *AllocDCTVCvt (struct BitMap *BitMap,@{ub}
						      a0

			ULONG Width, ULONG Height, ULONG Flags)
			      d0	   d1		 d2

FUNCTION
@{b}	This is the V1 compatible form of @{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}.  It offers@{ub}
@{b}	only a subset of the features of AllocDCTVCvtTagList():@{ub}
	. RGB->DCTV conversion only.
	. No extended error code.

@{b}	This function is equivalent to:@{ub}

	AllocDCTVCvtTags ( BitMap,
			   DCTVCVTA_Width,  Width,
			   DCTVCVTA_Height, Height,
			   DCTVCVTA_Flags,  Flags,
			   TAG_END );

@{b}	This function is considered obsolete, but is still present in the@{ub}
@{b}	library for backwards compatibility.@{ub}

INPUTS
@{b}	BitMap - BitMap arg for AllocDCTVCvtTagList().@{ub}

@{b}	Width,@{ub}
@{b}	Height,@{ub}
@{b}	Flags - Values for DCTVCVTA_Width, DCTVCVTA_Height, and DCTVCVTA_Flags@{ub}
	respectively.

RESULTS
@{b}	Pointer to initialized DCTVCvtHandle for use with other conversion@{ub}
@{b}	functions.  NULL on failure.@{ub}

SEE ALSO
@{b}	@{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}, @{"FreeDCTVCvt()" Link "FreeDCTVCvt()"}, libraries/dctv.h@{ub}
@EndNode

@Node "AllocDCTVCvtTagList()" "dctv.library/AllocDCTVCvtTagList"

NAME
@{b}	AllocDCTVCvtTagList -- Allocate a conversion environment. (V3)@{ub}

SYNOPSIS
@{b}	struct DCTVCvtHandle *AllocDCTVCvtTagList@{ub}
	    (struct BitMap *BitMap, struct TagItem *TagList)
		      a0		     a1

FUNCTION
@{b}	Allocates and initializes a DCTV conversion environment.  The following@{ub}
@{b}	types of conversions are supported:@{ub}
	. 24-bit RGB to DCTV BitMap
	. DCTV BitMap to 24-bit RGB

@{b}	In both cases the 24-bit RGB data is expected to be in 70ns (HIRES)@{ub}
@{b}	pixels, interlace or non-interlace.  The RGB and DCTV pixels correspond@{ub}
    1:1.  No image scaling is performed.

@{b}	The supplied taglist desribes the conversion type, image dimensions,@{ub}
@{b}	and a variety of other parameters.@{ub}

@{b}	There are two methods of handling DCTV BitMaps:  full-screen (default)@{ub}
@{b}	and 1-line.  A full-screen BitMap contains the entire DCTV display@{ub}
@{b}	image (either as destination or source depending on conversion type).@{ub}
@{b}	Successive calls to @{"CvtDCTVLine()" Link "CvtDCTVLine()"} process successive lines in the@{ub}
@{b}	BitMap.@{ub}

@{b}	A 1-line BitMap (DCTVCVTF_1LineBM set) contains only 1 line of the@{ub}
@{b}	DCTV BitMap instead of the full image.	This sort of BitMap is not@{ub}
@{b}	displayable, but is useful as a file buffer.  It also requires less@{ub}
@{b}	memory than a full-screen BitMap.  In this case, each call to@{ub}
@{b}	@{"CvtDCTVLine()" Link "CvtDCTVLine()"} uses the same line in the BitMap.@{ub}

@{b}	RGB data is handled in the form of a 24-bit RGB line buffer in the@{ub}
@{b}	form of 3 UBYTE arrays in the conversion environment: one for each@{ub}
@{b}	component (Red, Green, and Blue).  The RGB data is in chunk pixel@{ub}
@{b}	format instead of a BitMap.  These arrays are used to buffer 1 line@{ub}
@{b}	of RGB data and must be read or written to (depending on conversion@{ub}
@{b}	type) between calls to CvtDCTVLine().@{ub}

@{b}	Normally AllocDCTVCvtTagList() allocates the 24-bit RGB line buffer.@{ub}
@{b}	When DCTVCVTF_CustomRGBBuf is set, the client is allowed to supply@{ub}
@{b}	the line buffer instead.  This is useful if your RGB buffer is@{ub}
@{b}	taller than 1 line since this mode allows changing the RGB buffer@{ub}
@{b}	pointers between calls to @{"CvtDCTVLine()" Link "CvtDCTVLine()"}.  This also eliminates copying@{ub}
@{b}	to and from the conversion 24-bit line buffer.@{ub}

@{b}	Note that the buffer pointers in the DCTVCvtHandle may only be changed@{ub}
@{b}	if DCTVCVTF_CustomRGBBuf is set.  These pointers are read-only when@{ub}
@{b}	this bit isn't set.@{ub}

@{b}	A special case exists in which DCTVCVTF_CustomRGBBuf may be specified@{ub}
@{b}	and the buffers left NULL.  This is legal only when using@{ub}
@{b}	DCTVCVTT_DCTVtoRGB conversion mode and only calling ReadDCTVPixel()@{ub}
    (not @{"CvtDCTVLine()" Link "CvtDCTVLine()"}) because @{"ReadDCTVPixel()" Link "ReadDCTVPixel()"} does not access the RGB
@{b}	line buffers.@{ub}

@{b}	The actual conversion process consists of calling CvtDCTVLine()@{ub}
@{b}	for each line to be converted.@{ub}

@{b}	The line number values SrcLineNum, DstLineNum and NDelayLines are used@{ub}
@{b}	to determine which line is to be input and output by the next call to@{ub}
@{b}	@{"CvtDCTVLine()" Link "CvtDCTVLine()"}.  NDelayLines indicates how many lines of source data@{ub}
@{b}	are required to be buffered in order to generate the first line of@{ub}
@{b}	output data.  The actual value of NDelayLines depends on the@{ub}
@{b}	conversion type and flags and may change from one library version to@{ub}
@{b}	another.@{ub}

@{b}	The following relationship is always true:@{ub}
	SrcLineNum - DstLineNum == NDelayLines.

@{b}	Usually @{"CvtDCTVLine()" Link "CvtDCTVLine()"} must be called a total of Height + NDelayLines@{ub}
@{b}	times to completely generate the output image.@{ub}

@{b}	A conversion environment can only be used for the type of conversion@{ub}
@{b}	specified in DCTVCVTA_Type.  A single conversion environment can be@{ub}
@{b}	used to process multiple frames sequentially by calling InitDCTVCvt()@{ub}
@{b}	between frames.  The only restriction is that each frame must use the@{ub}
@{b}	same BitMap and be the same dimensions.@{ub}

@{b}	Call @{"FreeDCTVCvt()" Link "FreeDCTVCvt()"} to dispose of conversion environment.@{ub}

INPUTS
@{b}	BitMap - Pointer to an initialized BitMap structure with the following@{ub}
	dimension limits:

	    Width >= 256
	    Height >= 2 for non-lace, 3 for lace
	    Depth >= 3

	The Planes[] data need not be in chip ram for conversion (but
	obviously do if you expect to display the BitMap).

	Both interleaved and non-interleaved bitmaps are supported.

	For full-screen mode, the BitMap must be large enough to hold the
	entire conversion as specified by DCTVCVTA_Width and
	DCTVCVTA_Height.  For 1-line mode, the BitMap needs to have at
	least one line of data wide enough to hold an entire line as
	specified by DCTVCVTA_Width.

	The supplied BitMap structure and Planes[] data must remain valid
	until @{"FreeDCTVCvt()" Link "FreeDCTVCvt()"} is called.

@{b}	TagList - Pointer to TagItem array with Tags described below.@{ub}

TAGS
@{b}	DCTVCVTA_Type	    (UWORD)@{ub}
	DCTVCVTT_RGBtoDCTV - Convert 24-bit RGB chunky pixels to DCTV a
	    display BitMap.  This is the default conversion type.

	DCTVCVTT_DCTVtoRGB - Convert a DCTV display BitMap to 24-bit
	    RGB chunky pixels.

@{b}	DCTVCVTA_Width	    (WORD)@{ub}
	Pixel width of image to convert in 70ns (HIRES) pixels.  Must be
	multiple of 16 in the range of 256 .. BitMap width.  The practical
	maximum width is 736 (the maximum display width).  Non-multiples of
	16 are truncated.

	The default value is derived from the BitMap.

	It's safest to always include this tag when using a 1-line BitMap
	since there is some ambiguity as to what BitMap->BytesPerRow
	actually means for a 1-line BitMap.

@{b}	DCTVCVTA_Height     (WORD)@{ub}
	Pixel height of image to convert.

	For full-screen mode, must be in the range of 2 for non-lace (3
	for lace) .. BitMap height.  For 1-line mode, must be at least 2
	for non-lace, 3 for lace.

	The default value is derived from the BitMap.

	It's safest to always include this tag when using a 1-line BitMap
	since there is some ambiguity as to what BitMap->Rows actually
	means for a 1-line BitMap.

@{b}	DCTVCVTA_Flags	    (UWORD)@{ub}
	DCTVCVTF_Lace - Interlaced DCTV display BitMap.

	DCTVCVTF_Filter - Apply RGB filtering.	Only observed for
	    DCTVCTVT_RGBtoDCTV.

	DCTVCVTF_1LineBM - Treat BitMap as 1-line instead of full-screen.

	DCTVCVTF_CustomRGBBuf (V3) - Allow client to supply a custom RGB
	    line buffer.  Normally this function allocates the RGB line
	    buffer.

	Unknown flags are ignored.

@{b}	DCTVCVTA_ColorTable (UWORD *)@{ub}
	Initial palette associated with BitMap for DCTVCVTT_DCTVtoRGB
	conversion.  Must contain 1 << BitMap->Depth entries.  This array
	must remain valid until it is replaced with SetDCTVColorTAble()
	or the conversion environment is freed.

	Mid-BitMap palette changes, if any, can be set with
	@{"SetDCTVColorTable()" Link "SetDCTVColorTable()"}.

	This tag is required for DCTVCVTT_DCTVtoRGB in order to be able to
	decode the bits in the BitMap.	Ignored for DCTVCVTT_RGBtoDCTV.

@{b}	DCTVCVTA_ErrorCode  (ULONG *)@{ub}
	Pointer to a ULONG where an extended error code is placed if
	AllocDCTVCvtTagList() fails.  The buffer pointed to by this
	tag is modified only on an error.

	Errors codes:

	DCTVCVTERR_NoMem - Not enough memory.

	DCTVCVTERR_BadBitMap - Supplied BitMap is not valid.  Could be
	    invalid dimensions or depth.

	DCTVCVTERR_UnknownType - Unknown conversion type passed to
	    DCTVCVTA_Type.

	DCTVCVTERR_BadParams - Invalid parameters provided for
	    conversion.

RESULTS
@{b}	Pointer to initialized DCTVCvtHandle for use with other conversion@{ub}
@{b}	functions.  NULL on failure.  Can fail if out of memory or supplied@{ub}
@{b}	parameters are not legal.@{ub}

@{b}	On success the DCTVCvtHandle structure is initialized as follows:@{ub}
    (see libraries/dctv.h for a more complete explanation of each field)

	Red,
	Green,
	Blue - If DCTVCVTF_CustomRGBBuf isn't set, these point to allocated
	    24-bit RGB line buffer, Width bytes wide.  The buffers are
	    initialized to zero.

	    If DCTVCVTF_CustomRGBBuf is set, these are set to NULL and
	    the client is expected to set these pointers prior to calling
	    @{"CvtDCTVLine()" Link "CvtDCTVLine()"}.

	BitMap - BitMap pointer passed to AllocDCTVCvtTagList().

	Width,
	Height - Values from DCTVCVTA_Width and DCTVCVTA_Height or derived
	    from BitMap.

	ImageBounds - Computed from Width, Height and Modes.

	ColorTable,
	NColors - Palette information for BitMap Depth.  For
	    DCTVCVTT_RGBtoDCTV this is the palette supplied by dctv.library
	    for the output BitMap.  For DCTVCVTT_DCTVtoRGB, this is the
	    array supplied by DCTVCVTA_ColorTable.

	NDelayLines - Initialized depending on type and flags.

	SrcLineNum - Initialized to 0 (as set by @{"InitDCTVCvt()" Link "InitDCTVCvt()"}).

	DstLineNum - Initialized to -NDelayLines (as set by @{"InitDCTVCvt()" Link "InitDCTVCvt()"}).

NOTE
@{b}	V1 @{"AllocDCTVCvt()" Link "AllocDCTVCvt()"} was documented as tolerating a BitMap with the@{ub}
@{b}	BitMap->Planes[] array not initialized.  This practice is not@{ub}
@{b}	recommended and will probably break in the future.@{ub}

SEE ALSO
@{b}	@{"AllocDCTVCvtTags()" Link "AllocDCTVCvtTags()"}, @{"FreeDCTVCvt()" Link "FreeDCTVCvt()"}, @{"CvtDCTVLine()" Link "CvtDCTVLine()"}, libraries/dctv.h@{ub}
@EndNode

@Node "AllocDCTVCvtTags()" "dctv.library/AllocDCTVCvtTags"

NAME
@{b}	AllocDCTVCvtTags -- Varargs version of @{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}. (V3)@{ub}

SYNOPSIS
@{b}	struct DCTVCvtHandle *AllocDCTVCvtTagList@{ub}
	    (struct BitMap *BitMap, Tag tag1, ...)

FUNCTION
@{b}	Varargs version of AllocCvtTagList().  See @{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"} for@{ub}
@{b}	complete description.@{ub}

INPUTS
@{b}	BitMap - BitMap arg for AllocDCTVCvtTagList().@{ub}
@{b}	Tag1... - TagItem array on the stack to be passed to@{ub}
	@{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}.

RESULTS
@{b}	Pointer to initialized DCTVCvtHandle for use with other conversion@{ub}
@{b}	functions.  NULL on failure.@{ub}

NOTE
    16-bit integer users:  be careful to cast integer tag data to 32-bits.
@{b}	For example:@{ub}

@{b}	AllocDCTVCvtTags ( bm,@{ub}
		DCTVCVTA_Type,	 (ULONG)DCVTCVTT_RGBtoDCTV,
		DCTVCVTA_Width,  (ULONG)width,
		DCTVCVTA_Height, (ULONG)height,
		DCTVCVTA_Flags,  (ULONG)DCTVCVTF_Filter | DCTVCVTF_Lace,
		TAG_END );

SEE ALSO
@{b}	@{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}, @{"FreeDCTVCvt()" Link "FreeDCTVCvt()"}, @{"CvtDCTVLine()" Link "CvtDCTVLine()"}, libraries/dctv.h@{ub}
@EndNode

@Node "CvtDCTVLine()" "dctv.library/CvtDCTVLine"

NAME
@{b}	CvtDCTVLine -- Convert a line.@{ub}

SYNOPSIS
@{b}	void CvtDCTVLine (struct DCTVCvtHandle *Handle)@{ub}
				   a0

FUNCTION
@{b}	Converts a line as described below.@{ub}

@{b}	NOTE: All references to SrcLineNum and DstLineNum values below are@{ub}
@{b}	the values before calling CvtDCTVLine().@{ub}

@{b}	DCTVCVTT_RGBtoDCTV - Converts the RGB data in the Handle's RGB line@{ub}
	buffers to DCTV.  Assumes that the buffers contain data for
	SrcLineNum and will generate the BitMap line indexed by DstLineNum.

	The source RGB line buffer is only read when SrcLineNum is in the
	vertical range of ImageBounds.	Otherwise it is ignored.  Pixels
	outside the range of ImageBounds are ignored.

	Destination BitMap data is only emitted for values of DstLineNum
	in the range of 0..Height-1.  The BitMap is not affected for
	DstLineNum values outside this range.

	The contents of the RGB line buffer are not affected by this
	function.

@{b}	DCTVCVTT_DCTVtoRGB - Converts the DCTV display BitMap line indexed by@{ub}
	SrcLineNum to the RGB line buffer.  The resulting RGB data is for
	DstLineNum.

	Source BitMap data is only read for SrcLineNum values in the
	vertical range of ImageBounds.

	Destination RGB data is only emitted for DstLineNum values in the
	range of 0..Height-1.  Pixels outside the ImageBounds rectangle
	are emitted as black.

	The BitMap is not affected by this function.

@{b}	SrcLineNum and DstLineNum are incremented after processing the line.@{ub}

@{b}	CvtDCTVLine() should be called until DstLineNum >= Height in order@{ub}
@{b}	to convert the entire image (see example below) when NDelayLines@{ub}
@{b}	is non-zero.  Be careful to avoid overindexing your buffers.@{ub}

INPUTS
@{b}	Handle - DCTVCvtHandle returned by @{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}.  Note to@{ub}
	DCTVCVTF_CustomRGBBuf users:  the RGB line buffer pointers must
	point to a valid buffer by the time of this call (i.e. non-NULL)
	for line number ranges that would access the RGB line buffer
	(see above for when this happens).

RESULTS
@{b}	Outputs BitMap or RGB data (depending on conversion type) for line@{ub}
@{b}	DstLineNum when DstLineNum is in the range of 0 <= DstLineNum < Height@{ub}
@{b}	prior to call.@{ub}

@{b}	Increments SrcLineNum and DstLineNum.@{ub}

EXAMPLE
@{b}	while (cvt->DstLineNum < cvt->Height) {@{ub}
	renderline (cvt);           /* Render a line of the gradient to
				       DCTVCvtHandle RGB line buffer.
				       This function must be smart enough
				       to deal w/ SrcLineNum >= Height. */

	CvtDCTVLine (cvt);          /* Convert the line in the line buffer
				       to DCTV display data. Results in
				       rendering a line of the BitMap. */
    }

SEE ALSO
@{b}	@{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}, @{"InitDCTVCvt()" Link "InitDCTVCvt()"}, libraries/dctv.h@{ub}
@EndNode

@Node "DCTVCvtLine()" "dctv.library/DCTVCvtLine"

NAME
@{b}	DCTVCvtLine -- Old name for CvtDCTVLine().@{ub}

SYNOPSIS
@{b}	void DCTVCvtLine (struct DCTVCvtHandle *Handle)@{ub}
				   a0

FUNCTION
@{b}	V1 name for @{"CvtDCTVLine()" Link "CvtDCTVLine()"}.  This is the same library vector with a new@{ub}
@{b}	name so it is completely run-time compatible with old software and V1@{ub}
@{b}	of dctv.library.@{ub}

@{b}	There is a #define in clib/dctv_protos.h to translate the old name to@{ub}
@{b}	the new name.  Also dctv.lib contains glue functions and LVOs for both@{ub}
@{b}	names.@{ub}

@{b}	Use @{"CvtDCTVLine()" Link "CvtDCTVLine()"} from now on.@{ub}

SEE ALSO
@{b}	CvtDCTVLine()@{ub}
@EndNode

@Node "DCTVFormat()" "dctv.library/DCTVFormat"

NAME
@{b}	DCTVFormat -- Old name for FormatDCTV().@{ub}

SYNOPSIS
@{b}	void DCTVFormat (struct DCTVCvtHandle *Handle)@{ub}
				   a0

FUNCTION
@{b}	V1 name for @{"FormatDCTV()" Link "FormatDCTV()"}.  This is the same library vector with a new@{ub}
@{b}	name so it is completely run-time compatible with old software and V1@{ub}
@{b}	of dctv.library.@{ub}

@{b}	There is a #define in clib/dctv_protos.h to translate the old name to@{ub}
@{b}	the new name.  Also dctv.lib contains glue functions and LVOs for both@{ub}
@{b}	names.@{ub}

@{b}	Use @{"FormatDCTV()" Link "FormatDCTV()"} from now on.@{ub}

SEE ALSO
@{b}	FormatDCTV()@{ub}
@EndNode

@Node "FormatDCTV()" "dctv.library/FormatDCTV"

NAME
@{b}	FormatDCTV -- Format BitMap for DCTV display.@{ub}

SYNOPSIS
@{b}	void FormatDCTV (struct DCTVCvtHandle *Handle)@{ub}
				   a0

FUNCTION
@{b}	Formats the Handle's BitMap for a black DCTV display.  This is useful@{ub}
@{b}	if you wish to display the conversion process while in progress.@{ub}

@{b}	Only use with a full-screen BitMap in a DCTVCVTT_RGBtoDCTV conversion@{ub}
@{b}	environment.@{ub}

INPUTS
@{b}	Handle - DCTVCvtHandle returned by AllocDCTVCvtTagList().@{ub}

RESULTS
@{b}	Formatted BitMap.@{ub}

SEE ALSO
@{b}	AllocDCTVCvtTagList()@{ub}
@EndNode

@Node "FreeDCTVCvt()" "dctv.library/FreeDCTVCvt"

NAME
@{b}	FreeDCTVCvt -- Free conversion environment.@{ub}

SYNOPSIS
@{b}	void FreeDCTVCvt (struct DCTVCvtHandle *Handle)@{ub}
				   a0

FUNCTION
@{b}	Frees a DCTVCvtHandle allocated by AllocDCTVCvtTagList().@{ub}

INPUTS
@{b}	Handle - DCTVCvtHandle returned by AllocDCTVCvtTagList().@{ub}

RESULTS
@{b}	None.@{ub}

SEE ALSO
@{b}	AllocDCTVCvtTagList()@{ub}
@EndNode

@Node "InitDCTVCvt()" "dctv.library/InitDCTVCvt"

NAME
@{b}	InitDCTVCvt -- Init conversion environment for frame.@{ub}

SYNOPSIS
@{b}	void InitDCTVCvt (struct DCTVCvtHandle *Handle)@{ub}
				   a0

FUNCTION
@{b}	Initializes line numbers for a new frame (image).  This is done@{ub}
@{b}	automatically by @{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}.  Use it if you need to process@{ub}
@{b}	multiple frames using the same DCTVCvtHandle.@{ub}

@{b}	This function does not initialize the RGB line buffer data or BitMap@{ub}
@{b}	data in any way.@{ub}

@{b}	Also, there is no provision to change image dimensions, BitMap, or any@{ub}
@{b}	other parameter of a conversion environment.@{ub}

INPUTS
@{b}	Handle - DCTVCvtHandle returned by AllocDCTVCvtTagList().@{ub}

RESULTS
@{b}	DCTVCvtHandle fields are initialized as follows:@{ub}
	Handle->SrcLineNum = 0
	Handle->DstLineNum = -Handle->NDelayLines

SEE ALSO
@{b}	@{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}, FormatDCTV()@{ub}
@EndNode

@Node "ReadDCTVPixel()" "dctv.library/ReadDCTVPixel"

NAME
@{b}	ReadDCTVPixel -- Get 24-bit RGB value of a pixel from a DCTV display@{ub}
		     BitMap. (V3)

SYNOPSIS
@{b}	ULONG ReadDCTVPixel (struct DCTVCvtHandle *Handle, LONG x, LONG y)@{ub}
				      a0		 d0	 d1

FUNCTION
@{b}	Returns 24-bit RGB value for the specified pixel in a@{ub}
@{b}	DCTVCVTT_DCTVtoRGB environment in the following format 32-bit format:@{ub}

	xxxxxxxx rrrrrrrr gggggggg bbbbbbbb

@{b}	where the most significant byte value is undefined.@{ub}

@{b}	Returns 0 for pixels outside of ImageBounds.@{ub}

INPUTS
@{b}	Handle - DCTVCvtHandle returned by @{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}.  The RGB@{ub}
	line buffers are not used by this function and may be NULL
	if DCTVCVTF_CustomRGBBuf was specified.
@{b}	x, y - Pixel to examine using the coordinate system of the BitMap.@{ub}

RESULTS
    24-bit right-justifed RGB value or 0.

NOTE
@{b}	For the sake of speed, this function does less horizontal filtering@{ub}
@{b}	than @{"CvtDCTVLine()" Link "CvtDCTVLine()"} and therefore yields slightly different results.@{ub}
@{b}	The most visible difference is that sharp vertical edges in the DCTV@{ub}
@{b}	image get a bit "zippered" when converted to RGB using@{ub}
@{b}	ReadDCTVPixel().  @{"CvtDCTVLine()" Link "CvtDCTVLine()"} typically makes smoother RGB images.@{ub}

SEE ALSO
@{b}	@{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}, @{"CvtDCTVLine()" Link "CvtDCTVLine()"}, libraries/dctv.h@{ub}
@EndNode

@Node "SetDCTVColorTable()" "dctv.library/SetDCTVColorTable"

NAME
@{b}	SetDCTVColorTable -- Set mid-BitMap palette change for DCTV->RGB@{ub}
			 conversion. (V3)

SYNOPSIS
@{b}	void SetDCTVColorTable (struct DCTVCvtHandle *Handle,@{ub}
					 a0

			    UWORD *ColorTable)
				     a1

FUNCTION
@{b}	Replaces the Handle's ColorTable for DCTVCVTT_DCTVtoRGB conversions.@{ub}
@{b}	This can be used to supply a mid-screen palette change for the source@{ub}
@{b}	DCTV display BitMap.  This function is of limited usefulness, but is@{ub}
@{b}	essential for a couple of things:@{ub}
	. converting the DCTVPaint control panel to 24-bit RGB.
	. handling PCHG chunks in a DCTV display ILBM.

INPUTS
@{b}	Handle - DCTVCvtHandle returned by AllocDCTVCvtTagList().@{ub}

@{b}	ColorTable - RGB4 UWORD array containing NColors (1<<BitMap->Depth)@{ub}
	entries.  This array must remain valid until it is replaced with
	another call to SetDCTVColorTable() or the conversion environment
	is freed.

RESULTS
@{b}	Updates Handle->ColorTable.@{ub}

NOTE
@{b}	This function is ignored for DCTVCVTT_RGBtoDCTV.@{ub}

SEE ALSO
@{b}	@{"AllocDCTVCvtTagList()" Link "AllocDCTVCvtTagList()"}, libraries/dctv.h@{ub}
@EndNode

@Node "TestDCTVSignature()" "dctv.library/TestDCTVSignature"

NAME
@{b}	TestDCTVSignature -- Check a BitMap for DCTV signature.@{ub}

SYNOPSIS
@{b}	BOOL TestDCTVSignature (struct BitMap *BitMap)@{ub}
				     a0

FUNCTION
@{b}	Checks the top line of the supplied BitMap for the DCTV signature.@{ub}
@{b}	This signature must appear at the top of all DCTV pictures.  This@{ub}
@{b}	function provides a way of determining if a picture, possibly loaded@{ub}
@{b}	from an ILBM, is a DCTV display picture.@{ub}

INPUTS
@{b}	BitMap - BitMap to check.  Planes[] data does not need to be in@{ub}
	chip memory for this function.

RESULTS
@{b}	TRUE (non-zero) if the top line of the BitMap contains a DCTV@{ub}
@{b}	signature.  FALSE otherwise.@{ub}

SEE ALSO
@EndNode

