51 VAPictureParameterBufferMPEG4 pic_param;
56 pic_param = (VAPictureParameterBufferMPEG4) {
57 .vop_width = s->
width,
59 .forward_reference_picture = VA_INVALID_ID,
60 .backward_reference_picture = VA_INVALID_ID,
71 .reversible_vlc = ctx->
rvlc,
78 .backward_reference_vop_coding_type =
85 .vop_fcode_forward = s->
f_code,
86 .vop_fcode_backward = s->
b_code,
96 pic_param.sprite_trajectory_du[i] = ctx->
sprite_traj[i][0];
97 pic_param.sprite_trajectory_dv[i] = ctx->
sprite_traj[i][1];
106 VAPictureParameterBufferType,
107 &pic_param,
sizeof(pic_param));
112 if (pic_param.vol_fields.bits.quant_type) {
113 VAIQMatrixBufferMPEG4 iq_matrix;
115 iq_matrix.load_intra_quant_mat = 1;
116 iq_matrix.load_non_intra_quant_mat = 1;
118 for (i = 0; i < 64; i++) {
125 VAIQMatrixBufferType,
126 &iq_matrix,
sizeof(iq_matrix));
157 VASliceParameterBufferMPEG4 slice_param;
160 slice_param = (VASliceParameterBufferMPEG4) {
161 .slice_data_size =
size,
162 .slice_data_offset = 0,
163 .slice_data_flag = VA_SLICE_DATA_FLAG_ALL,
165 .macroblock_number = 0,
170 &slice_param,
sizeof(slice_param),
180 #if CONFIG_MPEG4_VAAPI_HWACCEL
182 .
name =
"mpeg4_vaapi",
198 #if CONFIG_H263_VAAPI_HWACCEL
200 .
name =
"h263_vaapi",
uint16_t sprite_traj[4][2]
sprite trajectory points
const struct AVCodec * codec
int sprite_warping_accuracy
static av_cold int init(AVCodecContext *avctx)
int resync_marker
could this stream contain resync markers
int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, VAAPIDecodePicture *pic, int type, const void *data, size_t size)
static VASurfaceID ff_vaapi_get_surface_id(AVFrame *pic)
int ff_vaapi_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h)
int ff_vaapi_decode_uninit(AVCodecContext *avctx)
const AVHWAccel ff_h263_vaapi_hwaccel
static av_cold int uninit(AVCodecContext *avctx)
int ff_vaapi_decode_issue(AVCodecContext *avctx, VAAPIDecodePicture *pic)
int no_rounding
apply no rounding to motion compensation (MPEG-4, msmpeg4, ...) for B-frames rounding mode is always ...
static int get_bits_count(const GetBitContext *s)
uint16_t pp_time
time distance between the last 2 p,s,i frames
int mb_height
number of MBs horizontally & vertically
int intra_dc_threshold
QP above which the ac VLC should be used for intra dc.
const AVHWAccel ff_mpeg4_vaapi_hwaccel
static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
int quarter_sample
1->qpel, 0->half pel ME/MC
enum AVPictureType pict_type
Picture type of the frame.
const char * name
Name of the hardware accelerated codec.
int ff_vaapi_decode_init(AVCodecContext *avctx)
Picture * current_picture_ptr
pointer to the current picture
void * hwaccel_picture_private
Hardware accelerator private data.
uint8_t idct_permutation[64]
IDCT input permutation.
VASurfaceID output_surface
uint16_t inter_matrix[64]
main external API structure.
int height
picture size. must be a multiple of 16
int data_partitioning
data partitioning flag from header
const uint8_t ff_zigzag_direct[64]
int f_code
forward MV resolution
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
static int vaapi_mpeg4_end_frame(AVCodecContext *avctx)
int ff_vaapi_decode_cancel(AVCodecContext *avctx, VAAPIDecodePicture *pic)
static int mpeg4_get_intra_dc_vlc_thr(Mpeg4DecContext *s)
Reconstruct bitstream intra_dc_vlc_thr.
struct AVCodecContext * avctx
static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
common internal api header.
Picture last_picture
copy of the previous picture structure.
#define H263_GOB_HEIGHT(h)
#define HWACCEL_CAP_ASYNC_SAFE
Picture next_picture
copy of the next picture structure.
uint16_t intra_matrix[64]
matrix transmitted in the bitstream
int num_sprite_warping_points
int b_code
backward MV resolution for B-frames (MPEG-4)
int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, VAAPIDecodePicture *pic, const void *params_data, size_t params_size, const void *slice_data, size_t slice_size)
uint16_t pb_time
time distance between the last b and p,s,i frame