FFmpeg
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 "codec_internal.h"
#include "vaapi_encode.h"
#include "vp8.h"

Go to the source code of this file.

Data Structures

struct  VAAPIEncodeVP8Context
 

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)   offsetof(VAAPIEncodeVP8Context, 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 VAAPIEncodeProfile vaapi_encode_vp8_profiles []
 
static const VAAPIEncodeType vaapi_encode_type_vp8
 
static const AVOption vaapi_encode_vp8_options []
 
static const FFCodecDefault vaapi_encode_vp8_defaults []
 
static const AVClass vaapi_encode_vp8_class
 
const FFCodec ff_vp8_vaapi_encoder
 

Macro Definition Documentation

◆ vseq_var

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

Definition at line 47 of file vaapi_encode_vp8.c.

◆ vseq_field

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

Definition at line 48 of file vaapi_encode_vp8.c.

◆ vpic_var

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

Definition at line 49 of file vaapi_encode_vp8.c.

◆ vpic_field

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

Definition at line 50 of file vaapi_encode_vp8.c.

◆ OFFSET

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

Definition at line 216 of file vaapi_encode_vp8.c.

◆ FLAGS

Definition at line 217 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 53 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 75 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 129 of file vaapi_encode_vp8.c.

◆ vaapi_encode_vp8_configure()

static av_cold int vaapi_encode_vp8_configure ( AVCodecContext avctx)
static

Definition at line 162 of file vaapi_encode_vp8.c.

◆ vaapi_encode_vp8_init()

static av_cold int vaapi_encode_vp8_init ( AVCodecContext avctx)
static

Definition at line 202 of file vaapi_encode_vp8.c.

Variable Documentation

◆ vaapi_encode_vp8_profiles

const VAAPIEncodeProfile vaapi_encode_vp8_profiles[]
static
Initial value:
= {
{ 0 , 8, 3, 1, 1, VAProfileVP8Version0_3 },
}

Definition at line 181 of file vaapi_encode_vp8.c.

◆ vaapi_encode_type_vp8

const VAAPIEncodeType vaapi_encode_type_vp8
static
Initial value:
= {
.default_quality = 40,
.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,
}

Definition at line 186 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 },
}

Definition at line 218 of file vaapi_encode_vp8.c.

◆ vaapi_encode_vp8_defaults

const FFCodecDefault vaapi_encode_vp8_defaults[]
static
Initial value:
= {
{ "b", "0" },
{ "bf", "0" },
{ "g", "120" },
{ "qmin", "-1" },
{ "qmax", "-1" },
{ NULL },
}

Definition at line 229 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,
}

Definition at line 238 of file vaapi_encode_vp8.c.

◆ ff_vp8_vaapi_encoder

const FFCodec ff_vp8_vaapi_encoder
Initial value:

Definition at line 245 of file vaapi_encode_vp8.c.

AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:42
AV_CODEC_CAP_HARDWARE
#define AV_CODEC_CAP_HARDWARE
Codec is backed by a hardware implementation.
Definition: codec.h:145
FF_CODEC_CAP_NOT_INIT_THREADSAFE
#define FF_CODEC_CAP_NOT_INIT_THREADSAFE
The codec is not known to be init-threadsafe (i.e.
Definition: codec_internal.h:34
ff_vaapi_encode_close
av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
Definition: vaapi_encode.c:2967
vaapi_encode_vp8_init
static av_cold int vaapi_encode_vp8_init(AVCodecContext *avctx)
Definition: vaapi_encode_vp8.c:202
AV_PROFILE_UNKNOWN
#define AV_PROFILE_UNKNOWN
Definition: defs.h:65
vaapi_encode_vp8_profiles
static const VAAPIEncodeProfile vaapi_encode_vp8_profiles[]
Definition: vaapi_encode_vp8.c:181
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition: codec.h:159
vaapi_encode_vp8_init_sequence_params
static int vaapi_encode_vp8_init_sequence_params(AVCodecContext *avctx)
Definition: vaapi_encode_vp8.c:53
ff_vaapi_encode_receive_packet
int ff_vaapi_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
Definition: vaapi_encode.c:1398
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
vaapi_encode_vp8_init_picture_params
static int vaapi_encode_vp8_init_picture_params(AVCodecContext *avctx, VAAPIEncodePicture *pic)
Definition: vaapi_encode_vp8.c:75
FF_CODEC_RECEIVE_PACKET_CB
#define FF_CODEC_RECEIVE_PACKET_CB(func)
Definition: codec_internal.h:321
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
vaapi_encode_vp8_configure
static av_cold int vaapi_encode_vp8_configure(AVCodecContext *avctx)
Definition: vaapi_encode_vp8.c:162
vaapi_encode_vp8_options
static const AVOption vaapi_encode_vp8_options[]
Definition: vaapi_encode_vp8.c:218
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
VAAPI_ENCODE_RC_OPTIONS
#define VAAPI_ENCODE_RC_OPTIONS
Definition: vaapi_encode.h:525
VAAPI_ENCODE_COMMON_OPTIONS
#define VAAPI_ENCODE_COMMON_OPTIONS
Definition: vaapi_encode.h:498
AV_PIX_FMT_VAAPI
@ AV_PIX_FMT_VAAPI
Hardware acceleration through VA-API, data[3] contains a VASurfaceID.
Definition: pixfmt.h:119
VAAPIEncodeVP8Context
Definition: vaapi_encode_vp8.c:34
vaapi_encode_vp8_class
static const AVClass vaapi_encode_vp8_class
Definition: vaapi_encode_vp8.c:238
ff_vaapi_encode_hw_configs
const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[]
Definition: vaapi_encode.c:34
FLAGS
#define FLAGS
Definition: vaapi_encode_vp8.c:217
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)
Definition: vaapi_encode_vp8.c:129
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
OFFSET
#define OFFSET(x)
Definition: vaapi_encode_vp8.c:216
AV_CODEC_CAP_DELAY
#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:76
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_VP8
@ AV_CODEC_ID_VP8
Definition: codec_id.h:192
vaapi_encode_vp8_defaults
static const FFCodecDefault vaapi_encode_vp8_defaults[]
Definition: vaapi_encode_vp8.c:229