[FFmpeg-devel] [PATCH][VAAPI][6/6] Add H.264 bitstream decoding (take 21)

Stefano Sabatini stefano.sabatini-lala
Mon Dec 28 10:54:07 CET 2009


On date Monday 2009-12-28 10:19:45 +0100, Gwenole Beauchesne encoded:
[...]
> --- /dev/null
> +++ b/libavcodec/vaapi_h264.c
> @@ -0,0 +1,359 @@
> +/*
> + * H.264 HW decode acceleration through VA API
> + *
> + * Copyright (C) 2008-2009 Splitted-Desktop Systems
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + */
> +
> +#include "vaapi_internal.h"
> +#include "h264.h"
> +
> +/** @file
> + *  This file implements the glue code between FFmpeg's and VA API's
> + *  structures for H.264 decoding.
> + */
> +
> +/** Reconstruct bitstream slice_type. */
> +static int get_slice_type(H264Context *h)
> +{
> +    switch (h->slice_type) {
> +    case FF_P_TYPE:  return 0;
> +    case FF_B_TYPE:  return 1;
> +    case FF_I_TYPE:  return 2;
> +    case FF_SP_TYPE: return 3;
> +    case FF_SI_TYPE: return 4;
> +    default:         return -1;
> +    }
> +}
> +
> +/**
> + * Initialize an empty VA API picture.

Please use third person, here and below.

[...]

Regards.
-- 
FFmpeg = Fierce & Fundamental Minimal Ponderous Exciting God



More information about the ffmpeg-devel mailing list