Commit Graph

52 Commits

Author SHA1 Message Date
Luca Barbato 08377f9c3b dxva: Include last the internal header
It redefines _WIN32_WINNT, possibly causing problems with the
w32pthreads.h header.
2015-10-14 14:35:34 +02:00
Steve Lhomme d8039ef8d2 D3D11va: add a Direct3D11 video decoder similar to DXVA2
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-25 11:47:08 +02:00
Anton Khirnov a0f2946068 h264: use properly allocated AVFrames 2015-04-29 05:52:58 +02:00
Hendrik Leppkes ae4f5d944c dxva2_h264: fix slice offset in long slice structs 2015-03-23 20:53:29 +00:00
Anton Khirnov a12d3188cb h264: use a smaller struct for the ref lists
There is no need to store a whole H264Picture, with a full AVFrame
embedded in it. This should allow getting rid of the embedded AVFrame
later.
2015-03-21 11:27:16 +01:00
Anton Khirnov d4d9068cdf h264: move mb_{x,y} into the per-slice context 2015-03-21 11:27:14 +01:00
Anton Khirnov 9951907f6f h264: move redundant_pic_count into the per-slice context 2015-03-21 11:27:14 +01:00
Anton Khirnov a9b201cacf h264: move cabac_init_idc into the per-slice context 2015-03-21 11:27:14 +01:00
Anton Khirnov e6c90ce94f h264: move loopfilter parameters into the per-slice context 2015-03-21 11:27:14 +01:00
Anton Khirnov 95eb35f305 h264: move the ref lists variables into the per-slice context 2015-03-21 11:27:13 +01:00
Anton Khirnov 066aafced4 h264: move direct_spatial_mv_pred into the per-slice context 2015-03-21 11:27:13 +01:00
Anton Khirnov 56febc993b h264: move the slice type variables into the per-slice context 2015-03-21 11:27:13 +01:00
Anton Khirnov d231e84b06 h264: move the quantizers into the per-slice context 2015-03-21 11:27:12 +01:00
Anton Khirnov 92c6c2a605 h264: split weighted pred-related vars into per-slice context 2015-03-21 11:27:09 +01:00
Diego Biurrun 4600a85eaa dxva2: Pass variable of correct type to IDirectXVideoDecoder_GetBuffer()
This avoids related incompatible pointer type warnings.
2014-09-01 12:23:58 +02:00
Anton Khirnov a871ef0cc9 hwaccel: Rename priv_data_size to frame_priv_data_size
This describes more accurately what this field is for.
2014-05-11 14:59:07 +02:00
Michael Niedermayer b2b4afe811 hwaccel: fix dxva2 & vaapi loop filter parameters
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-28 20:23:17 +02:00
Hendrik Leppkes ed4b757177 dxva2_h264: add a workaround for old Intel GPUs
Old Intel GPUs expect the reference frame index to the actual surface,
instead of the index into RefFrameList as specified by the spec.

This workaround should be set when using one of the "ClearVideo" decoder
devices.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-28 20:21:59 +02:00
Hendrik Leppkes 2fcef90bee dxva2_h264: set the correct ref frame index in the long slice struct
The latest H.264 DXVA specification states that the index in this
structure should refer to a valid entry in the RefFrameList of the picture
parameter structure, and not to the actual surface index.

Fixes H.264 DXVA2 decoding on recent Intel GPUs (tested on Sandy and Ivy)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-04-28 20:12:44 +02:00
Michael Niedermayer 678e455f1d dxva2: Directly use AVFrames
The assumption of (MPEG) Picture and H264Picture layout matching might
not hold true in the future.

Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
2014-04-01 00:10:15 +02:00
Vittorio Giovara e0c16e4e32 mpegvideo: move mpegvideo formats-related defines to mpegutils.h 2014-03-16 23:04:41 +01:00
Vittorio Giovara 9b749c8274 h264: move relevant fields from Picture to H264Picture 2014-03-16 23:01:00 +01:00
Anton Khirnov a6931d8ece h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.
This way it does not look like a constant.
2013-03-21 10:20:48 +01:00
Anton Khirnov 759001c534 lavc decoders: work with refcounted frames. 2013-03-08 07:38:30 +01:00
Anton Khirnov ad0c9f2d5d lavc: move AVFrame.hwaccel_picture_private to Picture.
This field is private and should not be present in a public struct. It
is only used in DXVA with mpegvideo-based decoders currently.
2013-03-08 07:36:01 +01:00
Diego Biurrun c57a593670 hwaccel: consistent name prefixes for start_frame/end_frame/decode_slice
Some hwaccels use name prefixes, some do not, others only use them for
some codecs.  Add prefixes everywhere for consistency.
2013-03-05 11:22:45 +01:00
Anton Khirnov 2c54155407 h264: deMpegEncContextize
Most of the changes are just trivial are just trivial replacements of
fields from MpegEncContext with equivalent fields in H264Context.
Everything in h264* other than h264.c are those trivial changes.

