[FFmpeg-devel] [PATCH] CrystalHD decoder support v3

Diego Biurrun diego
Tue Feb 1 08:08:12 CET 2011


On Mon, Jan 31, 2011 at 09:35:50PM -0800, Philip Langdale wrote:
> On Mon, 31 Jan 2011 23:17:31 +0100
> Diego Biurrun <diego at biurrun.de> wrote:
> 
> > On Sun, Jan 30, 2011 at 06:53:08PM -0800, Philip Langdale wrote:
> > > 
> > > --- /dev/null
> > > +++ b/libavcodec/crystalhd.c
> > > @@ -0,0 +1,903 @@
> > > +static inline int extract_sps_pps_from_avcc(CHDContext *priv,
> > > +                                            uint8_t *data,
> > > +                                            uint32_t data_size)
> > > +{
> > > +    int profile;
> > > +    unsigned int nal_size;
> > > +    unsigned int num_sps, num_pps;
> > > +
> > > +    if (*data == 1) {
> > > +        priv->is_nal = 1;
> > > +        priv->nal_length_size = (data[4] & 0x03) + 1;
> > > +    } else {
> > > +        priv->is_nal = 0;
> > > +        priv->nal_length_size = 4;
> > > +        return 0;
> > 
> > nit: align the =, same in other places
> 
> In the case of these formatting items, can I assume that vp8.c is a
> valid example? 

Yes.  In general you will earn extra good karma if things like

  format.FGTEnable = FALSE;
  format.Progressive = TRUE;
  format.OptFlags = 0x80000000 | vdecFrameRate59_94 | 0x40;
  format.width = avctx->width;
  format.height = avctx->height;

are formatted like this

  format.FGTEnable   = FALSE;
  format.Progressive = TRUE;
  format.OptFlags    = 0x80000000 | vdecFrameRate59_94 | 0x40;
  format.width       = avctx->width;
  format.height      = avctx->height;

Diego



More information about the ffmpeg-devel mailing list