[Mesa-dev] [PATCH 0/6] Add support for NV12

Christian Gmeiner christian.gmeiner at gmail.com
Fri Apr 26 07:41:43 UTC 2019


Hi Lucas

>
> Am Mittwoch, den 24.04.2019, 08:36 +0200 schrieb Christian Gmeiner:
> > This patch series goes a complete different route then the one from
> > Lucas Stach. I am using the integrated YUV tiler instead of using
> > the 2D core for format conversion. I am reusing some patches from
> > Lucas and this series sits on-top of Lucas "st/dri: YUV" patches.
>
> We specifically opted to use the 2D GPU to do a format conversion, as
> this yields a RGB internal representation, which means the texture has
> the same properties as a normal GL texture (e.g. glReadPixels works).
> This way we can expose YUV format imports as non-external textures.
>

Do you know out of head if rs can handle yuv? If that would be the case
the conversion from yuv -> rgb could also be done this way and you have
the same interal RGB representation. But I have the feeling
YUY2_RENDER_TARGET (aka. RS_FORMAT_YUY2) needs to be supported.

Is glReadPixels(..) and friends really an use-case for YUV textures? To be
honest I am not that deep in that topic.

Maybe you can 1-2 sentences about the reasoning for using the 2D core
somewhere in an commit message?

> This provides a number of benefits in texture lifetime handling in the
> upper layers of the stack, which are used to drive those video use-
> cases, like GStreamer. I don't really care what the blob does, but I do
> care about having the highest performing solution, which is to have the
> 2D GPU work in parallel with the 3D GPU and allow efficient texture
> imports with GStreamer.
>

As the branch point is coming I am okay with this. But I have the feeling
that we need to touch this area in near future for our lovely imx8 based gpus.

Btw. do you have some numbers regarding the speed-up you get by using the
2D core in parallel?

> I would really appreciate a review of my patch series.
>
> Regards,
> Lucas
>
> > Christian Gmeiner (3):
> >   etnaviv: direct YUYV/UYVY support
> >   etnaviv: update headers from rnndb
> >   etnaviv: add multi-planar YUV support
> >
> > Lucas Stach (3):
> >   etnaviv: clear out next pointer when allocating resource
> >   etnaviv: remember data offset into BO
> >   etnaviv: improve PIPE_BIND_LINEAR handling
> >
> >  .../drivers/etnaviv/etnaviv_clear_blit.c      |   2 +-
> >  src/gallium/drivers/etnaviv/etnaviv_format.c  |   5 +-
> >  .../drivers/etnaviv/etnaviv_resource.c        |  24 +++-
> >  src/gallium/drivers/etnaviv/etnaviv_rs.c      |   5 +
> >  src/gallium/drivers/etnaviv/etnaviv_screen.c  |   4 +
> >  src/gallium/drivers/etnaviv/etnaviv_texture.c |   8 ++
> >  src/gallium/drivers/etnaviv/etnaviv_yuv.c     | 123
> > ++++++++++++++++++
> >  src/gallium/drivers/etnaviv/etnaviv_yuv.h     |  44 +++++++
> >  src/gallium/drivers/etnaviv/hw/common.xml.h   |   2 +-
> >  .../drivers/etnaviv/hw/common_3d.xml.h        |   2 +-
> >  src/gallium/drivers/etnaviv/hw/state.xml.h    |   4 +-
> >  src/gallium/drivers/etnaviv/hw/state_3d.xml.h |  35 +++--
> >  .../drivers/etnaviv/hw/state_blt.xml.h        |   4 +-
> >  .../drivers/etnaviv/hw/texdesc_3d.xml.h       |   2 +-
> >  src/gallium/drivers/etnaviv/meson.build       |   2 +
> >  15 files changed, 240 insertions(+), 26 deletions(-)
> >  create mode 100644 src/gallium/drivers/etnaviv/etnaviv_yuv.c
> >  create mode 100644 src/gallium/drivers/etnaviv/etnaviv_yuv.h
> >



-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info


More information about the mesa-dev mailing list