48 VAPictureParameterBufferMPEG4 *pic_param;
49 VAIQMatrixBufferMPEG4 *iq_matrix;
52 av_dlog(avctx,
"vaapi_mpeg4_start_frame()\n");
60 pic_param->vop_width = s->
width;
61 pic_param->vop_height = s->
height;
62 pic_param->forward_reference_picture = VA_INVALID_ID;
63 pic_param->backward_reference_picture = VA_INVALID_ID;
64 pic_param->vol_fields.value = 0;
66 pic_param->vol_fields.bits.chroma_format =
CHROMA_420;
68 pic_param->vol_fields.bits.obmc_disable = 1;
71 pic_param->vol_fields.bits.quant_type = s->
mpeg_quant;
74 pic_param->vol_fields.bits.reversible_vlc = ctx->
rvlc;
75 pic_param->vol_fields.bits.resync_marker_disable = !ctx->
resync_marker;
78 pic_param->sprite_trajectory_du[i] = ctx->
sprite_traj[i][0];
79 pic_param->sprite_trajectory_dv[i] = ctx->
sprite_traj[i][1];
82 pic_param->vop_fields.value = 0;
85 pic_param->vop_fields.bits.vop_rounding_type = s->
no_rounding;
88 pic_param->vop_fields.bits.alternate_vertical_scan_flag = s->
alternate_scan;
89 pic_param->vop_fcode_forward = s->
f_code;
90 pic_param->vop_fcode_backward = s->
b_code;
91 pic_param->vop_time_increment_resolution = avctx->
time_base.
den;
93 pic_param->num_gobs_in_vop = (s->
mb_width * s->
mb_height) / pic_param->num_macroblocks_in_gob;
104 if (pic_param->vol_fields.bits.quant_type) {
108 iq_matrix->load_intra_quant_mat = 1;
109 iq_matrix->load_non_intra_quant_mat = 1;
111 for (i = 0; i < 64; i++) {
123 VASliceParameterBufferMPEG4 *slice_param;
125 av_dlog(avctx,
"vaapi_mpeg4_decode_slice(): buffer %p, size %d\n", buffer, size);
141 slice_param->quant_scale = s->
qscale;
149 #if CONFIG_MPEG4_VAAPI_HWACCEL
151 .
name =
"mpeg4_vaapi",
161 #if CONFIG_H263_VAAPI_HWACCEL
163 .
name =
"h263_vaapi",
uint16_t sprite_traj[4][2]
sprite shift [isChroma]
const struct AVCodec * codec
int sprite_warping_accuracy
int resync_marker
time distance of first I -> B, used for interlaced b frames
HW decoding through VA API, Picture.data[3] contains a vaapi_render_state struct which contains the b...
av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (%s)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic?ac->func_descr_generic:ac->func_descr)
This structure is used to share data between the Libav library and the client video application...
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
void * hwaccel_context
Hardware accelerator context.
int no_rounding
apply no rounding to motion compensation (MPEG4, msmpeg4, ...) for b-frames rounding mode is always 0...
static int get_bits_count(const GetBitContext *s)
uint16_t pp_time
time distance between the last 2 p,s,i frames
uint8_t idct_permutation[64]
idct input permutation.
int mb_height
number of MBs horizontally & vertically
MpegEncContext m
number of bits to represent the fractional part of time
static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
void * ff_vaapi_alloc_pic_param(struct vaapi_context *vactx, unsigned int size)
Allocate a new picture parameter buffer.
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_h263_get_gob_height(MpegEncContext *s)
Get the GOB height based on picture height.
unsigned int slice_param_size
Size of a VASliceParameterBuffer element.
if(ac->has_optimized_func)
uint16_t inter_matrix[64]
main external API structure.
int height
picture size. must be a multiple of 16
VASliceParameterBufferBase * ff_vaapi_alloc_slice(struct vaapi_context *vactx, const uint8_t *buffer, uint32_t size)
Allocate a new slice descriptor for the input slice.
int data_partitioning
data partitioning flag from header
DSPContext dsp
pointers for accelerated dsp functions
int f_code
forward MV resolution
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
static int mpeg4_get_intra_dc_vlc_thr(Mpeg4DecContext *s)
Reconstruct bitstream intra_dc_vlc_thr.
static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
const uint8_t ff_zigzag_direct[64]
const uint8_t * buffer_end
Picture last_picture
copy of the previous picture structure.
void * ff_vaapi_alloc_iq_matrix(struct vaapi_context *vactx, unsigned int size)
Allocate a new IQ matrix buffer.
static VASurfaceID ff_vaapi_get_surface_id(Picture *pic)
Extract VASurfaceID from a Picture.
int rvlc
could this stream contain resync markers
Picture next_picture
copy of the next picture structure.
uint16_t intra_matrix[64]
matrix transmitted in the bitstream
int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx)
int num_sprite_warping_points
sprite trajectory points
int b_code
backward MV resolution for B Frames (mpeg4)
uint16_t pb_time
time distance between the last b and p,s,i frame