+ yuv2rgb15(blk, (u16 *)mdec.block_buffer);
+ memcpy(image, mdec.block_buffer, size);
+ mdec.block_buffer_pos = mdec.block_buffer + size;
+ }
+
+ } else {
+ /* 24 bits decoding
+ * block are 16 px * 16 px, each px are 3 byte
+ */
+
+ /* there is some partial block pending ? */
+ if(mdec.block_buffer_pos != 0) {
+ int n = mdec.block_buffer - mdec.block_buffer_pos + SIZE_OF_24B_BLOCK;
+ /* TODO: check if partial block do not larger than size */
+ memcpy(image, mdec.block_buffer_pos, n);
+ image += n;
+ size -= n;
+ mdec.block_buffer_pos = 0;
+ }
+
+ while(size >= SIZE_OF_24B_BLOCK) {
+ mdec.rl = rl2blk(blk, mdec.rl);
+ yuv2rgb24(blk, image);
+ image += SIZE_OF_24B_BLOCK;
+ size -= SIZE_OF_24B_BLOCK;