[Ffmpeg-devel] [PATCH] V.Flash PTX decoder
Michael Niedermayer
michaelni
Sat Apr 28 23:12:55 CEST 2007
Hi
On Sat, Apr 28, 2007 at 06:49:18PM +0200, Ivo wrote:
> Hi,
>
> While I was reading Mike Melanson's blog, I stumbled upon this article about
> V.Flash V.disc cartridges. I decided to give the .ptx files a try and they
> are just RGB555 files with a 44 byte header. Turns out there are actually
> three (and room for four) images contained in one image.
>
> Mike's blog entry:
> http://multimedia.cx/eggs/vdisc-analysis/
>
> The output of _114kw_pic.ptx:
> http://ivop.free.fr/ptx/114kw_pic.png
>
> Due to the limitted number of samples, I was unable to figure out all the
> header fields, but enough to read and display/convert the images. Looks
> like the width and height are repeated in the header and the few other
> non-zero bytes might refer to the colorspace or some yet unknown flags. I
> need more samples.
>
> I also noticed that the most significant bit of each pixel is used as a
> mask, probably for internal use by the V.Flash console. The bit is set if
> the pixel is part of one of the four images. It could be seen as a 1-bit
> alpha channel.
[...]
> + if (avctx->get_buffer(avctx, p) < 0) {
> + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
> + return -1;
> + }
> +
> + p->pict_type = FF_I_TYPE;
> + p->key_frame = 1;
> + p->reference = 0;
this must be set before get_buffer() though its actually unneeded as 0 is
default, also key_frame=1 is default so that too isnt needed
> +
> + ptr = p->data[0];
> + stride = p->linesize[0];
> + Bpp = 2;
hmm, why B instead of b?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070428/4707b97f/attachment.pgp>
More information about the ffmpeg-devel
mailing list