2 * HW decode acceleration through CUVID
4 * Copyright (c) 2016 Anton Khirnov
6 * This file is part of Libav.
8 * Libav is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * Libav is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with Libav; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 #ifndef AVCODEC_CUVID_H
24 #define AVCODEC_CUVID_H
29 #include "libavutil/buffer.h"
30 #include "libavutil/frame.h"
34 typedef struct CUVIDFrame {
37 AVBufferRef *decoder_ref;
40 typedef struct CUVIDContext {
41 CUVIDPICPARAMS pic_params;
43 AVBufferPool *decoder_pool;
45 AVBufferRef *decoder_ref;
49 unsigned int bitstream_allocated;
51 unsigned *slice_offsets;
53 unsigned int slice_offsets_allocated;
56 int ff_cuvid_decode_init(AVCodecContext *avctx, unsigned int dpb_size);
57 int ff_cuvid_decode_uninit(AVCodecContext *avctx);
58 int ff_cuvid_start_frame(AVCodecContext *avctx, AVFrame *frame);
59 int ff_cuvid_end_frame(AVCodecContext *avctx);
61 #endif /* AVCODEC_CUVID_H */