24 #include <vdpau/vdpau.h> 44 info->forward_reference = VDP_INVALID_HANDLE;
45 info->backward_reference = VDP_INVALID_HANDLE;
46 info->vop_coding_type = 0;
51 assert(ref != VDP_INVALID_HANDLE);
52 info->backward_reference =
ref;
53 info->vop_coding_type = 2;
57 assert(ref != VDP_INVALID_HANDLE);
58 info->forward_reference =
ref;
66 info->vop_fcode_forward = s->
f_code;
67 info->vop_fcode_backward = s->
b_code;
76 for (i = 0; i < 64; ++i) {
78 info->non_intra_quantizer_matrix[i] = s->
inter_matrix[i];
98 profile = VDP_DECODER_PROFILE_MPEG4_PART2_SP;
104 profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
114 .
name =
"mpeg4_vdpau",
#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)
VdpPictureInfoMPEG4Part2 mpeg4
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.
int ff_vdpau_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
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.
#define HWACCEL_CAP_ASYNC_SAFE
static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
union VDPAUPictureInfo info
VDPAU picture information.
Picture next_picture
copy of the next picture structure.
const AVHWAccel ff_mpeg4_vdpau_hwaccel
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.