This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6678: jpeg2000, is it a must to copy 8-bit data into 16-bit buffer when reading input bit-stream



Hello,

JPEG2000 Codec:C66x_j2e_01_00_03_00_ELF,c6678 + ccs5.2

In the  test application,is it a must  to copy 8-bit data into 16-bit buffer when reading the input bit-stream into the application input buffer ,and why?

for example,

Word16 *ptrD;

ptrD = imgBuf;

// copy 8-bit data into 16-bit buffer
if (bytes_per_comp == 1) {
for (i=0; i < imageLen; i++) {
*ptrD = (Word16) ((UWord8)fgetc(inFile));
ptrD = pointer_incr(ptrD,1);