aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qsvdec.c
Commit message (Collapse)AuthorAgeFilesLines
* qsvdec: Allow use of hw_device_ctx to make the internal sessionMark Thompson2017-06-141-2/+14
| | | | (cherry picked from commit 8848ba0bd6b035af77d4f13aa0d8aaaad9806fe8)
* qsv: Add ability to create a session from a deviceMark Thompson2017-06-141-3/+3
| | | | (cherry picked from commit 4936a48b1e6fc2147599541f8b25f43a8a9d1f16)
* Merge commit 'b68e353136db6f963212c457281d9716516cdc59'Clément Bœsch2017-05-051-3/+5
|\ | | | | | | | | | | | | * commit 'b68e353136db6f963212c457281d9716516cdc59': qsvdec: do not sync PIX_FMT_QSV surfaces Merged-by: Clément Bœsch <cboesch@gopro.com>
| * qsvdec: do not sync PIX_FMT_QSV surfacesAnton Khirnov2017-01-121-3/+5
| | | | | | | | | | | | | | | | | | | | Introducing enforced sync points in arbitrary places is bad for performance. Since the vast majority of receiving code (QSV VPP or encoders, retrieving frames through hwcontext) will do the syncing, this change should not be visible to most callers. But bumping micro just in case. This is also consistent with what VAAPI hwaccel does.
| * qsvdec: Fix memory leak on errorTimothy Gu2016-12-081-1/+3
| | | | | | | | | | Bug-Id: CID 1396851 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '76167140a91c081a0cf9d0abcaa4da18d1bacadb'Clément Bœsch2017-04-011-1/+1
|\| | | | | | | | | | | | | * commit '76167140a91c081a0cf9d0abcaa4da18d1bacadb': qsvdec: Drop stray extra braces around initializer Merged-by: Clément Bœsch <u@pkh.me>
| * qsvdec: Drop stray extra braces around initializerDiego Biurrun2016-11-171-1/+1
| | | | | | | | libavcodec/qsvdec.c:93:5: warning: braces around scalar initializer
* | Merge commit '0940b748bdba36c4894fc8ea6be631d821fdf578'James Almer2017-03-311-1/+5
|\| | | | | | | | | | | | | * commit '0940b748bdba36c4894fc8ea6be631d821fdf578': qsvdec: Only warn about unconsumed data if it happens more than once Merged-by: James Almer <jamrial@gmail.com>
| * qsvdec: Only warn about unconsumed data if it happens more than onceMark Thompson2016-11-141-1/+5
| |
| * qsvdec: Pass field order information to libmfxMark Thompson2016-11-141-0/+16
| | | | | | | | The VC-1 decoder fails to initialise if this is not set.
| * qsvdec: Pass the correct profile to libmfxMark Thompson2016-11-141-2/+2
| | | | | | | | | | | | | | | | | | This was correct for H.26[45], because libmfx uses the same values derived from profile_idc and the constraint_set flags, but it is wrong for other codecs. Also avoid passing FF_LEVEL_UNKNOWN (-99) as the level, as this is certainly invalid.
* | Merge commit '4ab61cd983b539749bd621ea271624ddb5196a8e'Mark Thompson2017-03-301-2/+1
|\| | | | | | | | | | | | | * commit '4ab61cd983b539749bd621ea271624ddb5196a8e': qsv{enc,dec}: extend the internal frame allocator Merged-by: Mark Thompson <sw@jkqxz.net>
| * qsv{enc,dec}: extend the internal frame allocatorAnton Khirnov2016-11-071-2/+1
| | | | | | | | | | | | | | Handle the internal frame requests, which is required by the HEVC encoding plugin. Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
* | Merge commit '00aeedd84105a17f414185bd33ecadebeddb3a27'Mark Thompson2017-03-301-0/+8
|\| | | | | | | | | | | | | * commit '00aeedd84105a17f414185bd33ecadebeddb3a27': qsv{dec,enc}: use a struct as a memory id with internal memory allocator Merged-by: Mark Thompson <sw@jkqxz.net>
| * qsv{dec,enc}: use a struct as a memory id with internal memory allocatorAnton Khirnov2016-11-071-0/+8
| | | | | | | | | | | | | | This will allow implementing the allocator more fully, which is needed by the HEVC encoder plugin with video memory input. Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
* | Merge commit '404e51478ecad060249d5b9bee6ab39a8a9d8c1c'Mark Thompson2017-03-301-14/+18
|\| | | | | | | | | | | | | | | | | * commit '404e51478ecad060249d5b9bee6ab39a8a9d8c1c': qsv{dec,enc}: always use an internal mfxFrameSurface1 Minor fixups for differences in the QSV encoder because of a53cc. Merged-by: Mark Thompson <sw@jkqxz.net>
| * qsv{dec,enc}: always use an internal mfxFrameSurface1Anton Khirnov2016-11-071-14/+18
| | | | | | | | | | | | | | | | For encoding, this avoids modifying the input surface, which we are not allowed to do. This will also be useful in the following commits. Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
* | Merge commit '801ac7156d3efb8e088fb6024f568eb36a293887'Clément Bœsch2017-03-271-1/+1
|\| | | | | | | | | | | | | * commit '801ac7156d3efb8e088fb6024f568eb36a293887': qsv: Be informative when reporting that no data has been consumed Merged-by: Clément Bœsch <u@pkh.me>
| * qsv: Be informative when reporting that no data has been consumedLuca Barbato2016-10-301-1/+1
| |
* | Merge commit 'e328178da90f44690e0076f4dbfd16da9175f441'Clément Bœsch2017-03-151-1/+1
|\| | | | | | | | | | | | | * commit 'e328178da90f44690e0076f4dbfd16da9175f441': qsvdec: only access hwaccel_context is the pixel format is QSV Merged-by: Clément Bœsch <u@pkh.me>
| * qsvdec: only access hwaccel_context is the pixel format is QSVAnton Khirnov2016-07-311-1/+1
| | | | | | | | | | | | | | We do not strictly specify that hwaccel_context must be cleared if no hwaccel is used. Reported-By: wm4 <nfxjfg@googlemail.com>
* | Merge commit '95414eb2dc63a6f934275b4ed33dedd4369f2c49'Mark Thompson2017-03-121-12/+5
|\| | | | | | | | | | | | | * commit '95414eb2dc63a6f934275b4ed33dedd4369f2c49': qsv: print more complete error messages Merged-by: Mark Thompson <sw@jkqxz.net>
| * qsv: print more complete error messagesAnton Khirnov2016-07-221-6/+5
| | | | | | | | Include the libmfx error code and its description
* | qsvdec: Fix memory leakTimothy Gu2016-12-061-1/+3
| | | | | | | | Fixes CID1396851.
* | Merge commit '924e2ecd2b7d51cca60c79351ef16b04dd4245c3'Hendrik Leppkes2016-11-141-2/+7
|\| | | | | | | | | | | | | * commit '924e2ecd2b7d51cca60c79351ef16b04dd4245c3': qsvdec: when a frames ctx is supplied, use its frame dimensions Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * qsvdec: when a frames ctx is supplied, use its frame dimensionsAnton Khirnov2016-07-031-2/+7
| | | | | | | | The allocated frame size may be larger than the coded dimensions.
* | Merge commit '92736c74fb1633e36f7134a880422a9b7db14d3f'Hendrik Leppkes2016-11-141-4/+11
|\| | | | | | | | | | | | | * 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-031-4/+11
| |
* | Merge commit 'ce320cf1c4daab3e2e3726ed7d2e879d10f7b991'Hendrik Leppkes2016-11-141-9/+6
|\| | | | | | | | | | | | | * commit 'ce320cf1c4daab3e2e3726ed7d2e879d10f7b991': qsvdec: use the same mfxFrameInfo for allocating frames that was passed to DECODE_Init Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * qsvdec: use the same mfxFrameInfo for allocating frames that was passed to ↵Anton Khirnov2016-07-031-9/+6
| | | | | | | | | | | | DECODE_Init Stop duplicating this information.
* | Merge commit '536bb17e9659c5ed7576a218d4085cdd6d5742fa'Hendrik Leppkes2016-11-141-13/+2
|\| | | | | | | | | | | | | * commit '536bb17e9659c5ed7576a218d4085cdd6d5742fa': qsvdec: make ff_qsv_map_pixfmt() return a MFX fourcc as well Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * qsvdec: make ff_qsv_map_pixfmt() return a MFX fourcc as wellAnton Khirnov2016-07-031-13/+2
| | | | | | | | | | | | | | Stop hardcoding NV12. Also, move this function to the shared code, it will be used by the encoder as well.
* | qsv: Merge libav implementationMark Thompson2016-10-311-331/+237
| | | | | | | | | | | | | | 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.
* | Merge commit '32c8359093d1ff4f45ed19518b449b3ac3769d27'Hendrik Leppkes2016-10-071-1/+6
|\| | | | | | | | | | | | | * commit '32c8359093d1ff4f45ed19518b449b3ac3769d27': lavc: export the timestamps when decoding in AVFrame.pts Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: export the timestamps when decoding in AVFrame.ptsAnton Khirnov2016-06-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | Currently it's exported as AVFrame.pkt_pts, which is also the only use for that field. The reason it is done like this is that lavc used to export various codec-specific "timing" information in AVFrame.pts, which is not done anymore. Since it is confusing to the callers to have a separate field which is used only for decoder timestamps and nothing else, deprecate pkt_pts and use just AVFrame.pts everywhere.
| * qsvdec: support getting the session from an AVHWFramesContextAnton Khirnov2016-06-211-8/+54
| |
* | Merge commit '6f19bbcf8532d018d8d6d82e000738d0ac2385c9'James Almer2016-09-281-9/+24
|\| | | | | | | | | | | | | | | | | | | * commit '6f19bbcf8532d018d8d6d82e000738d0ac2385c9': qsvdec: move reading the user-provided session to qsv_decode_init() Conflicts: libavcodec/qsvdec.c Merged-by: James Almer <jamrial@gmail.com>
| * qsvdec: move reading the user-provided session to qsv_decode_init()Anton Khirnov2016-06-211-13/+11
| | | | | | | | This is a more appropriate place for it.
* | avcodec/qsvdec: Fix null dereferences in the qsv decoderYuli Khodorkovskiy2016-08-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the h264_qsv decoder issues mentioned in https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=2962. The patch may be tested by specifying h264_qsv as the decoder to ffplay for an h264 encoded file. ffplay -vcodec h264_qsv foo.mts Signed-off-by: Yuli Khodorkovskiy <ykhodo@gmail.com> Push requested-by: Ivan Uskov Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Revert "Merge commit '3c53627ac17fc6bdea5029be57da1e03b32d265d'"Ivan Uskov2016-07-241-28/+6
| | | | | | | | | | | | | | | | | | This reverts commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e, reversing changes made to acc155ac55baa95d1c16c0364b02244bc04d83a8. The commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e provided irrelevant code complexity and decoding slowdown. But the main disadvantage of this commit is a decoder crash. So it should be reverted. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '3c53627ac17fc6bdea5029be57da1e03b32d265d'Derek Buitenhuis2016-04-111-6/+28
|\| | | | | | | | | | | | | * commit '3c53627ac17fc6bdea5029be57da1e03b32d265d': qsvdec: store the sync point in heap memory Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * qsvdec: store the sync point in heap memoryAnton Khirnov2016-02-241-6/+28
| | | | | | | | The reasoning is the same as for the corresponding qsvenc patch.
* | Merge commit '3b6473b43eb69fc3faaf69f7fd0b83b51db7607f'Hendrik Leppkes2016-01-041-1/+3
|\| | | | | | | | | | | | | * commit '3b6473b43eb69fc3faaf69f7fd0b83b51db7607f': qsvdec: properly handle the warning from MFXVideoCORE_SyncOperation Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * qsvdec: properly handle the warning from MFXVideoCORE_SyncOperationMaxym Dmytrychenko2016-01-011-1/+3
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | qsvdec: fix get_format and hwaccel_context handlingHendrik Leppkes2015-10-221-16/+17
| | | | | | | | This enables the qsv transcoder to actually get activated
* | Merge commit '8aecec84021a61b943718ff3d7c2c57fcd4af199'Hendrik Leppkes2015-09-291-2/+2
|\| | | | | | | | | | | | | * commit '8aecec84021a61b943718ff3d7c2c57fcd4af199': qsvdec: make ff_qsv_decode_init() static Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * qsvdec: make ff_qsv_decode_init() staticAnton Khirnov2015-09-281-2/+2
| | | | | | | | It is not used outside of qsvdec.c anymore.
* | Merge commit '2c32eace5ec4d1d7ca4e0220856cd2815ccc71b2'Hendrik Leppkes2015-09-291-1/+2
|\| | | | | | | | | | | | | * commit '2c32eace5ec4d1d7ca4e0220856cd2815ccc71b2': qsvdec: close the MFX decoder on uninit Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * qsvdec: close the MFX decoder on uninitAnton Khirnov2015-09-281-0/+3
| |
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-1/+1
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>