#include <string.h>
#include <va/va.h>
#include <va/va_enc_h264.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "atsc_a53.h"
#include "avcodec.h"
#include "cbs.h"
#include "cbs_h264.h"
#include "codec_internal.h"
#include "h264.h"
#include "hw_base_encode_h264.h"
#include "h264_levels.h"
#include "h2645data.h"
#include "vaapi_encode.h"
#include "version.h"
Go to the source code of this file.
|
static int | vaapi_encode_h264_write_access_unit (AVCodecContext *avctx, char *data, size_t *data_len, CodedBitstreamFragment *au) |
|
static int | vaapi_encode_h264_add_nal (AVCodecContext *avctx, CodedBitstreamFragment *au, void *nal_unit) |
|
static int | vaapi_encode_h264_write_sequence_header (AVCodecContext *avctx, char *data, size_t *data_len) |
|
static int | vaapi_encode_h264_write_slice_header (AVCodecContext *avctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice, char *data, size_t *data_len) |
|
static int | vaapi_encode_h264_write_extra_header (AVCodecContext *avctx, FFHWBaseEncodePicture *base, int index, int *type, char *data, size_t *data_len) |
|
static int | vaapi_encode_h264_init_sequence_params (AVCodecContext *avctx) |
|
static int | vaapi_encode_h264_init_picture_params (AVCodecContext *avctx, FFHWBaseEncodePicture *pic) |
|
static void | vaapi_encode_h264_default_ref_pic_list (AVCodecContext *avctx, FFHWBaseEncodePicture *pic, FFHWBaseEncodePicture **rpl0, FFHWBaseEncodePicture **rpl1, int *rpl_size) |
|
static int | vaapi_encode_h264_init_slice_params (AVCodecContext *avctx, FFHWBaseEncodePicture *pic, VAAPIEncodeSlice *slice) |
|
static av_cold int | vaapi_encode_h264_configure (AVCodecContext *avctx) |
|
static av_cold int | vaapi_encode_h264_init (AVCodecContext *avctx) |
|
static av_cold int | vaapi_encode_h264_close (AVCodecContext *avctx) |
|
◆ OFFSET
◆ FLAGS
◆ PROFILE
◆ LEVEL
◆ anonymous enum
Enumerator |
---|
SEI_TIMING | |
SEI_IDENTIFIER | |
SEI_RECOVERY_POINT | |
SEI_A53_CC | |
Definition at line 42 of file vaapi_encode_h264.c.
◆ vaapi_encode_h264_write_access_unit()
◆ vaapi_encode_h264_add_nal()
◆ vaapi_encode_h264_write_sequence_header()
static int vaapi_encode_h264_write_sequence_header |
( |
AVCodecContext * |
avctx, |
|
|
char * |
data, |
|
|
size_t * |
data_len |
|
) |
| |
|
static |
◆ vaapi_encode_h264_write_slice_header()
◆ vaapi_encode_h264_write_extra_header()
◆ vaapi_encode_h264_init_sequence_params()
static int vaapi_encode_h264_init_sequence_params |
( |
AVCodecContext * |
avctx | ) |
|
|
static |
◆ vaapi_encode_h264_init_picture_params()
◆ vaapi_encode_h264_default_ref_pic_list()
◆ vaapi_encode_h264_init_slice_params()
◆ vaapi_encode_h264_configure()
◆ vaapi_encode_h264_init()
◆ vaapi_encode_h264_close()
◆ vaapi_encode_h264_sei_identifier_uuid
const uint8_t vaapi_encode_h264_sei_identifier_uuid[16] |
|
static |
Initial value:= {
0x59, 0x94, 0x8b, 0x28, 0x11, 0xec, 0x45, 0xaf,
0x96, 0x75, 0x19, 0xd4, 0x1f, 0xea, 0xa9, 0x4d,
}
Definition at line 50 of file vaapi_encode_h264.c.
Referenced by vaapi_encode_h264_configure().
◆ vaapi_encode_h264_profiles
Initial value:= {
8, 3, 1, 1, VAProfileH264ConstrainedBaseline },
}
Definition at line 945 of file vaapi_encode_h264.c.
◆ vaapi_encode_type_h264
◆ vaapi_encode_h264_options
const AVOption vaapi_encode_h264_options[] |
|
static |
◆ vaapi_encode_h264_defaults
Initial value:= {
{ "b", "0" },
{ "bf", "2" },
{ "g", "120" },
{ "i_qfactor", "1" },
{ "i_qoffset", "0" },
{ "b_qfactor", "6/5" },
{ "b_qoffset", "0" },
{ "qmin", "-1" },
{ "qmax", "-1" },
}
Definition at line 1143 of file vaapi_encode_h264.c.
◆ vaapi_encode_h264_class
const AVClass vaapi_encode_h264_class |
|
static |
◆ ff_h264_vaapi_encoder
const FFCodec ff_h264_vaapi_encoder |
Initial value:= {
.p.name = "h264_vaapi",
},
.p.wrapper_name = "vaapi",
}
Definition at line 1163 of file vaapi_encode_h264.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_CODEC_CAP_HARDWARE
Codec is backed by a hardware implementation.
#define AV_PROFILE_H264_MAIN
@ AVCOL_RANGE_JPEG
Full range content.
static const AVClass vaapi_encode_h264_class
#define FF_CODEC_CAP_NOT_INIT_THREADSAFE
The codec is not known to be init-threadsafe (i.e.
#define AV_PROFILE_UNKNOWN
static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx)
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
static const AVOption vaapi_encode_h264_options[]
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.
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
@ AV_PIX_FMT_VAAPI
Hardware acceleration through VA-API, data[3] contains a VASurfaceID.
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 av_cold int vaapi_encode_h264_close(AVCodecContext *avctx)
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[]
#define AV_PROFILE_H264_HIGH
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
#define AV_PROFILE_H264_CONSTRAINED_BASELINE
static const FFCodecDefault vaapi_encode_h264_defaults[]
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.