[FFmpeg-devel] [RFC] DXVA2 decoding and FFmpeg

Stefano Sabatini stefasab at gmail.com
Thu May 28 19:39:00 CEST 2015


On date Monday 2015-05-18 13:26:56 +0200, Stefano Sabatini encoded:
> On Mon, May 18, 2015 at 1:17 PM, Hendrik Leppkes <h.leppkes at gmail.com>
> wrote:
> 
> > On Mon, May 18, 2015 at 12:37 PM, Stefano Sabatini <stefasab at gmail.com>
> > wrote:
> >
> [...]
> 
> > >
> > > I have a first hackish patch, performed some tests and I got some
> > > significant performance gains, on my iCore5 with Intel Graphics HD4000 I
> > > have now the same performance as the software decoder using DXVA2 for
> > > decoding a H.264 1920x1080 video, but using only a single thread. The
> > patch
> > > as is is a hack, since I had to modify the compilation flags to enable
> > > assembly compilation in the ffmpeg_dxva2.c file. I should probably create
> > > an optimized copy function in libavutil, comments are welcome.
> >
> > FWIW, I never saw any benefits from using a small cache over simply
> > copying directly to the destination memory, that could potentially
> > simplify this a bit.
> >
> 
> 
> > And yeah, its a huge hack, we don't want new inline assembly.
> >
> 
> The sanest approach is probably to add a function to libavutil. The
> optimized copy would then be accessible to third-party library users, with
> no assembly hacks involved.

New patch attached, it's still somehow hackish, please advice if you
consider this approach acceptable.
-- 
FFmpeg = Formidable and Friendly MultiPurpose Explosive Game
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavu-imgutils-add-av_image_copy_plane_from_uswc-func.patch
Type: text/x-diff
Size: 8996 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150528/fa04de85/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-ffmpeg_dxva2-use-optimized-copy-function-from-GPU-to.patch
Type: text/x-diff
Size: 2133 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150528/fa04de85/attachment-0001.bin>


More information about the ffmpeg-devel mailing list