[Mesa-dev] [PATCH v3] st/va: delay decoder creation until max_references is known
Julien Isorce
julien.isorce at gmail.com
Mon Nov 30 14:16:49 PST 2015
On 30 November 2015 at 12:03, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 26 November 2015 at 08:45, Julien Isorce <julien.isorce at gmail.com>
> wrote:
>
> > --- a/src/gallium/state_trackers/va/picture.c
> > +++ b/src/gallium/state_trackers/va/picture.c
>
> > @@ -113,12 +118,37 @@ handlePictureParameterBuffer(vlVaDriver *drv,
> vlVaContext *context, vlVaBuffer *
> > default:
> > break;
> > }
> > +
> > + /* Create the decoder once max_references is known. */
> > + if (!context->decoder) {
> > + if (!context->target)
> > + return VA_STATUS_ERROR_INVALID_CONTEXT;
> > +
> > + if (context->templat.max_references == 0)
> > + return VA_STATUS_ERROR_INVALID_BUFFER;
> > +
> > + if (u_reduce_video_profile(context->templat.profile) !=
> > + PIPE_VIDEO_FORMAT_MPEG4_AVC)
> > + context->templat.level =
> u_get_h264_level(context->templat.width,
> > + context->templat.height, &context->templat.max_references);
>
> Erm shouldn't this one be "if profile == h264 { get_h264_level(...) }" ?
>
Indeed :) Thx Emil.
>
> With the above fixed
> Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
>
> -Emil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151130/5568338c/attachment.html>
More information about the mesa-dev
mailing list