On Wed, 31 Jul 2013 01:51:29 +0200, Luca Barbato <[email protected]> wrote: > --- > avconv.c | 10 ++ > configure | 7 + > libavcodec/Makefile | 4 + > libavcodec/allcodecs.c | 1 + > libavcodec/qsv.c | 380 > +++++++++++++++++++++++++++++++++++++++++++++++++ > libavcodec/qsv.h | 59 ++++++++ > libavcodec/qsv_h264.c | 132 +++++++++++++++++ > 7 files changed, 593 insertions(+) > create mode 100644 libavcodec/qsv.c > create mode 100644 libavcodec/qsv.h > create mode 100644 libavcodec/qsv_h264.c > > diff --git a/libavcodec/qsv.h b/libavcodec/qsv.h > new file mode 100644 > index 0000000..ece0478 > --- /dev/null > +++ b/libavcodec/qsv.h > @@ -0,0 +1,59 @@ > +/* > + * Intel MediaSDK QSV utility functions > + * > + * copyright (c) 2013 Luca Barbato > + * > + * This file is part of Libav. > + * > + * Libav 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. > + * > + * Libav 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 Libav; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA > + */ > + > +#include <stdint.h> > +#include <sys/types.h> > +#include <mfx/mfxvideo.h> > + > +#include "libavutil/avutil.h" > + > +#define QSV_VERSION_MAJOR 1 > +#define QSV_VERSION_MINOR 6 > + > +#define ASYNC_DEPTH_DEFAULT 4 // internal parallelism > +#define SYNC_TIME_DEFAULT 5 * 1000 // 5s > + > + > +typedef struct QSVContext { > + AVClass *class; > + mfxSession session; > + mfxVideoParam param; > + mfxFrameSurface1 *surfaces; > + int64_t *dts; > + int64_t *pts; > + int nb_surfaces; > + mfxSyncPoint sync; > + mfxBitstream bs; > + int wait; > + AVPacketList *pending, *pending_end; > +} QSVContext; > + > +int ff_qsv_error(int mfx_err); > + > +int ff_qsv_init(AVCodecContext *s, QSVContext *q); > + > +int ff_qsv_decode(AVCodecContext *s, QSVContext *q, > + AVFrame *frame, int *got_frame, > + AVPacket *avpkt); > + > +int ff_qsv_flush(QSVContext *q); > +
This is an installed header, unless I'm reading something wrong. If that's intendend, then please use the correct namespace and add documentation. Otherwise make it private. -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
