On 19 October 2015 at 18:10, Emil Velikov <emil.l.veli...@gmail.com> wrote:
> On 17 October 2015 at 00:14, Julien Isorce <julien.iso...@gmail.com> > wrote: > > + > > + if (!(picture_width && picture_height) && !is_vpp) > > return VA_STATUS_ERROR_INVALID_IMAGE_FORMAT; > > > > drv = VL_VA_DRIVER(ctx); > > @@ -163,38 +177,48 @@ vlVaCreateContext(VADriverContextP ctx, VAConfigID > config_id, int picture_width, > > if (!context) > > return VA_STATUS_ERROR_ALLOCATION_FAILED; > > > > - templat.profile = config_id; > > - templat.entrypoint = PIPE_VIDEO_ENTRYPOINT_BITSTREAM; > > - templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420; > > - templat.width = picture_width; > > - templat.height = picture_height; > > - templat.max_references = num_render_targets; > > - templat.expect_chunked_decode = true; > > - > > - if (u_reduce_video_profile(templat.profile) == > > - PIPE_VIDEO_FORMAT_MPEG4_AVC) > > - templat.level = u_get_h264_level(templat.width, templat.height, > > - &templat.max_references); > > - > > - context->decoder = drv->pipe->create_video_codec(drv->pipe, > &templat); > > - if (!context->decoder) { > > - FREE(context); > > - return VA_STATUS_ERROR_ALLOCATION_FAILED; > > - } > > - > > - if (u_reduce_video_profile(context->decoder->profile) == > > - PIPE_VIDEO_FORMAT_MPEG4_AVC) { > > - context->desc.h264.pps = CALLOC_STRUCT(pipe_h264_pps); > > - if (!context->desc.h264.pps) { > > + if (is_vpp) { > > + context->decoder = NULL; > > + if (!drv->compositor.upload) { > > FREE(context); > > - return VA_STATUS_ERROR_ALLOCATION_FAILED; > > + return VA_STATUS_ERROR_INVALID_CONTEXT; > > } > > - context->desc.h264.pps->sps = CALLOC_STRUCT(pipe_h264_sps); > > - if (!context->desc.h264.pps->sps) { > > - FREE(context->desc.h264.pps); > > + } else { > > + templat.profile = config_id; > > + templat.entrypoint = PIPE_VIDEO_ENTRYPOINT_BITSTREAM; > > + templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420; > > + templat.width = picture_width; > > + templat.height = picture_height; > > + templat.max_references = 2; > > + templat.expect_chunked_decode = true; > > + > > + if (u_reduce_video_profile(templat.profile) == > > + PIPE_VIDEO_FORMAT_MPEG4_AVC) { > > + templat.max_references = 16; > > + templat.level = u_get_h264_level(templat.width, templat.height, > > + &templat.max_references); > > + } > > + > Why the max_references changes ? Shouldn't those be a separate patch ? > Ah thx, I think I messed up a rebase, this patch was originally on top of "[PATCH v4 4/6] st/va: properly set max number of ref frames" already submited but not reviewed . And I forgot about it :) I'll remove the dependency.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev