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 int n =
s->idsp.idct_permutation[
i];
78 info->intra_quantizer_matrix[
i] =
s->intra_matrix[n];
79 info->non_intra_quantizer_matrix[
i] =
s->inter_matrix[n];
99 profile = VDP_DECODER_PROFILE_MPEG4_PART2_SP;
105 profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
115 .
p.
name =
"mpeg4_vdpau",
int ff_vdpau_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
#define AV_PROFILE_MPEG4_ADVANCED_SIMPLE
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
AVHWAccel p
The public AVHWAccel.
const FFHWAccel ff_mpeg4_vdpau_hwaccel
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 AV_PROFILE_UNKNOWN
int(* init)(AVBSFContext *ctx)
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
RefStruct reference for hardware accelerator private data.
#define HWACCEL_CAP_ASYNC_SAFE
Header providing the internals of AVHWAccel.
int level
Encoding level descriptor.
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 AV_PROFILE_MPEG4_SIMPLE
#define i(width, name, range_min, range_max)
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)