[FFmpeg-devel] [PATCH] Add DPX decoder
Jimmy Christensen
jimmy
Wed May 6 16:15:20 CEST 2009
----- "Diego Biurrun" <diego at biurrun.de> wrote:
> On Wed, May 06, 2009 at 02:44:34PM +0100, Jimmy Christensen wrote:
> >
> > Revision of the patch with better formatting and re-arranged the
> CODEC id.
>
> Please don't top-post (not even yourself) and trim your quotes.
> Also,
> your mailer sometimes breaks threads.
>
Should be fixed now. Thx :)
> > --- libavcodec/dpx.c (revision 0)
> > +++ libavcodec/dpx.c (revision 0)
> > @@ -0,0 +1,173 @@
> > +
> > +struct RGBField
> > +{
> > +
> > +typedef struct DPXContext
> > +{
>
> K&R says { on the same line for struct declarations, this was correct
> before.
>
Like I said earlier it was largely based on the TGA decoder. Some copy pasting was used :)
> > + const uint8_t *headerBuffer = avpkt->data;
> > + const uint8_t *buf = avpkt->data;
> > + int buf_size = avpkt->size;
> > + DPXContext * const s = avctx->priv_data;
> > + AVFrame *picture = data;
> > + AVFrame * const p= (AVFrame*)&s->picture;
> > + uint8_t *ptr;
> > + struct RGBField rgbField;
>
> I repeat: vertical alignment, same in other places.
>
> > + if(magic_num == 0x53445058) {
> > + endian = 0x0;
> > + }
>
> I repeat: useless {}.
Ah, thought you meant the magic enum thing. Never liked if's without {}, will remove them.
>
> > + if(endian == 0x0) {
>
> I repeat: K&R mandates spaces between if/for/while/switch and (.
>
Sorry, not too familiar with K&R.
> > + avctx->coded_frame= (AVFrame*)&s->picture;
>
> spaces around =
>
> Diego
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
--
Best Regards
Jimmy Christensen
Developer
Ghost A/S
More information about the ffmpeg-devel
mailing list