FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
qsvenc.h
Go to the documentation of this file.
1 /*
2  * Intel MediaSDK QSV encoder utility functions
3  *
4  * copyright (c) 2013 Yukinori Yamazoe
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg 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.
12  *
13  * FFmpeg 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.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef AVCODEC_QSVENC_H
24 #define AVCODEC_QSVENC_H
25 
26 #include <stdint.h>
27 #include <sys/types.h>
28 
29 #include <mfx/mfxvideo.h>
30 
31 #include "libavutil/avutil.h"
32 #include "libavutil/fifo.h"
33 
34 #include "avcodec.h"
35 #include "qsv_internal.h"
36 
37 typedef struct QSVEncContext {
39 
41 
42  mfxSession session;
44 
48 
49  mfxVideoParam param;
50  mfxFrameAllocRequest req;
51 
52  mfxExtCodingOption extco;
53 #if QSV_VERSION_ATLEAST(1,6)
54  mfxExtCodingOption2 extco2;
55  mfxExtBuffer *extparam[2];
56 #else
57  mfxExtBuffer *extparam[1];
58 #endif
59 
61 
62  // options set by the caller
65  int profile;
66  int preset;
73 
74  char *load_plugins;
76 
78 
80  AVPacket *pkt, const AVFrame *frame, int *got_packet);
81 
83 
84 #endif /* AVCODEC_QSVENC_H */
This structure describes decoded (raw) audio or video data.
Definition: frame.h:171
mfxFrameAllocRequest req
Definition: qsvenc.h:50
int avbr_accuracy
Definition: qsvenc.h:67
QSVFrame * work_frames
Definition: qsvenc.h:40
int look_ahead_depth
Definition: qsvenc.h:71
external API header
int packet_size
Definition: qsvenc.h:45
static AVPacket pkt
int look_ahead
Definition: qsvenc.h:70
mfxVideoParam param
Definition: qsvenc.h:49
AVFifoBuffer * async_fifo
Definition: qsvenc.h:60
mfxExtCodingOption extco
Definition: qsvenc.h:52
static AVFrame * frame
int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: qsvenc.c:417
char * load_plugins
Definition: qsvenc.h:74
Libavcodec external API header.
int ff_qsv_enc_close(AVCodecContext *avctx, QSVEncContext *q)
Definition: qsvenc.c:536
AVCodecContext * avctx
Definition: qsvenc.h:38
int idr_interval
Definition: qsvenc.h:64
int preset
Definition: qsvenc.h:66
int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q)
Definition: qsvenc.c:235
int async_depth
Definition: qsvenc.h:63
int width_align
Definition: qsvenc.h:46
main external API structure.
Definition: avcodec.h:1502
int profile
Definition: qsvenc.h:65
a very simple circular buffer FIFO implementation
int height_align
Definition: qsvenc.h:47
QSVSession internal_qs
Definition: qsvenc.h:43
int avbr_convergence
Definition: qsvenc.h:68
int look_ahead_downsampling
Definition: qsvenc.h:72
mfxExtBuffer * extparam[1]
Definition: qsvenc.h:57
This structure stores compressed data.
Definition: avcodec.h:1400
mfxSession session
Definition: qsvenc.h:42
int pic_timing_sei
Definition: qsvenc.h:69