• Home
  • Raw
  • Download

Lines Matching refs:context

44    vlVaContext *context;  in vlVaBeginPicture()  local
55 context = handle_table_get(drv->htab, context_id); in vlVaBeginPicture()
56 if (!context) { in vlVaBeginPicture()
61 if (u_reduce_video_profile(context->templat.profile) == PIPE_VIDEO_FORMAT_MPEG12) { in vlVaBeginPicture()
62 context->desc.mpeg12.intra_matrix = NULL; in vlVaBeginPicture()
63 context->desc.mpeg12.non_intra_matrix = NULL; in vlVaBeginPicture()
71 context->target_id = render_target; in vlVaBeginPicture()
73 context->target = surf->buffer; in vlVaBeginPicture()
74 context->mjpeg.sampling_factor = 0; in vlVaBeginPicture()
76 if (!context->decoder) { in vlVaBeginPicture()
79 if (context->templat.profile == PIPE_VIDEO_PROFILE_UNKNOWN && in vlVaBeginPicture()
80 context->target->buffer_format != PIPE_FORMAT_B8G8R8A8_UNORM && in vlVaBeginPicture()
81 context->target->buffer_format != PIPE_FORMAT_R8G8B8A8_UNORM && in vlVaBeginPicture()
82 context->target->buffer_format != PIPE_FORMAT_B8G8R8X8_UNORM && in vlVaBeginPicture()
83 context->target->buffer_format != PIPE_FORMAT_R8G8B8X8_UNORM && in vlVaBeginPicture()
84 context->target->buffer_format != PIPE_FORMAT_NV12 && in vlVaBeginPicture()
85 context->target->buffer_format != PIPE_FORMAT_P010 && in vlVaBeginPicture()
86 context->target->buffer_format != PIPE_FORMAT_P016) in vlVaBeginPicture()
92 if (context->decoder->entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE) in vlVaBeginPicture()
93 context->needs_begin_frame = true; in vlVaBeginPicture()
110 handlePictureParameterBuffer(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf) in handlePictureParameterBuffer() argument
114 u_reduce_video_profile(context->templat.profile); in handlePictureParameterBuffer()
118 vlVaHandlePictureParameterBufferMPEG12(drv, context, buf); in handlePictureParameterBuffer()
122 vlVaHandlePictureParameterBufferH264(drv, context, buf); in handlePictureParameterBuffer()
126 vlVaHandlePictureParameterBufferVC1(drv, context, buf); in handlePictureParameterBuffer()
130 vlVaHandlePictureParameterBufferMPEG4(drv, context, buf); in handlePictureParameterBuffer()
134 vlVaHandlePictureParameterBufferHEVC(drv, context, buf); in handlePictureParameterBuffer()
138 vlVaHandlePictureParameterBufferMJPEG(drv, context, buf); in handlePictureParameterBuffer()
142 vlVaHandlePictureParameterBufferVP9(drv, context, buf); in handlePictureParameterBuffer()
150 if (!context->decoder) { in handlePictureParameterBuffer()
151 if (!context->target) in handlePictureParameterBuffer()
155 context->templat.level = u_get_h264_level(context->templat.width, in handlePictureParameterBuffer()
156 context->templat.height, &context->templat.max_references); in handlePictureParameterBuffer()
158 context->decoder = drv->pipe->create_video_codec(drv->pipe, in handlePictureParameterBuffer()
159 &context->templat); in handlePictureParameterBuffer()
161 if (!context->decoder) in handlePictureParameterBuffer()
164 context->needs_begin_frame = true; in handlePictureParameterBuffer()
168 context->decoder->width = in handlePictureParameterBuffer()
169 context->desc.vp9.picture_parameter.frame_width; in handlePictureParameterBuffer()
170 context->decoder->height = in handlePictureParameterBuffer()
171 context->desc.vp9.picture_parameter.frame_height; in handlePictureParameterBuffer()
178 handleIQMatrixBuffer(vlVaContext *context, vlVaBuffer *buf) in handleIQMatrixBuffer() argument
180 switch (u_reduce_video_profile(context->templat.profile)) { in handleIQMatrixBuffer()
182 vlVaHandleIQMatrixBufferMPEG12(context, buf); in handleIQMatrixBuffer()
186 vlVaHandleIQMatrixBufferH264(context, buf); in handleIQMatrixBuffer()
190 vlVaHandleIQMatrixBufferMPEG4(context, buf); in handleIQMatrixBuffer()
194 vlVaHandleIQMatrixBufferHEVC(context, buf); in handleIQMatrixBuffer()
198 vlVaHandleIQMatrixBufferMJPEG(context, buf); in handleIQMatrixBuffer()
207 handleSliceParameterBuffer(vlVaContext *context, vlVaBuffer *buf) in handleSliceParameterBuffer() argument
209 switch (u_reduce_video_profile(context->templat.profile)) { in handleSliceParameterBuffer()
211 vlVaHandleSliceParameterBufferMPEG12(context, buf); in handleSliceParameterBuffer()
215 vlVaHandleSliceParameterBufferVC1(context, buf); in handleSliceParameterBuffer()
219 vlVaHandleSliceParameterBufferH264(context, buf); in handleSliceParameterBuffer()
223 vlVaHandleSliceParameterBufferMPEG4(context, buf); in handleSliceParameterBuffer()
227 vlVaHandleSliceParameterBufferHEVC(context, buf); in handleSliceParameterBuffer()
231 vlVaHandleSliceParameterBufferMJPEG(context, buf); in handleSliceParameterBuffer()
235 vlVaHandleSliceParameterBufferVP9(context, buf); in handleSliceParameterBuffer()
262 handleVAProtectedSliceDataBufferType(vlVaContext *context, vlVaBuffer *buf) in handleVAProtectedSliceDataBufferType() argument
268 context->desc.base.decrypt_key = CALLOC(1, drm_key_size); in handleVAProtectedSliceDataBufferType()
269 memcpy(context->desc.base.decrypt_key, encrypted_data, drm_key_size); in handleVAProtectedSliceDataBufferType()
270 context->desc.base.protected_playback = true; in handleVAProtectedSliceDataBufferType()
274 handleVASliceDataBufferType(vlVaContext *context, vlVaBuffer *buf) in handleVASliceDataBufferType() argument
276 enum pipe_video_format format = u_reduce_video_profile(context->templat.profile); in handleVASliceDataBufferType()
285 format = u_reduce_video_profile(context->templat.profile); in handleVASliceDataBufferType()
286 if (!context->desc.base.protected_playback) { in handleVASliceDataBufferType()
308 if (context->decoder->profile == PIPE_VIDEO_PROFILE_VC1_ADVANCED) { in handleVASliceDataBufferType()
317 vlVaDecoderFixMPEG4Startcode(context); in handleVASliceDataBufferType()
318 buffers[num_buffers] = (void *)context->mpeg4.start_code; in handleVASliceDataBufferType()
319 sizes[num_buffers++] = context->mpeg4.start_code_size; in handleVASliceDataBufferType()
322 vlVaGetJpegSliceHeader(context); in handleVASliceDataBufferType()
323 buffers[num_buffers] = (void *)context->mjpeg.slice_header; in handleVASliceDataBufferType()
324 sizes[num_buffers++] = context->mjpeg.slice_header_size; in handleVASliceDataBufferType()
327 vlVaDecoderVP9BitstreamHeader(context, buf); in handleVASliceDataBufferType()
334 if (context->desc.base.protected_playback && PIPE_VIDEO_FORMAT_VP9 == format){ in handleVASliceDataBufferType()
335 vlVaDecoderVP9BitstreamHeader(context, buf); in handleVASliceDataBufferType()
336 …buffers[num_buffers] = buf->data + context->desc.vp9.picture_parameter.frame_header_length_in_byte… in handleVASliceDataBufferType()
337 … sizes[num_buffers] = buf->size - context->desc.vp9.picture_parameter.frame_header_length_in_bytes; in handleVASliceDataBufferType()
350 if (context->needs_begin_frame) { in handleVASliceDataBufferType()
351 context->decoder->begin_frame(context->decoder, context->target, in handleVASliceDataBufferType()
352 &context->desc.base); in handleVASliceDataBufferType()
353 context->needs_begin_frame = false; in handleVASliceDataBufferType()
355 context->decoder->decode_bitstream(context->decoder, context->target, &context->desc.base, in handleVASliceDataBufferType()
360 handleVAEncMiscParameterTypeRateControl(vlVaContext *context, VAEncMiscParameterBuffer *misc) in handleVAEncMiscParameterTypeRateControl() argument
364 switch (u_reduce_video_profile(context->templat.profile)) { in handleVAEncMiscParameterTypeRateControl()
366 status = vlVaHandleVAEncMiscParameterTypeRateControlH264(context, misc); in handleVAEncMiscParameterTypeRateControl()
370 status = vlVaHandleVAEncMiscParameterTypeRateControlHEVC(context, misc); in handleVAEncMiscParameterTypeRateControl()
381 handleVAEncMiscParameterTypeFrameRate(vlVaContext *context, VAEncMiscParameterBuffer *misc) in handleVAEncMiscParameterTypeFrameRate() argument
385 switch (u_reduce_video_profile(context->templat.profile)) { in handleVAEncMiscParameterTypeFrameRate()
387 status = vlVaHandleVAEncMiscParameterTypeFrameRateH264(context, misc); in handleVAEncMiscParameterTypeFrameRate()
391 status = vlVaHandleVAEncMiscParameterTypeFrameRateHEVC(context, misc); in handleVAEncMiscParameterTypeFrameRate()
402 handleVAEncSequenceParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf) in handleVAEncSequenceParameterBufferType() argument
406 switch (u_reduce_video_profile(context->templat.profile)) { in handleVAEncSequenceParameterBufferType()
408 status = vlVaHandleVAEncSequenceParameterBufferTypeH264(drv, context, buf); in handleVAEncSequenceParameterBufferType()
412 status = vlVaHandleVAEncSequenceParameterBufferTypeHEVC(drv, context, buf); in handleVAEncSequenceParameterBufferType()
423 handleVAEncMiscParameterBufferType(vlVaContext *context, vlVaBuffer *buf) in handleVAEncMiscParameterBufferType() argument
431 vaStatus = handleVAEncMiscParameterTypeRateControl(context, misc); in handleVAEncMiscParameterBufferType()
435 vaStatus = handleVAEncMiscParameterTypeFrameRate(context, misc); in handleVAEncMiscParameterBufferType()
446 handleVAEncPictureParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf) in handleVAEncPictureParameterBufferType() argument
450 switch (u_reduce_video_profile(context->templat.profile)) { in handleVAEncPictureParameterBufferType()
452 status = vlVaHandleVAEncPictureParameterBufferTypeH264(drv, context, buf); in handleVAEncPictureParameterBufferType()
456 status = vlVaHandleVAEncPictureParameterBufferTypeHEVC(drv, context, buf); in handleVAEncPictureParameterBufferType()
467 handleVAEncSliceParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf) in handleVAEncSliceParameterBufferType() argument
471 switch (u_reduce_video_profile(context->templat.profile)) { in handleVAEncSliceParameterBufferType()
473 status = vlVaHandleVAEncSliceParameterBufferTypeH264(drv, context, buf); in handleVAEncSliceParameterBufferType()
477 status = vlVaHandleVAEncSliceParameterBufferTypeHEVC(drv, context, buf); in handleVAEncSliceParameterBufferType()
488 handleVAEncPackedHeaderParameterBufferType(vlVaContext *context, vlVaBuffer *buf) in handleVAEncPackedHeaderParameterBufferType() argument
492 switch (u_reduce_video_profile(context->templat.profile)) { in handleVAEncPackedHeaderParameterBufferType()
502 context->packed_header_type = param->type; in handleVAEncPackedHeaderParameterBufferType()
510 handleVAEncPackedHeaderDataBufferType(vlVaContext *context, vlVaBuffer *buf) in handleVAEncPackedHeaderDataBufferType() argument
514 if (context->packed_header_type != VAEncPackedHeaderSequence) in handleVAEncPackedHeaderDataBufferType()
517 switch (u_reduce_video_profile(context->templat.profile)) { in handleVAEncPackedHeaderDataBufferType()
519 status = vlVaHandleVAEncPackedHeaderDataBufferTypeHEVC(context, buf); in handleVAEncPackedHeaderDataBufferType()
533 vlVaContext *context; in vlVaRenderPicture() local
546 context = handle_table_get(drv->htab, context_id); in vlVaRenderPicture()
547 if (!context) { in vlVaRenderPicture()
561 handleVAProtectedSliceDataBufferType(context, buf); in vlVaRenderPicture()
569 vaStatus = handlePictureParameterBuffer(drv, context, buf); in vlVaRenderPicture()
573 handleIQMatrixBuffer(context, buf); in vlVaRenderPicture()
577 handleSliceParameterBuffer(context, buf); in vlVaRenderPicture()
581 handleVASliceDataBufferType(context, buf); in vlVaRenderPicture()
585 vaStatus = vlVaHandleVAProcPipelineParameterBufferType(drv, context, buf); in vlVaRenderPicture()
589 vaStatus = handleVAEncSequenceParameterBufferType(drv, context, buf); in vlVaRenderPicture()
593 vaStatus = handleVAEncMiscParameterBufferType(context, buf); in vlVaRenderPicture()
597 vaStatus = handleVAEncPictureParameterBufferType(drv, context, buf); in vlVaRenderPicture()
601 vaStatus = handleVAEncSliceParameterBufferType(drv, context, buf); in vlVaRenderPicture()
605 vlVaHandleHuffmanTableBufferType(context, buf); in vlVaRenderPicture()
609 handleVAEncPackedHeaderParameterBufferType(context, buf); in vlVaRenderPicture()
612 handleVAEncPackedHeaderDataBufferType(context, buf); in vlVaRenderPicture()
628 vlVaContext *context; in vlVaEndPicture() local
645 context = handle_table_get(drv->htab, context_id); in vlVaEndPicture()
647 if (!context) in vlVaEndPicture()
650 if (!context->decoder) { in vlVaEndPicture()
651 if (context->templat.profile != PIPE_VIDEO_PROFILE_UNKNOWN) in vlVaEndPicture()
659 surf = handle_table_get(drv->htab, context->target_id); in vlVaEndPicture()
660 context->mpeg4.frame_num++; in vlVaEndPicture()
662 screen = context->decoder->context->screen; in vlVaEndPicture()
663 supported = screen->get_video_param(screen, context->decoder->profile, in vlVaEndPicture()
664 context->decoder->entrypoint, in vlVaEndPicture()
671 context->decoder->profile, in vlVaEndPicture()
672 context->decoder->entrypoint, in vlVaEndPicture()
677 format = screen->get_video_param(screen, context->decoder->profile, in vlVaEndPicture()
688 if (u_reduce_video_profile(context->templat.profile) == PIPE_VIDEO_FORMAT_JPEG && in vlVaEndPicture()
690 if (context->mjpeg.sampling_factor == 0x211111 || in vlVaEndPicture()
691 context->mjpeg.sampling_factor == 0x221212) { in vlVaEndPicture()
694 } else if (context->mjpeg.sampling_factor != 0x221111) { in vlVaEndPicture()
701 if ((surf->templat.bind & PIPE_BIND_PROTECTED) != context->desc.base.protected_playback) { in vlVaEndPicture()
702 if (context->desc.base.protected_playback) { in vlVaEndPicture()
718 if (context->decoder->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) { in vlVaEndPicture()
737 context->target = surf->buffer; in vlVaEndPicture()
740 if (context->decoder->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) { in vlVaEndPicture()
741 coded_buf = context->coded_buf; in vlVaEndPicture()
742 if (u_reduce_video_profile(context->templat.profile) == PIPE_VIDEO_FORMAT_MPEG4_AVC) { in vlVaEndPicture()
743 getEncParamPresetH264(context); in vlVaEndPicture()
744 context->desc.h264enc.frame_num_cnt++; in vlVaEndPicture()
745 } else if (u_reduce_video_profile(context->templat.profile) == PIPE_VIDEO_FORMAT_HEVC) in vlVaEndPicture()
746 getEncParamPresetH265(context); in vlVaEndPicture()
747 context->decoder->begin_frame(context->decoder, context->target, &context->desc.base); in vlVaEndPicture()
748 context->decoder->encode_bitstream(context->decoder, context->target, in vlVaEndPicture()
754 context->decoder->end_frame(context->decoder, context->target, &context->desc.base); in vlVaEndPicture()
755 if (context->decoder->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE && in vlVaEndPicture()
756 u_reduce_video_profile(context->templat.profile) == PIPE_VIDEO_FORMAT_MPEG4_AVC) { in vlVaEndPicture()
757 int idr_period = context->desc.h264enc.gop_size / context->gop_coeff; in vlVaEndPicture()
758 int p_remain_in_idr = idr_period - context->desc.h264enc.frame_num; in vlVaEndPicture()
759 surf->frame_num_cnt = context->desc.h264enc.frame_num_cnt; in vlVaEndPicture()
761 if (context->first_single_submitted) { in vlVaEndPicture()
762 context->decoder->flush(context->decoder); in vlVaEndPicture()
763 context->first_single_submitted = false; in vlVaEndPicture()
767 if ((context->desc.h264enc.frame_num_cnt % 2) != 0) { in vlVaEndPicture()
768 context->decoder->flush(context->decoder); in vlVaEndPicture()
769 context->first_single_submitted = true; in vlVaEndPicture()
772 context->first_single_submitted = false; in vlVaEndPicture()
775 } else if (context->decoder->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE && in vlVaEndPicture()
776 u_reduce_video_profile(context->templat.profile) == PIPE_VIDEO_FORMAT_HEVC) in vlVaEndPicture()
777 context->desc.h265enc.frame_num++; in vlVaEndPicture()