29 VADecPictureParameterBufferVP9 *pp)
34 pp->frame_width = avctx->
width;
35 pp->frame_height = avctx->
height;
49 pp->pic_fields.bits.frame_type = !h->
h.
keyframe;
50 pp->pic_fields.bits.show_frame = !h->
h.
invisible;
51 pp->pic_fields.bits.error_resilient_mode = h->
h.
errorres;
52 pp->pic_fields.bits.intra_only = h->
h.
intraonly;
55 pp->pic_fields.bits.frame_parallel_decoding_mode = h->
h.
parallelmode;
56 pp->pic_fields.bits.reset_frame_context = h->
h.
resetctx;
57 pp->pic_fields.bits.refresh_frame_context = h->
h.
refreshctx;
58 pp->pic_fields.bits.frame_context_idx = h->
h.
framectxid;
64 pp->pic_fields.bits.last_ref_frame = h->
h.
refidx[0];
65 pp->pic_fields.bits.last_ref_frame_sign_bias = h->
h.
signbias[0];
66 pp->pic_fields.bits.golden_ref_frame = h->
h.
refidx[1];
67 pp->pic_fields.bits.golden_ref_frame_sign_bias = h->
h.
signbias[1];
68 pp->pic_fields.bits.alt_ref_frame = h->
h.
refidx[2];
69 pp->pic_fields.bits.alt_ref_frame_sign_bias = h->
h.
signbias[2];
70 pp->pic_fields.bits.lossless_flag = h->
h.
lossless;
72 for (i = 0; i < 7; i++)
76 for (i = 0; i < 3; i++)
79 memset(pp->segment_pred_probs, 255,
sizeof(pp->segment_pred_probs));
82 for (i = 0; i < 8; i++) {
86 pp->reference_frames[i] = VA_INVALID_ID;
97 VADecPictureParameterBufferVP9 *pic_param;
134 VASliceParameterBufferVP9 *slice_param;
141 for (i = 0; i < 8; i++) {
142 slice_param->seg_param[i].segment_flags.fields.segment_reference_enabled = h->
h.
segmentation.
feat[i].ref_enabled;
143 slice_param->seg_param[i].segment_flags.fields.segment_reference = h->
h.
segmentation.
feat[i].ref_val;
144 slice_param->seg_param[i].segment_flags.fields.segment_reference_skipped = h->
h.
segmentation.
feat[i].skip_enabled;
146 memcpy(slice_param->seg_param[i].filter_level, h->
h.
segmentation.
feat[i].lflvl,
sizeof(slice_param->seg_param[i].filter_level));
148 slice_param->seg_param[i].luma_dc_quant_scale = h->
h.
segmentation.
feat[i].qmul[0][0];
149 slice_param->seg_param[i].luma_ac_quant_scale = h->
h.
segmentation.
feat[i].qmul[0][1];
150 slice_param->seg_param[i].chroma_dc_quant_scale = h->
h.
segmentation.
feat[i].qmul[1][0];
151 slice_param->seg_param[i].chroma_ac_quant_scale = h->
h.
segmentation.
feat[i].qmul[1][1];
VASliceParameterBufferBase * ff_vaapi_alloc_slice(FFVAContext *vactx, const uint8_t *buffer, uint32_t size)
Allocate a new slice descriptor for the input slice.
int ff_vaapi_context_fini(AVCodecContext *avctx)
Common AVHWAccel.uninit() implementation.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
int ff_vaapi_render_picture(FFVAContext *vactx, VASurfaceID surface)
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
AVBuffer references backing the data for this frame.
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
unsigned int slice_param_size
Size of a slice parameter element.
static FFVAContext * ff_vaapi_get_context(AVCodecContext *avctx)
Extract vaapi_context from an AVCodecContext.
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
void ff_vaapi_common_end_frame(AVCodecContext *avctx)
Common AVHWAccel.end_frame() implementation.
static int vaapi_vp9_end_frame(AVCodecContext *avctx)
int ff_vaapi_context_init(AVCodecContext *avctx)
Common AVHWAccel.init() implementation.
static void fill_picture_parameters(AVCodecContext *avctx, const VP9SharedContext *h, VADecPictureParameterBufferVP9 *pp)
const char * name
Name of the hardware accelerated codec.
int width
picture width / height.
static VASurfaceID ff_vaapi_get_surface_id(AVFrame *pic)
Extract VASurfaceID from an AVFrame.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
main external API structure.
int ff_vaapi_commit_slices(FFVAContext *vactx)
void * ff_vaapi_alloc_pic_param(FFVAContext *vactx, unsigned int size)
Allocate a new picture parameter buffer.
struct AVCodecContext * avctx
AVHWAccel ff_vp9_vaapi_hwaccel
static int vaapi_vp9_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
static int vaapi_vp9_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)