46 VAPictureParameterBufferMPEG4 *pic_param;
47 VAIQMatrixBufferMPEG4 *iq_matrix;
50 av_dlog(avctx,
"vaapi_mpeg4_start_frame()\n");
58 pic_param->vop_width = s->
width;
59 pic_param->vop_height = s->
height;
60 pic_param->forward_reference_picture = VA_INVALID_ID;
61 pic_param->backward_reference_picture = VA_INVALID_ID;
62 pic_param->vol_fields.value = 0;
64 pic_param->vol_fields.bits.chroma_format =
CHROMA_420;
66 pic_param->vol_fields.bits.obmc_disable = 1;
69 pic_param->vol_fields.bits.quant_type = s->
mpeg_quant;
72 pic_param->vol_fields.bits.reversible_vlc = s->
rvlc;
73 pic_param->vol_fields.bits.resync_marker_disable = !s->
resync_marker;
76 pic_param->sprite_trajectory_du[i] = s->
sprite_traj[i][0];
77 pic_param->sprite_trajectory_dv[i] = s->
sprite_traj[i][1];
80 pic_param->vop_fields.value = 0;
83 pic_param->vop_fields.bits.vop_rounding_type = s->
no_rounding;
86 pic_param->vop_fields.bits.alternate_vertical_scan_flag = s->
alternate_scan;
87 pic_param->vop_fcode_forward = s->
f_code;
88 pic_param->vop_fcode_backward = s->
b_code;
89 pic_param->vop_time_increment_resolution = avctx->
time_base.
den;
91 pic_param->num_gobs_in_vop = (s->
mb_width * s->
mb_height) / pic_param->num_macroblocks_in_gob;
102 if (pic_param->vol_fields.bits.quant_type) {
106 iq_matrix->load_intra_quant_mat = 1;
107 iq_matrix->load_non_intra_quant_mat = 1;
109 for (i = 0; i < 64; i++) {
121 VASliceParameterBufferMPEG4 *slice_param;
123 av_dlog(avctx,
"vaapi_mpeg4_decode_slice(): buffer %p, size %d\n", buffer, size);
139 slice_param->quant_scale = s->
qscale;
147 #if CONFIG_MPEG4_VAAPI_HWACCEL
149 .
name =
"mpeg4_vaapi",
159 #if CONFIG_H263_VAAPI_HWACCEL
161 .
name =
"h263_vaapi",
const struct AVCodec * codec
const uint8_t ff_zigzag_direct[64]
int sprite_warping_accuracy
HW decoding through VA API, Picture.data[3] contains a vaapi_render_state struct which contains the b...
int num_sprite_warping_points
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...
uint16_t sprite_traj[4][2]
sprite trajectory points
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
int intra_dc_threshold
QP above whch the ac VLC should be used for intra dc.
void * hwaccel_context
Hardware accelerator context.
static int mpeg4_get_intra_dc_vlc_thr(MpegEncContext *s)
Reconstruct bitstream intra_dc_vlc_thr.
int no_rounding
apply no rounding to motion compensation (MPEG4, msmpeg4, ...) for b-frames rounding mode is always 0...
int resync_marker
could this stream contain resync markers
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
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, see ?_TYPE below.
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.
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 vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
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.
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 b_code
backward MV resolution for B Frames (mpeg4)
uint16_t pb_time
time distance between the last b and p,s,i frame
if(!(ptr_align%ac->ptr_align)&&samples_align >=aligned_len)