24 #include <vdpau/vdpau.h> 43 info->forward_reference = VDP_INVALID_HANDLE;
44 info->backward_reference = VDP_INVALID_HANDLE;
49 assert(ref != VDP_INVALID_HANDLE);
50 info->backward_reference =
ref;
54 info->forward_reference =
ref;
57 info->slice_count = 0;
68 info->full_pel_forward_vector = s->
full_pel[0];
69 info->full_pel_backward_vector = s->
full_pel[1];
75 for (i = 0; i < 64; ++
i) {
99 #if CONFIG_MPEG1_VDPAU_HWACCEL 103 VDP_DECODER_LEVEL_MPEG1_NA);
107 .
name =
"mpeg1_vdpau",
115 .init = vdpau_mpeg1_init,
122 #if CONFIG_MPEG2_VDPAU_HWACCEL 129 profile = VDP_DECODER_PROFILE_MPEG2_MAIN;
132 profile = VDP_DECODER_PROFILE_MPEG2_SIMPLE;
142 .
name =
"mpeg2_vdpau",
150 .init = vdpau_mpeg2_init,
#define FF_PROFILE_MPEG2_MAIN
int ff_vdpau_common_start_frame(struct vdpau_picture_context *pic_ctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
static int vdpau_mpeg_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Public libavcodec VDPAU header.
int ff_vdpau_common_uninit(AVCodecContext *avctx)
int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, int level)
const AVHWAccel ff_mpeg1_vdpau_hwaccel
VdpPictureInfoMPEG1Or2 mpeg
#define HWACCEL_CAP_ASYNC_SAFE
const char * name
Name of the hardware accelerated codec.
Picture * current_picture_ptr
pointer to the current picture
void * hwaccel_picture_private
Hardware accelerator private data.
int ff_vdpau_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
preferred ID for MPEG-1/2 video decoding
uint16_t inter_matrix[64]
int concealment_motion_vectors
Libavcodec external API header.
int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx)
main external API structure.
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
const AVHWAccel ff_mpeg2_vdpau_hwaccel
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
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.
union VDPAUPictureInfo info
VDPAU picture information.
#define FF_PROFILE_MPEG2_SIMPLE
Picture next_picture
copy of the next picture structure.
uint16_t intra_matrix[64]
matrix transmitted in the bitstream
static int vdpau_mpeg_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Frame references ownership and permissions
static double val(void *priv, double ch)
static uintptr_t ff_vdpau_get_surface_id(AVFrame *pic)
Extract VdpVideoSurface from an AVFrame.