summaryrefslogtreecommitdiff
path: root/libavcodec/qsvdec_h2645.c
Commit message (Collapse)AuthorAge
* ffplay, avcodec, avformat: Don't initialize before av_packet_ref()Andreas Rheinhardt2020-03-28
| | | | | | | It already initializes the packet. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavc/qsvdec: Add GPU-accelerated memory copy supportLinjie Fu2019-10-09
| | | | | | | | | | | | | | | | GPU copy enables or disables GPU accelerated copying between video and system memory. This may lead to a notable performance improvement. Memory must be sequent and aligned with 128x64. CMD: ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -c:v h264_qsv -gpu_copy on -i input.h264 -f null - or: ffmpeg -c:v h264_qsv -gpu_copy on -i input.h264 -f null - Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: ChaoX A Liu <chaox.a.liu@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/qsvdec: Replace current parser with MFXVideoDECODE_DecodeHeader()Zhong Li2019-08-20
| | | | | | | | | | | | | | | | | Using MSDK parser can improve qsv decoder pass rate in some cases (E.g: sps declares a wrong level_idc, smaller than it should be). And it is necessary for adding new qsv decoders such as MJPEG and VP9 since current parser can't provide enough information. Actually using MFXVideoDECODE_DecodeHeader() was disscussed at https://ffmpeg.org/pipermail/ffmpeg-devel/2015-July/175734.html and merged as commit 1acb19d, but was overwritten when merged libav patches (commit: 1f26a23) without any explain. Split decode header from decode_init, and call it for everyframe to detect format/resoultion change. It can fix some regression issues such as hevc 10bits decoding. Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
* lavc/qsv_hevc: correct QSV HEVC default plugin on WindowsZhong Li2018-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Old logic meaned: everywhere, except Windows, ffmpeg has to use HW acceleration, but on Windows ffmpeg has to use (unavailable) software HEVC by default 2. Software HEVC is available only if you provide corresponding software MediaSDK library, which isn't provided with ffmpeg. More information could be found in https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/samples/readme-encode_linux.pdf 3. HW HEVC decoding/encoding are available on Windows in the driver by default Note: Default case should be the most common case but this change still has potential risk on windows if HW path is not supported(or doesn't work as expection). (See the historical disscution: https://lists.libav.org/pipermail/libav-devel/2016-November/080419.html). In such case, two options suggested: 1. Use the option "-load_plugin hevc_sw" to switch SW path manually. 2. Or report bug to Intel windows driver if your GPU can support HEVC HW codec. (HEVC decoding is supported since Braswell, and encoding supported since Skylake) Patch started by Landgraph. Add similar change for hevc decoder and bump a new version. Reviewed-by: Mark Thompson <sw@jkqxz.net> Reviewed-by: Maxym Dmytrychenko <maxim.d33@gmail.com> Signed-off-by: Landgraph <me@landgraph.ru> Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/qsvdec: flush buffered data before reinitLinjie Fu2018-11-06
| | | | | | | | | | | | | | | | | Flush the buffered data in libmfx before video param reinit in case the frames drop. Cache the first frame causing the reinit and decode zero-size pkt to flush the buffered pkt before reinit. After all the buffered pkts being flushed, resume to reinit and decode. Fix the issue in ticket #7399. [V2]: Move the definition of zero_pkt to where it is exactly used. Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com>
* Merge commit 'c1bcd321ea2c2ae1765a1e64f03278712221d726'James Almer2018-09-02
|\ | | | | | | | | | | | | * commit 'c1bcd321ea2c2ae1765a1e64f03278712221d726': avcodec/qsv: fix async support Merged-by: James Almer <jamrial@gmail.com>
| * avcodec/qsv: fix async supportDmitry Rogozhkin2018-07-26
| | | | | | | | | | | | | | | | | | | | | | Current implementations of qsv components incorrectly work with async level, they actually try to work in async+1 level stepping into MFX_WRN_DEVICE_BUSY and polling loop. This change address this misbehaviour. Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> Cc: Maxym Dmytrychenko <maxim.d33@gmail.com> Cc: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* | Merge commit '559370f2c45110afd8308eec7194437736c323d4'Mark Thompson2018-01-25
|\| | | | | | | | | | | | | * commit '559370f2c45110afd8308eec7194437736c323d4': qsv: Skip the packet if decoding failure Merged-by: Mark Thompson <sw@jkqxz.net>
| * qsv: Skip the packet if decoding failureRuiling, Song2018-01-25
| | | | | | | | | | | | | | | | | | MediaSDK may fail to decode some frame, just skip it. Otherwise, it will keep decoding the failure packet repeatedly without processing any packet afterwards. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * lavc: Delete all fake hwaccelsMark Thompson2017-12-19
| | | | | | | | They are now unused.
| * lavc: Add hardware config metadata for decoders supporting hardware outputMark Thompson2017-12-19
| | | | | | | | | | | | | | | | | | This includes a pointer to the associated hwaccel for decoders using hwaccels - these will be used later to implement the hwaccel setup without needing a global list. Also added is a new file listing all hwaccels as external declarations - this will be used later to generate the hwaccel list at configure time.
| * avcodec: add metadata to identify wrappers and hardware decoderswm42017-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly identify decoder/encoder wrappers with a common name. This saves API users from guessing by the name suffix. For example, they don't have to guess that "h264_qsv" is the h264 QSV implementation, and instead they can just check the AVCodec .codec and .wrapper_name fields. Explicitly mark AVCodec entries that are hardware decoders or most likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing API users listing hardware decoders in a more generic way. The proposed AVCodecHWConfig does not provide this information fully, because it's concerned with decoder configuration, not information about the fact whether the hardware is used or not. AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software implementations in case the hardware is not capable. Based on a patch by Philip Langdale <philipl@overt.org>. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec: add metadata to identify wrappers and hardware decoderswm42017-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly identify decoder/encoder wrappers with a common name. This saves API users from guessing by the name suffix. For example, they don't have to guess that "h264_qsv" is the h264 QSV implementation, and instead they can just check the AVCodec .codec and .wrapper_name fields. Explicitly mark AVCodec entries that are hardware decoders or most likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing API users listing hardware decoders in a more generic way. The proposed AVCodecHWConfig does not provide this information fully, because it's concerned with decoder configuration, not information about the fact whether the hardware is used or not. AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software implementations in case the hardware is not capable. Based on a patch by Philip Langdale <philipl@overt.org>. Merges Libav commit 47687a2f8aca3f65b6fdd117b1cb66a7409a7fd1.
* | lavc: Delete all fake hwaccelsMark Thompson2017-11-26
| | | | | | | | They are now unused.
* | lavc: Add hardware config metadata for decoders supporting hardware outputMark Thompson2017-11-26
| | | | | | | | | | | | | | | | | | This includes a pointer to the associated hwaccel for decoders using hwaccels - these will be used later to implement the hwaccel setup without needing a global list. Also added is a new file listing all hwaccels as external declarations - this will be used later to generate the hwaccel list at configure time.
* | Merge commit '136e7cf64ce9e78de7158d6720539d51cb96b743'Mark Thompson2017-11-25
|\| | | | | | | | | | | | | * commit '136e7cf64ce9e78de7158d6720539d51cb96b743': qsv/hevcdec: Load hw plugin by default on non-windows os Merged-by: Mark Thompson <sw@jkqxz.net>
| * qsv/hevcdec: Load hw plugin by default on non-windows osLi, Zhong2017-11-23
| | | | | | | | | | | | | | | | | | Software plugin is not available on Linux, Only works on Windows. Similar changes have been applied to qsv hevc encoder by b05128f3c953bd66483e697d60a2e7e45ee9cfa0. Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* | Merge commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3'James Almer2017-09-26
|\| | | | | | | | | | | | | * commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3': Mark some arrays that never change as const. Merged-by: James Almer <jamrial@gmail.com>
| * Mark some arrays that never change as const.Anton Khirnov2017-02-01
| |
* | Merge commit '8fb4210ad8785c01fccf2fc59af6a6fa2892b6b2'James Almer2017-04-22
|\| | | | | | | | | | | | | * commit '8fb4210ad8785c01fccf2fc59af6a6fa2892b6b2': qsvdec_h2645: switch to the new generic filtering mechanism Merged-by: James Almer <jamrial@gmail.com>
| * qsvdec_h2645: switch to the new generic filtering mechanismAnton Khirnov2016-12-14
| | | | | | | | Drop the internal manual conversion from the MP4 format to Annex B.
* | Merge commit '624aa8ab221cf34693f9a8c5ab67219cf560f2bb'James Almer2017-04-13
|\| | | | | | | | | | | | | * commit '624aa8ab221cf34693f9a8c5ab67219cf560f2bb': build: Add missing Makefile entries and ifdefs for QSV hwaccels Merged-by: James Almer <jamrial@gmail.com>
| * build: Add missing Makefile entries and ifdefs for QSV hwaccelsDiego Biurrun2016-12-07
| |
* | Merge commit '92736c74fb1633e36f7134a880422a9b7db14d3f'Hendrik Leppkes2016-11-14
|\| | | | | | | | | | | | | * commit '92736c74fb1633e36f7134a880422a9b7db14d3f': qsvdec: add support for P010 (10-bit 420) decoding Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * qsvdec: add support for P010 (10-bit 420) decodingAnton Khirnov2016-07-03
| |
| * qsvdec_hevc: add the UID of the HEVC HW decoder pluginAnton Khirnov2016-06-28
| |
| * qsvdec_hevc: fix a variable nameAnton Khirnov2016-06-28
| | | | | | | | hevcenc -> hevcdec, this is a _decoder_ plugin.
| * qsvdec: support getting the session from an AVHWFramesContextAnton Khirnov2016-06-21
| |
| * qsvdec_h2645: switch to the new BSF APIAnton Khirnov2016-03-25
| |
| * lavc: AV-prefix a few left out capabilitiesVittorio Giovara2015-10-15
| |
* | qsvdec: Avoid probing with qsv decodersMark Thompson2016-10-31
| | | | | | | | Set the AV_CODEC_CAP_AVOID_PROBING flag on all of the qsv decoders.
* | qsv: Merge libav implementationMark Thompson2016-10-31
| | | | | | | | | | | | | | Merged as-at libav 398f015, and therefore includes outstanding skipped merges 04b17ff and 130e1f1. All features not in libav are preserved, and no options change.
* | libavcodec/qsvdec_h2645.c: drop executable permissionMoritz Barsnick2016-09-15
| | | | | | | | | | | | Accidentally set in b93e2233155e6c1f0a074cad4135a70d9d2934d3. Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
* | libavcodec/qsvdec_h2645.c: switch to the new BSF APIIvan Uskov2016-08-15
| | | | | | | | | | | | | | | | | | | | This patch applies same changes as commit e3dfef8e3c85a64dbe6388117303f5819fa3c6a2 of libav: instead of the obsolete AVBitStreamFilterContext now the new AVBSFContext filter is used to restore annex-B prefixes. Based-on: e3dfef8e3c85a64dbe6388117303f5819fa3c6a2 by Anton Khirnov Push requested by maintainer Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | qsv: Fix wrong ticks_per_frame for H.264Ivan Uskov2016-04-27
| | | | | | | | | | | | For H.264 stream ticks_per_frame should be 2, as per the docs. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Merge commit '741b352b16dad74b87c4a39bade8902633a2b0e6'Hendrik Leppkes2015-09-29
|\| | | | | | | | | | | | | * commit '741b352b16dad74b87c4a39bade8902633a2b0e6': qsvdec: list supported pixel formats Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * qsvdec: list supported pixel formatsAnton Khirnov2015-09-28
| | | | | | | | This is useful for detecting QSV-enabled decoders.
* | libavcodec/qsvdec.c: correct flush() handler has been implementedIvan Uskov2015-09-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'f3bd3810d274a7f51b5925fc3d2fc33e8043a5d4'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | * commit 'f3bd3810d274a7f51b5925fc3d2fc33e8043a5d4': qsvdec_*: add missing CODEC_CAP_DR1 Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * qsvdec_*: add missing CODEC_CAP_DR1Anton Khirnov2015-07-27
| |
* | libavcodec/qsvdec_h264.c: using "private_spspps_buf" argument for ↵Ivan Uskov2015-07-26
| | | | | | | | | | | | av_bitstream_filter_filter() to avoid failure after decoder re-initialization. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '41d47ea85fb4ad9cfb5c2dc808a46bc1d57f3986'Michael Niedermayer2015-07-26
|/ | | | | | | | | | | | | | | | * commit '41d47ea85fb4ad9cfb5c2dc808a46bc1d57f3986': lavc: add Intel libmfx-based HEVC decoder. Conflicts: Changelog configure libavcodec/Makefile libavcodec/allcodecs.c libavcodec/qsvdec.c libavcodec/qsvdec_h2645.c libavcodec/version.h Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc: add Intel libmfx-based HEVC decoder.Anton Khirnov2015-07-25