#include <va/va.h>
#include <va/va_enc_mpeg2.h>
#include "libavutil/avassert.h"
#include "avcodec.h"
#include "cbs.h"
#include "cbs_mpeg2.h"
#include "mpeg12.h"
#include "vaapi_encode.h"
Go to the source code of this file.
|
static int | vaapi_encode_mpeg2_write_fragment (AVCodecContext *avctx, char *data, size_t *data_len, CodedBitstreamFragment *frag) |
|
static int | vaapi_encode_mpeg2_add_header (AVCodecContext *avctx, CodedBitstreamFragment *frag, int type, void *header) |
|
static int | vaapi_encode_mpeg2_write_sequence_header (AVCodecContext *avctx, char *data, size_t *data_len) |
|
static int | vaapi_encode_mpeg2_write_picture_header (AVCodecContext *avctx, VAAPIEncodePicture *pic, char *data, size_t *data_len) |
|
static int | vaapi_encode_mpeg2_init_sequence_params (AVCodecContext *avctx) |
|
static int | vaapi_encode_mpeg2_init_picture_params (AVCodecContext *avctx, VAAPIEncodePicture *pic) |
|
static int | vaapi_encode_mpeg2_init_slice_params (AVCodecContext *avctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice) |
|
static av_cold int | vaapi_encode_mpeg2_configure (AVCodecContext *avctx) |
|
static av_cold int | vaapi_encode_mpeg2_init (AVCodecContext *avctx) |
|
static av_cold int | vaapi_encode_mpeg2_close (AVCodecContext *avctx) |
|
◆ OFFSET
◆ FLAGS
◆ PROFILE
◆ LEVEL
◆ vaapi_encode_mpeg2_write_fragment()
◆ vaapi_encode_mpeg2_add_header()
◆ vaapi_encode_mpeg2_write_sequence_header()
static int vaapi_encode_mpeg2_write_sequence_header |
( |
AVCodecContext * |
avctx, |
|
|
char * |
data, |
|
|
size_t * |
data_len |
|
) |
| |
|
static |
◆ vaapi_encode_mpeg2_write_picture_header()
◆ vaapi_encode_mpeg2_init_sequence_params()
◆ vaapi_encode_mpeg2_init_picture_params()
◆ vaapi_encode_mpeg2_init_slice_params()
◆ vaapi_encode_mpeg2_configure()
◆ vaapi_encode_mpeg2_init()
◆ vaapi_encode_mpeg2_close()
◆ vaapi_encode_mpeg2_profiles
◆ vaapi_encode_type_mpeg2
Initial value:= {
.default_quality = 10,
.sequence_params_size = sizeof(VAEncSequenceParameterBufferMPEG2),
.picture_params_size = sizeof(VAEncPictureParameterBufferMPEG2),
.slice_params_size = sizeof(VAEncSliceParameterBufferMPEG2),
.sequence_header_type = VAEncPackedHeaderSequence,
.picture_header_type = VAEncPackedHeaderPicture,
}
Definition at line 564 of file vaapi_encode_mpeg2.c.
Referenced by vaapi_encode_mpeg2_init().
◆ vaapi_encode_mpeg2_options
const AVOption vaapi_encode_mpeg2_options[] |
|
static |
Initial value:= {
{ "profile", "Set profile (in profile_and_level_indication)",
#define PROFILE(name, value)
{ "level", "Set level (in profile_and_level_indication)",
{ .i64 = 4 }, 0, 15,
FLAGS,
"level" },
#define LEVEL(name, value)
{
LEVEL(
"high_1440", 6) },
}
Definition at line 642 of file vaapi_encode_mpeg2.c.
◆ vaapi_encode_mpeg2_defaults
Initial value:= {
{ "b", "0" },
{ "bf", "1" },
{ "g", "120" },
{ "i_qfactor", "1" },
{ "i_qoffset", "0" },
{ "b_qfactor", "6/5" },
{ "b_qoffset", "0" },
{ "qmin", "-1" },
{ "qmax", "-1" },
}
Definition at line 671 of file vaapi_encode_mpeg2.c.
◆ vaapi_encode_mpeg2_class
const AVClass vaapi_encode_mpeg2_class |
|
static |
◆ ff_mpeg2_vaapi_encoder
Initial value:= {
.name = "mpeg2_vaapi",
},
.wrapper_name = "vaapi",
}
Definition at line 691 of file vaapi_encode_mpeg2.c.
AVPixelFormat
Pixel format.
static av_cold int init(AVCodecContext *avctx)
#define FF_PROFILE_MPEG2_SIMPLE
#define AV_CODEC_CAP_HARDWARE
Codec is backed by a hardware implementation.
static av_cold int vaapi_encode_mpeg2_close(AVCodecContext *avctx)
#define FF_PROFILE_MPEG2_MAIN
static av_cold int vaapi_encode_mpeg2_configure(AVCodecContext *avctx)
static const AVCodecDefault defaults[]
static const AVOption vaapi_encode_mpeg2_options[]
static int vaapi_encode_mpeg2_init_picture_params(AVCodecContext *avctx, VAAPIEncodePicture *pic)
#define FF_PROFILE_UNKNOWN
static enum AVPixelFormat pix_fmts[]
#define LEVEL(name, value)
int ff_vaapi_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
int ff_vaapi_encode_send_frame(AVCodecContext *avctx, const AVFrame *frame)
#define LIBAVUTIL_VERSION_INT
const char * av_default_item_name(void *ptr)
Return the context name.
#define PROFILE(name, value)
static const VAAPIEncodeProfile vaapi_encode_mpeg2_profiles[]
static av_cold int vaapi_encode_mpeg2_init(AVCodecContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define VAAPI_ENCODE_RC_OPTIONS
static const AVClass vaapi_encode_mpeg2_class
#define VAAPI_ENCODE_COMMON_OPTIONS
static int vaapi_encode_mpeg2_init_slice_params(AVCodecContext *avctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
static int vaapi_encode_mpeg2_write_sequence_header(AVCodecContext *avctx, char *data, size_t *data_len)
static int vaapi_encode_mpeg2_init_sequence_params(AVCodecContext *avctx)
static const AVCodecDefault vaapi_encode_mpeg2_defaults[]
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
static int vaapi_encode_mpeg2_write_picture_header(AVCodecContext *avctx, VAAPIEncodePicture *pic, char *data, size_t *data_len)
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding