diff options
author | CrystalP <CrystalP@xbmc.org> | 2011-10-10 19:42:50 -0400 |
---|---|---|
committer | CrystalP <CrystalP@xbmc.org> | 2011-10-15 17:19:05 -0400 |
commit | 3274326600051dd9978a8ba889824b9fa94e4baa (patch) | |
tree | 5e68c7d7898fc01e5ec452665f757a4d594cc89b /lib/ffmpeg/libavcodec/dxva2.h | |
parent | db66c987e276a74a9e210d28fb3e0e67d277e99a (diff) |
dxva-mpeg2 speed up slice allocation
The number of slices is not very likely to change from frame to frame, so
at the beginning of a new frame, allocate memory for the amount of slices of
the previous frame. Saves a lot of reallocation, for some TV capture samples
there are over 200 slices.
There wasn't anywhere really appropriate to store last_slice_count (needs to
live from first frame to last frame), so this is likely to cause discussion to
merge upstream.
Adding members to dxva_context breaks ABI, which we don't care too much about
since on Windows we don't support external ffmpeg.
dxva mpeg2 code also has access to MpegEncContext, but adding there would
likely break ABI as well.
Diffstat (limited to 'lib/ffmpeg/libavcodec/dxva2.h')
-rw-r--r-- | lib/ffmpeg/libavcodec/dxva2.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ffmpeg/libavcodec/dxva2.h b/lib/ffmpeg/libavcodec/dxva2.h index 6eb494b9fe..12dce4704b 100644 --- a/lib/ffmpeg/libavcodec/dxva2.h +++ b/lib/ffmpeg/libavcodec/dxva2.h @@ -65,6 +65,7 @@ struct dxva_context { * Private to the FFmpeg AVHWAccel implementation */ unsigned report_id; + unsigned last_slice_count; }; #endif /* AVCODEC_DXVA_H */ |