[FFmpeg-devel] [PATCH] Native VP9 decoder.
Ronald S. Bultje
rsbultje at gmail.com
Sun Sep 29 21:21:52 CEST 2013
Hi,
On Sun, Sep 29, 2013 at 1:06 PM, Paul B Mahol <onemda at gmail.com> wrote:
> On 9/21/13, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> > From: "Ronald S. Bultje" <rsbultje at gmail.com>
> >
> > Authors: Ronald S. Bultje <rsbultje gmail com>,
> > Clement Boesch <u pkh me>
>
> [...]
>
> > --- a/doc/general.texi
> > +++ b/doc/general.texi
> > @@ -94,7 +94,7 @@ Then pass @code{--enable-libtwolame} to configure to
> > enable it.
> >
> > @section libvpx
> >
> > -FFmpeg can make use of the libvpx library for VP8 encoding.
> > +FFmpeg can make use of the libvpx library for VP8/VP9 encoding.
>
> nit+++++++: Unrelated but whatever/who cares.
>
> >
> > Go to @url{http://www.webmproject.org/} and follow the instructions for
> > installing the library. Then pass @code{--enable-libvpx} to configure to
> > @@ -676,6 +676,8 @@ following image formats are supported:
> > @tab fourcc: VP60,VP61,VP62
> > @item VP8 @tab E @tab X
> > @tab fourcc: VP80, encoding supported through external library
> libvpx
> > + at item VP9 @tab E @tab X
> > + @tab encoding supported through external library libvpx
>
> nit++++++++: ditto
>
> [...]
>
> > +
> > + return p <= 128 ? 1 + inv_recenter_nonneg(inv_map_table[d], p - 1) :
> > + 255 - inv_recenter_nonneg(inv_map_table[d], 255 -
> p);
> > +}
> > +
> > +#define VP9_SYNCCODE 0x498342
> > +static int decode_frame_header(AVCodecContext *ctx,
> > + const uint8_t *data, int size)
> > +{
> > + VP9Context *s = ctx->priv_data;
> > + int c, i, j, k, l, m, n, w, h, max, size2, res, sharp;
> > + const uint8_t *data2;
> > +
> > + /* general header */
> > + init_get_bits8(&s->gb, data, size);
>
> nit+: check return value
>
Fixed.
> + if (get_bits(&s->gb, 2) != 0x2) // frame marker
> > + return AVERROR_INVALIDDATA;
> > + s->profile = get_bits1(&s->gb);
> > + if (get_bits1(&s->gb)) // reserved bit
> > + return AVERROR_INVALIDDATA;
> > + if (get_bits1(&s->gb)) {
> > + int ref = get_bits(&s->gb, 3);
> > + av_log(ctx, AV_LOG_ERROR, "Directly show frame %d\n", ref);
> > + return -1;
>
> meaningful error code
Fixed.
Ronald
More information about the ffmpeg-devel
mailing list