[FFmpeg-devel] [PATCH] H264 DXVA2 implementation
Tue Jan 12 01:56:22 CET 2010
On Sun, Jan 10, 2010 at 10:05:05PM +0100, Laurent Aimar wrote:
> On Sun, Jan 10, 2010, Reimar D?ffinger wrote:
> > On Sun, Jan 10, 2010 at 08:48:46PM +0100, Laurent Aimar wrote:
> > > Hi,
> > >
> > > On Sun, Jan 10, 2010, Reimar D?ffinger wrote:
> > > > Which of course means the requirements for FFmpeg change from "requires a C99 compatible compiler" to
> > > > "requires a compiler compatible to some bastardized mix of C99 and whatever Microsoft calls C", not to
> > > > mention that you'd probably also need -mms-bitfields.
> > > > And with all that compiler checks to make sure we don't mess up too much if any of these are not available.
> > >
> > > I can also send a patch that only use the field bPicEntry and then remove the
> > > nameless struct/union in the header (it won't be complete anymore but still
> > > usable).
> > _I_ think that would be a good solution, adding the appropriate compiler flags
> > would be possible, too, but it certainly will be more than one line in configure
> > (at least: Makefile so it is only used for that file, configure: only check
> > if the flag is available, don't add it to cflags, fail or disable dxva if it
> > is not supported).
> Attached is a diff against dxva2_h264.c to avoid using bitfields in dxva2api.h.
> (If oked, I will send a complete patch once I have validated the changes).
> dxva2_h264.c | 58 ++++++++++++++++++++++++++++++++++++----------------------
> 1 file changed, 36 insertions(+), 22 deletions(-)
> e478d25e97f7128a0d3acc108117885ef7020176 ffmpeg-dxva2-nobitfields.patch
> diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
> index fa2a3e7..af1a998 100644
> --- a/libavcodec/dxva2_h264.c
> +++ b/libavcodec/dxva2_h264.c
> @@ -55,6 +55,13 @@ static unsigned get_surface_index(const struct dxva_context *ctx,
> return 0;
> +static void fill_picture_entry(DXVA_PicEntry_H264 *pic,
> + unsigned index, unsigned flag)
> + assert((index&0x7f) == index && (flag&0x01) == flag);
assert(index<=0x7f && flag<=1);
this patch is otherwise ok
ill review the whole when you repost it
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel