24 #include <vdpau/vdpau.h>
38 VdpPictureInfoMPEG4Part2 *info = &pic_ctx->info.mpeg4;
43 info->forward_reference = VDP_INVALID_HANDLE;
44 info->backward_reference = VDP_INVALID_HANDLE;
45 info->vop_coding_type = 0;
50 assert(ref != VDP_INVALID_HANDLE);
51 info->backward_reference =
ref;
52 info->vop_coding_type = 2;
56 assert(ref != VDP_INVALID_HANDLE);
57 info->forward_reference =
ref;
65 info->vop_fcode_forward = s->
f_code;
66 info->vop_fcode_backward = s->
b_code;
75 for (i = 0; i < 64; ++i) {
77 info->non_intra_quantizer_matrix[i] = s->
inter_matrix[i];
97 profile = VDP_DECODER_PROFILE_MPEG4_PART2_SP;
103 profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
113 .
name =
"mpeg4_vdpau",
120 .frame_priv_data_size =
sizeof(
struct vdpau_picture_context),
#define FF_PROFILE_MPEG4_SIMPLE
const struct AVCodec * codec
int resync_marker
could this stream contain resync markers
int ff_vdpau_common_start_frame(struct vdpau_picture_context *pic_ctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
Public libavcodec VDPAU header.
int ff_vdpau_common_uninit(AVCodecContext *avctx)
int no_rounding
apply no rounding to motion compensation (MPEG-4, msmpeg4, ...) for B-frames rounding mode is always ...
uint16_t pp_time
time distance between the last 2 p,s,i frames
int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, int level)
int quarter_sample
1->qpel, 0->half pel ME/MC
static int vdpau_mpeg4_decode_slice(av_unused AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
const char * name
Name of the hardware accelerated codec.
Picture * current_picture_ptr
pointer to the current picture
#define FF_PROFILE_UNKNOWN
void * hwaccel_picture_private
Hardware accelerator private data.
AVHWAccel ff_mpeg4_vdpau_hwaccel
static int vdpau_mpeg4_init(AVCodecContext *avctx)
uint16_t inter_matrix[64]
Libavcodec external API header.
int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx)
main external API structure.
#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
int f_code
forward MV resolution
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
uint16_t pb_field_time
like above, just for interlaced
struct AVCodecContext * avctx
static int ref[MAX_W *MAX_W]
int ff_vdpau_add_buffer(struct vdpau_picture_context *pic_ctx, const uint8_t *buf, uint32_t size)
Picture last_picture
copy of the previous picture structure.
static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Picture next_picture
copy of the next picture structure.
uint16_t intra_matrix[64]
matrix transmitted in the bitstream
int b_code
backward MV resolution for B-frames (MPEG-4)
uint16_t pb_time
time distance between the last b and p,s,i frame
static uintptr_t ff_vdpau_get_surface_id(AVFrame *pic)
Extract VdpVideoSurface from an AVFrame.