[Ffmpeg-devel] [PATCH] V.Flash PTX decoder
Ivo
ivop
Sat Apr 28 23:50:04 CEST 2007
Hi,
On Saturday 28 April 2007 23:12, Michael Niedermayer wrote:
> On Sat, Apr 28, 2007 at 06:49:18PM +0200, Ivo wrote:
> > 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.
> [...]
>
> > + 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
Fixed.
> > +
> > + ptr = p->data[0];
> > + stride = p->linesize[0];
> >
> > + Bpp = 2;
>
> hmm, why B instead of b?
I chose Bpp (bytes per pixel) to distinguish it from bpp (bits per pixel). I
could change it to bytes_per_pixel though if that eliminates all confusion.
Or add a doxygen comment?
--Ivo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ptx-decoder.patch
Type: text/x-diff
Size: 4981 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070428/e60b1954/attachment.patch>
More information about the ffmpeg-devel
mailing list