[vlc-devel] [PATCH] vdpau: VDPAU hardware decoding with avcodec
Rémi Denis-Courmont
remi at remlab.net
Sat Jan 12 15:51:02 CET 2013
Le samedi 12 janvier 2013 16:42:16, Rafaël Carré a écrit :
> Le 12/01/2013 15:05, Rémi Denis-Courmont a écrit :
> > This requires libavcodec patches.
> > ---
> >
> > configure.ac | 38 ++++
> > modules/codec/Modules.am | 10 ++
> > modules/codec/avcodec/vdpau.c | 387
> > +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 435
> > insertions(+)
> > create mode 100644 modules/codec/avcodec/vdpau.c
> >
> > +static int Init (vlc_va_t *va, void **ctxp, vlc_fourcc_t *chromap,
> > + int width, int height)
> > +{
> > + vlc_va_sys_t *sys = va->sys;
> > + VdpStatus err;
> > +
> > + width = (width + 3) & ~3;
> > + height = (height + 3) & ~3;
>
> What happens if width % 4 == 1 ?
>
> Do we end up with the 3 rightmost columns filled with random pixel data?
I don't know. That is what the VdpVideoSurfaceCreate documentation says:
"Note that certain widths/heights are impossible for specific values of
chroma_type. For example, the definition of VDP_CHROMA_TYPE_420 implies that
the width must be even, since each single chroma sample covers two luma
samples horizontally. A similar argument applies to surface heights, although
doubly so, since interlaced pictures must be supported; each field's height
must itself be a multiple of 2. Hence the overall surface's height must be a
multiple of 4."
Maybe we should only pad the width to an even value, but that would not answer
your question.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list