Lines Matching defs:context
55 vlVaPostProcCompositor(vlVaDriver *drv, vlVaContext *context,
114 static VAStatus vlVaVidEngineBlit(vlVaDriver *drv, vlVaContext *context,
142 context->desc.vidproc.base.input_format = src->buffer_format;
143 context->desc.vidproc.base.output_format = dst->buffer_format;
145 context->desc.vidproc.src_region = src_rect;
146 context->desc.vidproc.dst_region = dst_rect;
149 context->desc.vidproc.orientation = PIPE_VIDEO_VPP_ORIENTATION_DEFAULT;
151 context->desc.vidproc.orientation = PIPE_VIDEO_VPP_ROTATION_90;
153 context->desc.vidproc.orientation = PIPE_VIDEO_VPP_ROTATION_180;
155 context->desc.vidproc.orientation = PIPE_VIDEO_VPP_ROTATION_270;
158 context->desc.vidproc.orientation |= PIPE_VIDEO_VPP_FLIP_HORIZONTAL;
160 context->desc.vidproc.orientation |= PIPE_VIDEO_VPP_FLIP_VERTICAL;
162 memset(&context->desc.vidproc.blend, 0, sizeof(context->desc.vidproc.blend));
163 context->desc.vidproc.blend.mode = PIPE_VIDEO_VPP_BLEND_MODE_NONE;
166 context->desc.vidproc.blend.mode = PIPE_VIDEO_VPP_BLEND_MODE_GLOBAL_ALPHA;
167 context->desc.vidproc.blend.global_alpha = param->blend_state->global_alpha;
171 if (context->needs_begin_frame) {
172 context->decoder->begin_frame(context->decoder, dst,
173 &context->desc.base);
174 context->needs_begin_frame = false;
176 context->decoder->process_frame(context->decoder, src, &context->desc.vidproc);
177 context->vpp_needs_flush_on_endpic = true;
182 static VAStatus vlVaPostProcBlit(vlVaDriver *drv, vlVaContext *context,
215 surf = handle_table_get(drv->htab, context->target_id);
222 dst = context->target = surf->buffer;
296 util_compute_blit(drv->pipe, &blit, &context->blit_cs, !drv->compositor.deinterlace);
308 vlVaApplyDeint(vlVaDriver *drv, vlVaContext *context,
326 if (context->deint && (context->deint->video_width != current->width ||
327 context->deint->video_height != current->height)) {
328 vl_deint_filter_cleanup(context->deint);
329 FREE(context->deint);
330 context->deint = NULL;
333 if (!context->deint) {
334 context->deint = MALLOC(sizeof(struct vl_deint_filter));
335 if (!vl_deint_filter_init(context->deint, drv->pipe, current->width,
337 FREE(context->deint);
338 context->deint = NULL;
343 if (!vl_deint_filter_check_buffers(context->deint, prevprev->buffer,
347 vl_deint_filter_render(context->deint, prevprev->buffer, prev->buffer,
349 return context->deint->video_buffer;
353 vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf)
364 if (!drv || !context)
370 if (!context->target)
376 dst_surface = handle_table_get(drv->htab, context->target_id);
395 surf = handle_table_get(drv->htab, context->target_id);
404 context->target = surf->buffer;
426 dst = context->target = surf->buffer;
453 src = vlVaApplyDeint(drv, context, param, src,
480 if (!context->decoder) {
481 context->decoder = drv->pipe->create_video_codec(drv->pipe, &context->templat);
482 if (!context->decoder)
487 if (VA_STATUS_SUCCESS == vlVaVidEngineBlit(drv, context, src_region, dst_region,
488 src, context->target, deinterlace, param))
493 if (context->target->buffer_format != PIPE_FORMAT_NV12 &&
494 context->target->buffer_format != PIPE_FORMAT_P010 &&
495 context->target->buffer_format != PIPE_FORMAT_P016)
496 return vlVaPostProcCompositor(drv, context, src_region, dst_region,
497 src, context->target, deinterlace);
499 return vlVaPostProcBlit(drv, context, src_region, dst_region,
500 src, context->target, deinterlace);