#include <va/va.h>
#include <va/va_enc_mpeg2.h>
#include "libavutil/avassert.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "cbs.h"
#include "cbs_mpeg2.h"
#include "codec_internal.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 566 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, .unit =
"level" },
#define LEVEL(name, value)
{
LEVEL(
"high_1440", 6) },
}
Definition at line 641 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 670 of file vaapi_encode_mpeg2.c.
◆ vaapi_encode_mpeg2_class
const AVClass vaapi_encode_mpeg2_class |
|
static |
◆ ff_mpeg2_vaapi_encoder
const FFCodec ff_mpeg2_vaapi_encoder |
Initial value:= {
.p.name = "mpeg2_vaapi",
},
.p.wrapper_name = "vaapi",
}
Definition at line 690 of file vaapi_encode_mpeg2.c.
AVPixelFormat
Pixel format.
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 minimum maximum flags name is the option name
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
#define AV_PROFILE_MPEG2_SIMPLE
#define AV_CODEC_CAP_HARDWARE
Codec is backed by a hardware implementation.
#define FF_CODEC_CAP_NOT_INIT_THREADSAFE
The codec is not known to be init-threadsafe (i.e.
static av_cold int vaapi_encode_mpeg2_close(AVCodecContext *avctx)
static av_cold int vaapi_encode_mpeg2_configure(AVCodecContext *avctx)
static const AVOption vaapi_encode_mpeg2_options[]
#define AV_PROFILE_UNKNOWN
static int vaapi_encode_mpeg2_init_picture_params(AVCodecContext *avctx, VAAPIEncodePicture *pic)
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
#define LEVEL(name, value)
int ff_vaapi_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
#define CODEC_LONG_NAME(str)
#define LIBAVUTIL_VERSION_INT
#define FF_CODEC_RECEIVE_PACKET_CB(func)
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)
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define VAAPI_ENCODE_RC_OPTIONS
static const AVClass vaapi_encode_mpeg2_class
#define VAAPI_ENCODE_COMMON_OPTIONS
static const FFCodecDefault vaapi_encode_mpeg2_defaults[]
@ AV_PIX_FMT_VAAPI
Hardware acceleration through VA-API, data[3] contains a VASurfaceID.
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)
const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[]
#define AV_PROFILE_MPEG2_MAIN
#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