FFmpeg
Data Structures | Macros | Functions | Variables
vaapi_encode_vp9.c File Reference
#include <va/va.h>
#include <va/va_enc_vp9.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"

Go to the source code of this file.

Data Structures

struct  VAAPIEncodeVP9Picture
 
struct  VAAPIEncodeVP9Context
 

Macros

#define VP9_MAX_QUANT   255
 
#define OFFSET(x)   offsetof(VAAPIEncodeVP9Context, x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
 

Functions

static int vaapi_encode_vp9_init_sequence_params (AVCodecContext *avctx)
 
static int vaapi_encode_vp9_init_picture_params (AVCodecContext *avctx, VAAPIEncodePicture *pic)
 
static av_cold int vaapi_encode_vp9_configure (AVCodecContext *avctx)
 
static av_cold int vaapi_encode_vp9_init (AVCodecContext *avctx)
 

Variables

static const VAAPIEncodeProfile vaapi_encode_vp9_profiles []
 
static const VAAPIEncodeType vaapi_encode_type_vp9
 
static const AVOption vaapi_encode_vp9_options []
 
static const AVCodecDefault vaapi_encode_vp9_defaults []
 
static const AVClass vaapi_encode_vp9_class
 
AVCodec ff_vp9_vaapi_encoder
 

Macro Definition Documentation

#define VP9_MAX_QUANT   255

Definition at line 32 of file vaapi_encode_vp9.c.

Referenced by vaapi_encode_vp9_configure().

#define OFFSET (   x)    offsetof(VAAPIEncodeVP9Context, x)

Definition at line 253 of file vaapi_encode_vp9.c.

Definition at line 254 of file vaapi_encode_vp9.c.

Function Documentation

static int vaapi_encode_vp9_init_sequence_params ( AVCodecContext avctx)
static

Definition at line 53 of file vaapi_encode_vp9.c.

static int vaapi_encode_vp9_init_picture_params ( AVCodecContext avctx,
VAAPIEncodePicture pic 
)
static

Definition at line 77 of file vaapi_encode_vp9.c.

static av_cold int vaapi_encode_vp9_configure ( AVCodecContext avctx)
static

Definition at line 179 of file vaapi_encode_vp9.c.

static av_cold int vaapi_encode_vp9_init ( AVCodecContext avctx)
static

Definition at line 235 of file vaapi_encode_vp9.c.

Variable Documentation

const VAAPIEncodeProfile vaapi_encode_vp9_profiles[]
static
Initial value:
= {
{ FF_PROFILE_VP9_0, 8, 3, 1, 1, VAProfileVP9Profile0 },
{ FF_PROFILE_VP9_2, 10, 3, 1, 1, VAProfileVP9Profile2 },
}
#define FF_PROFILE_VP9_0
Definition: avcodec.h:1942
#define FF_PROFILE_VP9_2
Definition: avcodec.h:1944
#define FF_PROFILE_UNKNOWN
Definition: avcodec.h:1860

Definition at line 210 of file vaapi_encode_vp9.c.

const VAAPIEncodeType vaapi_encode_type_vp9
static
Initial value:
= {
.flags = FLAG_B_PICTURES |
.default_quality = 100,
.picture_priv_data_size = sizeof(VAAPIEncodeVP9Picture),
.sequence_params_size = sizeof(VAEncSequenceParameterBufferVP9),
.init_sequence_params = &vaapi_encode_vp9_init_sequence_params,
.picture_params_size = sizeof(VAEncPictureParameterBufferVP9),
.init_picture_params = &vaapi_encode_vp9_init_picture_params,
}
static int vaapi_encode_vp9_init_picture_params(AVCodecContext *avctx, VAAPIEncodePicture *pic)
static const VAAPIEncodeProfile vaapi_encode_vp9_profiles[]
static av_cold int vaapi_encode_vp9_configure(AVCodecContext *avctx)
static int vaapi_encode_vp9_init_sequence_params(AVCodecContext *avctx)

Definition at line 216 of file vaapi_encode_vp9.c.

Referenced by vaapi_encode_vp9_init().

const AVOption vaapi_encode_vp9_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 FLAGS
#define OFFSET(x)
#define VAAPI_ENCODE_RC_OPTIONS
Definition: vaapi_encode.h:463
#define VAAPI_ENCODE_COMMON_OPTIONS
Definition: vaapi_encode.h:445

Definition at line 255 of file vaapi_encode_vp9.c.

const AVCodecDefault vaapi_encode_vp9_defaults[]
static
Initial value:
= {
{ "b", "0" },
{ "bf", "0" },
{ "g", "250" },
{ "qmin", "-1" },
{ "qmax", "-1" },
{ NULL },
}
#define NULL
Definition: coverity.c:32

Definition at line 266 of file vaapi_encode_vp9.c.

const AVClass vaapi_encode_vp9_class
static
Initial value:
= {
.class_name = "vp9_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:235
static const AVOption vaapi_encode_vp9_options[]

Definition at line 275 of file vaapi_encode_vp9.c.

AVCodec ff_vp9_vaapi_encoder
Initial value:
= {
.name = "vp9_vaapi",
.long_name = NULL_IF_CONFIG_SMALL("VP9 (VAAPI)"),
.priv_data_size = sizeof(VAAPIEncodeVP9Context),
.receive_packet = &ff_vaapi_encode_receive_packet,
.priv_class = &vaapi_encode_vp9_class,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = (const enum AVPixelFormat[]) {
},
.wrapper_name = "vaapi",
}
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:48
static av_cold int vaapi_encode_vp9_init(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define AV_CODEC_CAP_HARDWARE
Codec is backed by a hardware implementation.
Definition: codec.h:150
#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: codec.h:75
static const AVCodecDefault vaapi_encode_vp9_defaults[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:153
static const AVCodecDefault defaults[]
Definition: amfenc_h264.c:361
int ff_vaapi_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
static const AVClass vaapi_encode_vp9_class
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:300
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[]
Definition: vaapi_encode.c:31

Definition at line 282 of file vaapi_encode_vp9.c.