The nontrivial parts are:
1) extracting a simplified version of the frame management code from
   mpegvideo.c. We don't need last/next_picture anymore, since h264 uses
   its own more complex system already and those were set only to appease
   the mpegvideo parts.
2) some tables that need to be allocated/freed in appropriate places.
3) hwaccels -- mostly trivial replacements.
   for dxva, the draw_horiz_band() call is moved from
   ff_dxva2_common_end_frame() to per-codec end_frame() callbacks,
   because it's now different for h264 and MpegEncContext-based
   decoders.
4) svq3 -- it does not use h264 complex reference system, so I just
   added some very simplistic frame management instead and dropped the
   use of ff_h264_frame_start(). Because of this I also had to move some
   initialization code to svq3.

Additional fixes for chroma format and bit depth changes by
Janne Grunau <janne-libav@jannau.net>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-02-15 16:35:16 +01:00
Anton Khirnov 716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Anton Khirnov 36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Hendrik Leppkes ea1c5011b3 dxva2_h264: fix signaling of mbaff frames
The MBAFF flag may only be signaled if we're actually dealing with
a full frame, and not singular fields, as it can happen in mixed content.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-26 11:59:24 +03:00
Alex Converse 7181c4edee cosmetics: Remove extra newlines at EOF 2012-01-27 17:19:09 -08:00
Diego Biurrun c88ebdb42c Eliminate pointless 0/NULL initializers in AVCodec and similar declarations. 2011-11-28 10:01:50 +01:00
Carl Eugen Hoyos bcb1555489 dxva2_h264: pass the correct 8x8 scaling lists
Copy the Inter 8x8 scaling list as second 8x8 matrix into DXVA2's
quantization matrix data structure instead of a potentially unset
Intra chroma scaling matrix.

Fix dxva2 decoding for some H264 samples.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-09-30 20:15:17 +02:00
Joakim Plate dcce09d64b dxva: Add ability to enable workaround for older ATI cards
The workaround needs to be enabled per PCI ID which cannot be detected inside
libavcodec. So add a flag to manually enable the alternate behavior.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-09-30 11:17:53 +02:00
Jean-Baptiste Kempf 58ef4ecff8 DxVA2: unbreak build after [657ccb5ac7]
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-10 16:16:19 -07:00
Stefano Sabatini 975a1447f7 Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 12:18:44 +02:00
Diego Biurrun 6001dad6e2 Replace more FFmpeg references by Libav. 2011-04-17 19:31:49 +02:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Luca Barbato d1b6f33bf2 Add ff_ to AVHWAccel decoders
That unbreaks compilation of vaapi and dxva2

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-27 10:03:14 +01:00
Rafaël Carré fc068f9f27 Fixed DXVA_Slice_H264_Long::BitOffsetToSliceData value.
The 8 bits offset (nal unit type) should not be added, as the spec says:

"This bit offset is the offset within the RBSP data for the slice, relative
to the starting position of the slice_header() in the RBSP"

This fixes DXVA2 support for intel GPU.

Patch by Rafaël Carré (funman _AT_ videolan _DOT_ org).

Originally committed as revision 25538 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 18:39:57 +00:00
Laurent Aimar 48962f2eb7 Reindent after last commit on dxva2 h264 AVHWAccel.
Originally committed as revision 23141 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-14 23:09:08 +00:00
Laurent Aimar efb816ef64 Fixed h264 long term support with dxva2 AVHWAccel.
Based on a commit for vaapi(r22869).

Originally committed as revision 23140 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-14 23:08:23 +00:00
Stefano Sabatini 72415b2adb Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:30:55 +00:00
Laurent Aimar 6c389ddbd3 Fixed DXVA2 H264 hwaccel after luma/chroma_weight changes.
Originally committed as revision 22211 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-04 19:12:20 +00:00
Laurent Aimar 19a9846f3d Fixed DXVA2 H264 hwaccel compilation.
Originally committed as revision 22180 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-03 19:54:12 +00:00
Laurent Aimar 34fecc9afd Added a few missing consts in dxva_h264.
Originally committed as revision 21422 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 16:40:58 +00:00
Laurent Aimar 85167c46ef Moved reusable functions from dxva2_h264.c to dxva2.c
Originally committed as revision 21407 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 18:17:57 +00:00
Michael Niedermayer 0c32e19d58 Move +52 from the loop filter to the alpha/beta offsets in the context.
This should fix a segfault, also it might be faster on systems where the
+52 wasnt free.

Originally committed as revision 21406 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 18:05:30 +00:00
Laurent Aimar e4833b5d71 Added ff_dxva2_ prefix to get_surface(_index) and commit_buffer functions.
Originally committed as revision 21403 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 18:01:28 +00:00
Laurent Aimar 8cf9bbb6dc Reindent the content of one if(){} in ff_dxva2_common_end_frame.
Originally committed as revision 21402 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 18:00:51 +00:00