Go to the documentation of this file.
24 #include <vdpau/vdpau.h>
37 Picture *pic =
s->current_picture_ptr;
44 info->forward_reference = VDP_INVALID_HANDLE;
45 info->backward_reference = VDP_INVALID_HANDLE;
46 info->vop_coding_type = 0;
48 switch (
s->pict_type) {
51 assert(
ref != VDP_INVALID_HANDLE);
53 info->vop_coding_type = 2;
57 assert(
ref != VDP_INVALID_HANDLE);
61 info->trd[0] =
s->pp_time;
62 info->trb[0] =
s->pb_time;
63 info->trd[1] =
s->pp_field_time >> 1;
64 info->trb[1] =
s->pb_field_time >> 1;
65 info->vop_time_increment_resolution =
s->avctx->framerate.num;
66 info->vop_fcode_forward =
s->f_code;
67 info->vop_fcode_backward =
s->b_code;
68 info->resync_marker_disable = !
ctx->resync_marker;
69 info->interlaced = !
s->progressive_sequence;
70 info->quant_type =
s->mpeg_quant;
71 info->quarter_sample =
s->quarter_sample;
73 info->rounding_control =
s->no_rounding;
74 info->alternate_vertical_scan_flag =
s->alternate_scan;
75 info->top_field_first =
s->top_field_first;
76 for (
i = 0;
i < 64; ++
i) {
77 info->intra_quantizer_matrix[
i] =
s->intra_matrix[
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",
int ff_vdpau_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
static av_cold int init(AVCodecContext *avctx)
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
#define FF_PROFILE_MPEG4_SIMPLE
static int vdpau_mpeg4_decode_slice(av_unused AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
const struct AVCodec * codec
int ff_vdpau_add_buffer(struct vdpau_picture_context *pic_ctx, const uint8_t *buf, uint32_t size)
int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, int level)
#define FF_PROFILE_UNKNOWN
int ff_vdpau_common_start_frame(struct vdpau_picture_context *pic_ctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
static uintptr_t ff_vdpau_get_surface_id(AVFrame *pic)
Extract VdpVideoSurface from an AVFrame.
void * hwaccel_picture_private
Hardware accelerator private data.
const AVHWAccel ff_mpeg4_vdpau_hwaccel
int ff_vdpau_common_uninit(AVCodecContext *avctx)
VdpPictureInfoMPEG4Part2 mpeg4
static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx)
@ AV_PIX_FMT_VDPAU
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
const char * name
Name of the hardware accelerated codec.
#define i(width, name, range_min, range_max)
#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE
#define HWACCEL_CAP_ASYNC_SAFE
main external API structure.
union VDPAUPictureInfo info
VDPAU picture information.
@ AV_PICTURE_TYPE_B
Bi-dir predicted.
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
static int ref[MAX_W *MAX_W]
@ AV_PICTURE_TYPE_P
Predicted.
static int vdpau_mpeg4_init(AVCodecContext *avctx)