23 #include <vdpau/vdpau.h> 42 VdpPictureInfoVP9 *
info = &pic_ctx->
info.vp9;
48 info->width = avctx->
width;
49 info->height = avctx->
height;
51 info->lastReference = VDP_INVALID_HANDLE;
52 info->goldenReference = VDP_INVALID_HANDLE;
53 info->altReference = VDP_INVALID_HANDLE;
79 info->bitDepthMinus8Luma = pixdesc->
comp[0].
depth - 8;
80 info->bitDepthMinus8Chroma = pixdesc->
comp[1].
depth - 8;
103 info->refFrameSignBias[0] = 0;
118 info->refFrameSignBias[i + 1] = h->
h.
signbias[
i];
121 for (i = 0; i <
FF_ARRAY_ELEMS(info->segmentFeatureEnable); i++) {
130 info->segmentFeatureData[
i][3] = 0;
136 info->colorSpace = 0;
139 info->colorSpace = 1;
142 info->colorSpace = 2;
145 info->colorSpace = 3;
148 info->colorSpace = 4;
151 info->colorSpace = 5;
154 info->colorSpace = 6;
157 info->colorSpace = 7;
209 profile = VDP_DECODER_PROFILE_VP9_PROFILE_0;
212 profile = VDP_DECODER_PROFILE_VP9_PROFILE_1;
215 profile = VDP_DECODER_PROFILE_VP9_PROFILE_2;
218 profile = VDP_DECODER_PROFILE_VP9_PROFILE_3;
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
int ff_vdpau_common_start_frame(struct vdpau_picture_context *pic_ctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Public libavcodec VDPAU header.
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
functionally identical to above
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
int ff_vdpau_common_uninit(AVCodecContext *avctx)
AVBufferRef * private_ref
AVBufferRef for internal use by a single libav* library.
int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, int level)
#define i(width, name, range_min, range_max)
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
void * hwaccel_picture_private
#define HWACCEL_CAP_ASYNC_SAFE
static const uint8_t start_code_prefix[3]
const AVHWAccel ff_vp9_vdpau_hwaccel
const char * name
Name of the hardware accelerated codec.
int width
picture width / height.
ITU-R BT2020 non-constant luminance system.
int ff_vdpau_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
static int vdpau_vp9_init(AVCodecContext *avctx)
#define FF_ARRAY_ELEMS(a)
Libavcodec external API header.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
main external API structure.
static int vdpau_vp9_end_frame(AVCodecContext *avctx)
static int vdpau_vp9_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
enum AVColorSpace colorspace
YUV colorspace type.
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
common internal api header.
int ff_vdpau_add_buffer(struct vdpau_picture_context *pic_ctx, const uint8_t *buf, uint32_t size)
static int vdpau_vp9_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
int ff_vdpau_common_end_frame(AVCodecContext *avctx, AVFrame *frame, struct vdpau_picture_context *pic_ctx)
union VDPAUPictureInfo info
VDPAU picture information.
int depth
Number of bits in the component.
static double val(void *priv, double ch)
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
static uintptr_t ff_vdpau_get_surface_id(AVFrame *pic)
Extract VdpVideoSurface from an AVFrame.