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];
91 #if CONFIG_H263_VDPAU_HWACCEL
95 VDP_DECODER_LEVEL_MPEG4_PART2_ASP_L5);
106 .frame_priv_data_size =
sizeof(
struct vdpau_picture_context),
107 .
init = vdpau_h263_init,
113 #if CONFIG_MPEG4_VDPAU_HWACCEL
120 profile = VDP_DECODER_PROFILE_MPEG4_PART2_SP;
126 profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
136 .
name =
"mpeg4_vdpau",
143 .frame_priv_data_size =
sizeof(
struct vdpau_picture_context),
144 .init = vdpau_mpeg4_init,
const struct AVCodec * codec
static av_cold int init(AVCodecContext *avctx)
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)
#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE
Public libavcodec VDPAU header.
int ff_vdpau_common_uninit(AVCodecContext *avctx)
#define FF_PROFILE_UNKNOWN
int no_rounding
apply no rounding to motion compensation (MPEG4, msmpeg4, ...) for b-frames rounding mode is always 0...
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
Libavcodec external API header.
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.
#define FF_PROFILE_MPEG4_SIMPLE
Picture * current_picture_ptr
pointer to the current picture
void * hwaccel_picture_private
hardware accelerator private data
uint16_t inter_matrix[64]
int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx)
main external API structure.
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
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 (mpeg4)
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.