[Mesa-dev] [PATCH v4 0/6] nouveau: add support for vaapi
Julien Isorce
julien.isorce at gmail.com
Fri Sep 18 13:29:49 PDT 2015
On 17 September 2015 at 17:52, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Wed, Sep 16, 2015 at 8:22 AM, Julien Isorce <j.isorce at samsung.com>
> wrote:
> > I added below version4 updates. It works for all codecs expect h264.
> > Video is visible but lot of blockiness.
> > Can someone with a Radeon confirm that "LIBVA_DRIVER_NAME=gallium mpv
> --hwdec=vaapi"
> > is working on h264 videos ?
> > I want to make sure it is not a bug in st/va.
>
> The sad reality is that h264 is the only thing that matters (at least
> from this list of supported codecs). My concern is that this series
> will regress the situation for people who want to use VA-API -- right
> now they can use the vdpau <-> vaapi adapter, whereas with this patch
> series, they will end up with a va-api driver that doesn't work. So I
> can't merge this as-is.
>
Make perfectly sense.
>
> Are the various lengths (for inter-bo size/etc) being computed
> properly
In the past I compared the final content of the nouveau_bo buffer at each
endFrame step , with the content using vdpau. There were the same.
I will re-check.
Does it make sense to do that actually ?
Is there anything else I could compare with vdpau ?
> Are you writing stuff to the correct inter bo? IIRC we flip
> between two of them, perhaps that logic got upset?
Probably I missed something. Does the flip happen at each endFrame ?
Could you point out where this flip is in the current upstream code exactly
?
> Are you perhaps
> feeding it NAL types that it doesn't expect to see?
>
Good point, I'll check.
Thx
Julien
>
> >
> > v4:
> > Update caps after number of slices.
> > Fixed debug build.
> > After trying debug build I made a new patch "st/va: properly set max
> number of ref frames".
> > Tested videos:
> > * mpeg4 work ok:
> > mpv --hwdec=vaapi big_buck_bunny_720p_surround.avi (from
> http://download.blender.org/peach/bigbuckbunny_movies/)
> > * vc1 works ok:
> > mpv --hwdec=vaapi To_The_Limit_720_230.ismv (from
> http://playready.directtaps.net/smoothstreaming/)
> > * mpeg12 works ok:
> > mpv --hwdec=vaapi centaur_2.mpg (from
> https://github.com/malek0512/PLS/raw/master/Tests/centaur_2.mpg)
> > * h264 has blockiness like it was dropping some slices:
> > mpv --hwdec=vaapi any_video (from http://www.h264info.com/clips.html)
> > Depending on the video it can have more or much less blockiness.
> > * All this videos still work with option --hwdec=vdpau
> >
> > v3:
> > Indent to 3 spaces.
> > Move "unsigned bsp_size" and unsigned int nb_slices" in
> > commits that use it.
> >
> > v2:
> > Squash some commits as requested.
> >
> > Currently nouveau does not support chunk decoding
> > which is required to support st/va.
> >
> > The low level code is already there since it supports
> > vpau. But it is missing the possibility to feed
> > the nouveau_bo buffers gradually.
> > Resizing is already there too. But it also requires
> > to preserve the content after resizing.
> >
> > The following patches refactor nouveau_vp3_bsp
> > and nvc0_decoder_bsp in order to implement
> > pipe_video_codec::begin_frame/decode_bitstream/end_frame.
> > So that decode_bitstream can be call multiple times
> > between each begin/end.
> >
> > There is nothing really new in these patches.
> > All the low level code relative to nouveau was already there.
> > The patches are moving code in order to call nouveau_vp3_bsp and
> > nvc0_decoder_bsp multiple times between each begin/end frame.
> >
> > I made sure that vdpau was still working. Actually it was more than that,
> > without vdpau I think I would not have been able to do this refactoring.
> > I also compared that for one begin/end frame the nouveau_bo buffer
> contains
> > the same data for vdpau and vaapi. I dumped them for the same stream and
> > for several seconds. There were all the same.
> >
> > Regression tests:
> > No regression for vdpau backend.
> >
> > TODO:
> > Apply same logic for nv98 but I do not have the
> > material to test it. Ilia Mirkin suggested to do it after.
> >
> > https://bugs.freedesktop.org/show_bug.cgi?id=89969
> >
> > Julien Isorce (6):
> > nouveau: split nouveau_vp3_bsp in begin/next/end
> > nvc0: add support for st/va
> > nouveau: fix chunk decoding by updating number of slices
> > st/va: properly set max number of ref frames
> > build: enable st/va with nouveau driver
> > WIP: implement vaapi export / import and vpp
> >
> > src/gallium/drivers/nouveau/nouveau_vp3_video.h | 22 +-
> > .../drivers/nouveau/nouveau_vp3_video_bsp.c | 115 ++++--
> > src/gallium/drivers/nouveau/nv50/nv98_video_bsp.c | 5 +-
> > src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 3 +-
> > src/gallium/drivers/nouveau/nvc0/nvc0_video.c | 44 +-
> > src/gallium/drivers/nouveau/nvc0/nvc0_video.h | 18 +-
> > src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c | 141 +++++--
> > src/gallium/state_trackers/va/buffer.c | 175 +++++++-
> > src/gallium/state_trackers/va/config.c | 20 +
> > src/gallium/state_trackers/va/context.c | 101 +++--
> > src/gallium/state_trackers/va/image.c | 145 ++++++-
> > src/gallium/state_trackers/va/picture.c | 89 +++-
> > src/gallium/state_trackers/va/surface.c | 449
> ++++++++++++++++++---
> > src/gallium/state_trackers/va/va_private.h | 69 +++-
> > src/gallium/targets/va/Makefile.am | 2 +
> > 15 files changed, 1195 insertions(+), 203 deletions(-)
> >
> > --
> > 1.9.1
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150918/7b009114/attachment-0001.html>
More information about the mesa-dev
mailing list