[FFmpeg-soc] BFI Decoder

Sisir Koppaka sisir.koppaka at gmail.com
Thu Apr 17 00:15:42 CEST 2008


1 : back chain
      if length is zero, read one more byte of the length AND two
bytes of the offset
       else, read one byte of the offset
      copy (length) dwords from (output - offset) to the output
      (note, that data may overlap, so don't use memmove() function
here, just bare by-dword copying!)

 case 1:                //Back Chain
            if (length == 0) {
                length = bytestream_get_byte(&buf);
                offset = bytestream_get_le16(&buf);
            } else {
                offset = bytestream_get_byte(&buf);
            }
            dst_offset = dst - offset;
            length *= 4;        //Convert dwords to bytes.
            while(length--)
            {
                *dst++ = *dst_offset++;
            }
            av_log(NULL,AV_LOG_INFO, "\n[DECODER] Back Chain.");
            break;

Logically, it doesn't seem to be wrong to me....is it wrong?

I did ./ffmpeg -i file.bfi images/%04d.png but still I only get a blue
frame, I think the first frame is not decoding...it still segfaults while
doing decoding a back chain from the av_logs...
-----------------
Sisir Koppaka



More information about the FFmpeg-soc mailing list