[Mesa-dev] [PATCH 1/4] nouveau: move interlaced assert down in nouveau_vp3_video_buffer_create

Ilia Mirkin imirkin at alum.mit.edu
Thu Nov 19 09:49:11 PST 2015


On Thu, Nov 19, 2015 at 4:37 AM, Julien Isorce <julien.isorce at gmail.com> wrote:
> templat->interlaced is 0 if not NV12 which is the case currently
> when using VPP.
>
> Signed-off-by: Julien Isorce <j.isorce at samsung.com>
> ---
>  src/gallium/drivers/nouveau/nouveau_vp3_video.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video.c b/src/gallium/drivers/nouveau/nouveau_vp3_video.c
> index f3a64b2..411b853 100644
> --- a/src/gallium/drivers/nouveau/nouveau_vp3_video.c
> +++ b/src/gallium/drivers/nouveau/nouveau_vp3_video.c
> @@ -83,10 +83,10 @@ nouveau_vp3_video_buffer_create(struct pipe_context *pipe,
>     struct pipe_sampler_view sv_templ;
>     struct pipe_surface surf_templ;
>
> -   assert(templat->interlaced);
>     if (getenv("XVMC_VL") || templat->buffer_format != PIPE_FORMAT_NV12)
>        return vl_video_buffer_create(pipe, templat);
>
> +   assert(templat->interlaced);
>     assert(templat->chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420);
>
>     buffer = CALLOC_STRUCT(nouveau_vp3_video_buffer);
> --

Makes sense. Looks like this is (roughly) how I did it in
nv84_video_buffer_create too -- i.e. bail first if !NV12 and then
check interlaced.

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>


More information about the mesa-dev mailing list