FFmpeg  4.0
Data Structures | Macros | Functions | Variables
vaapi_encode_vp8.c File Reference
#include <va/va.h>
#include <va/va_enc_vp8.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "libavutil/pixfmt.h"
#include "avcodec.h"
#include "internal.h"
#include "vaapi_encode.h"
#include "vp8.h"

Go to the source code of this file.

Data Structures

struct  VAAPIEncodeVP8Context
 
struct  VAAPIEncodeVP8Options
 

Macros

#define vseq_var(name)   vseq->name, name
 
#define vseq_field(name)   vseq->seq_fields.bits.name, name
 
#define vpic_var(name)   vpic->name, name
 
#define vpic_field(name)   vpic->pic_fields.bits.name, name
 
#define OFFSET(x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
 

Functions

static int vaapi_encode_vp8_init_sequence_params (AVCodecContext *avctx)
 
static int vaapi_encode_vp8_init_picture_params (AVCodecContext *avctx, VAAPIEncodePicture *pic)
 
static int vaapi_encode_vp8_write_quant_table (AVCodecContext *avctx, VAAPIEncodePicture *pic, int index, int *type, char *data, size_t *data_len)
 
static av_cold int vaapi_encode_vp8_configure (AVCodecContext *avctx)
 
static av_cold int vaapi_encode_vp8_init (AVCodecContext *avctx)
 

Variables

static const VAAPIEncodeType vaapi_encode_type_vp8
 
static const AVOption vaapi_encode_vp8_options []
 
static const AVCodecDefault vaapi_encode_vp8_defaults []
 
static const AVClass vaapi_encode_vp8_class
 
AVCodec ff_vp8_vaapi_encoder
 

Macro Definition Documentation

◆ vseq_var

#define vseq_var (   name)    vseq->name, name

Definition at line 45 of file vaapi_encode_vp8.c.

◆ vseq_field

#define vseq_field (   name)    vseq->seq_fields.bits.name, name

Definition at line 46 of file vaapi_encode_vp8.c.

◆ vpic_var

#define vpic_var (   name)    vpic->name, name

Definition at line 47 of file vaapi_encode_vp8.c.

◆ vpic_field

#define vpic_field (   name)    vpic->pic_fields.bits.name, name

Definition at line 48 of file vaapi_encode_vp8.c.

◆ OFFSET

#define OFFSET (   x)
Value:

Definition at line 226 of file vaapi_encode_vp8.c.

◆ FLAGS

Definition at line 228 of file vaapi_encode_vp8.c.

Function Documentation

◆ vaapi_encode_vp8_init_sequence_params()

static int vaapi_encode_vp8_init_sequence_params ( AVCodecContext avctx)
static

Definition at line 51 of file vaapi_encode_vp8.c.

◆ vaapi_encode_vp8_init_picture_params()

static int vaapi_encode_vp8_init_picture_params ( AVCodecContext avctx,
VAAPIEncodePicture pic 
)
static

Definition at line 73 of file vaapi_encode_vp8.c.

◆ vaapi_encode_vp8_write_quant_table()

static int vaapi_encode_vp8_write_quant_table ( AVCodecContext avctx,
VAAPIEncodePicture pic,
int  index,
int type,
char *  data,
size_t *  data_len 
)
static

Definition at line 128 of file vaapi_encode_vp8.c.

◆ vaapi_encode_vp8_configure()

static av_cold int vaapi_encode_vp8_configure ( AVCodecContext avctx)
static

Definition at line 160 of file vaapi_encode_vp8.c.

◆ vaapi_encode_vp8_init()

static av_cold int vaapi_encode_vp8_init ( AVCodecContext avctx)
static

Definition at line 191 of file vaapi_encode_vp8.c.

Variable Documentation

◆ vaapi_encode_type_vp8

const VAAPIEncodeType vaapi_encode_type_vp8
static
Initial value:
= {
.priv_data_size = sizeof(VAAPIEncodeVP8Context),
.sequence_params_size = sizeof(VAEncSequenceParameterBufferVP8),
.init_sequence_params = &vaapi_encode_vp8_init_sequence_params,
.picture_params_size = sizeof(VAEncPictureParameterBufferVP8),
.init_picture_params = &vaapi_encode_vp8_init_picture_params,
.write_extra_buffer = &vaapi_encode_vp8_write_quant_table,
}
static int vaapi_encode_vp8_write_quant_table(AVCodecContext *avctx, VAAPIEncodePicture *pic, int index, int *type, char *data, size_t *data_len)
static int vaapi_encode_vp8_init_sequence_params(AVCodecContext *avctx)
static av_cold int vaapi_encode_vp8_configure(AVCodecContext *avctx)
static int vaapi_encode_vp8_init_picture_params(AVCodecContext *avctx, VAAPIEncodePicture *pic)

Definition at line 177 of file vaapi_encode_vp8.c.

Referenced by vaapi_encode_vp8_init().

◆ vaapi_encode_vp8_options

const AVOption vaapi_encode_vp8_options[]
static
Initial value:
= {
{ "loop_filter_level", "Loop filter level",
OFFSET(loop_filter_level), AV_OPT_TYPE_INT, { .i64 = 16 }, 0, 63, FLAGS },
{ "loop_filter_sharpness", "Loop filter sharpness",
OFFSET(loop_filter_sharpness), AV_OPT_TYPE_INT, { .i64 = 4 }, 0, 15, FLAGS },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
#define FLAGS

Definition at line 229 of file vaapi_encode_vp8.c.

◆ vaapi_encode_vp8_defaults

const AVCodecDefault vaapi_encode_vp8_defaults[]
static
Initial value:
= {
{ "b", "0" },
{ "bf", "0" },
{ "g", "120" },
{ "global_quality", "40" },
{ NULL },
}
#define NULL
Definition: coverity.c:32

Definition at line 237 of file vaapi_encode_vp8.c.

◆ vaapi_encode_vp8_class

const AVClass vaapi_encode_vp8_class
static
Initial value:
= {
.class_name = "vp8_vaapi",
.item_name = av_default_item_name,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption vaapi_encode_vp8_options[]

Definition at line 245 of file vaapi_encode_vp8.c.

◆ ff_vp8_vaapi_encoder

AVCodec ff_vp8_vaapi_encoder
Initial value:
= {
.name = "vp8_vaapi",
.long_name = NULL_IF_CONFIG_SMALL("VP8 (VAAPI)"),
.priv_data_size = (sizeof(VAAPIEncodeContext) +
.encode2 = &ff_vaapi_encode2,
.priv_class = &vaapi_encode_vp8_class,
.pix_fmts = (const enum AVPixelFormat[]) {
},
.wrapper_name = "vaapi",
}
static const AVCodecDefault vaapi_encode_vp8_defaults[]
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define AV_CODEC_CAP_HARDWARE
Codec is backed by a hardware implementation.
Definition: avcodec.h:1056
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:984
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVCodecDefault defaults[]
Definition: amfenc_h264.c:361
static const AVClass vaapi_encode_vp8_class
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:266
int ff_vaapi_encode2(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *input_image, int *got_packet)
Definition: vaapi_encode.c:853
AVPixelFormat
Pixel format.
Definition: pixfmt.h:60
av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
static av_cold int vaapi_encode_vp8_init(AVCodecContext *avctx)

Definition at line 252 of file vaapi_encode_vp8.c.