Samsung S3C6400X User Manual page 726

Table of Contents

Advertisement

MULTI-FORMAT VIDEO CODEC
S3C6400X RISC MICROPROCESSOR
In decoder case, host writes the bit stream to be decoded then BIT processor reads the bit stream. In this case,
the bit stream overwriting or underflow may occur and if it occurs, decoding will fail. To prevent overwriting or
underflow, current bit stream read/write pointer must be exchanged between host and BIT processor. BIT
processor writes current read pointer of ring buffer to BitStreamRdPtr register and host must write current write
pointer of ring buffer to BitStreamWrPtr register. BIT processor checks the bit buffer empty(undeflow) status by
comparing current BitStreamRdPtr and BitStreamWrPtr. If no more bit stream data is available to be decoded
(buffer empty status), BIT processor stops bit stream decoding to prevent mis-reading the bit stream and waits
until host write more bit stream data and updates BitStreamWrPtr. Host must check the current BitStreamRdPtr
and BitStreamWrPtr before writing more bit stream data to ring buffer to prevent overwriting bit stream data.
In encoder case, BIT processor and host change the roll, e.g. BIT processor writes the bit stream and host read
the encoded bit stream. Therefore BIT processor writes current write pointer of ring buffer to BitStreamWrPtr
register and host must write current read pointer of ring buffer to BitStreamRdPtr register. BIT processor will wait
writing encoded bit stream data if the ring buffer is full. Therefore next writing will be overwriting the pre-stored
data which is not read by host. Host will wait till reading encoded bit stream data if the ring buffer is empty so next
reading will be reading again pre-read data.
If [BufStsCheckDis] flag in BitStreamCtrl register is "1", the option of bit stream overfow/underflow check by BIT
processor is disabled. Therefore the encoding/decoding operation never stops because of bit stream buffer
status. In this case, the host processor does not need the writing current read/write pointer to
BitStreamRdPtr/BitStreamWrPtr but host guarantee that bit stream overflow/underflow will never occur.
If [BufPicReset] flag is in BitStreamCtrl register is "1", the external bit stream buffer does not operate as a ring
buffer for encoding case only. The encoded bit stream is always written to start of external bit stream buffer at
every end of picture encoding. Therefore, host must read whole encoded bit stream of one picture at completion
of ENC_PIC_RUN command.
If [BufPicFlush] flag in BitStreamCtrl register is "1", all of encoded bit stream data of a picture is written to the
external bit buffer at every end of encoding a picture. The exact byte address is written to BitStreamWrPtr.
The internal bit stream buffer also exists in the BIT processor and is used as a cache between BIT processor core
and external bit stream buffer in SDRAM. Incase of decoding, BIT processor reads the bit stream data from
external bit stream buffer in SDRAM and store to internal bit stream buffer. The real parsing operation is executed
in internal buffer (not external buffer directly) for efficiency. In case of encoding, the encoded bit stream data
stored to internal buffer first then written to external buffer later by chunk. The internal bit stream buffer is
composed of 512 bytes. Therefore, the bit stream data is read from (or written to, for encoding case) external bit
buffer by 512 bytes. The BitStreamRdPtr or BitStreamWrPtr is increased by 512 bytes because internal bit stream
data is read/written by 512 byte chunk only. Therefore at the end of encoding a picture, not all of encoded bit
stream of a picture is written to the external bit buffer. The some amount of last encoded stream data (less than
512 byte) reside in internal bit buffer only and will be flushed later when accumulated encoded data is greater than
512 byte. To get the remaining encoded data at end of encoding sequence, host must execute ENC_SEQ_END
command and BIT processor flush remaining encoded bit stream to external bit buffer. After ENC_SEQ_END
command, BitStreamWrPtr is increased to the exact byte address and host may calculate exact byte size of
encoded bit stream.
Preliminary product information describe products that are in development,
21-100
for which full characterization data and associated errata are not yet available.
Specifications and information herein are subject to change without notice.

Advertisement

Table of Contents
loading

Table of Contents