1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

33 Commits

Author SHA1 Message Date
Anton Khirnov
b68e353136 qsvdec: do not sync PIX_FMT_QSV surfaces
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.
2017-01-12 16:21:39 +01:00
Timothy Gu
d32bdadda8 qsvdec: Fix memory leak on error
Bug-Id: CID 1396851
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-12-08 15:53:58 -05:00
Diego Biurrun
76167140a9 qsvdec: Drop stray extra braces around initializer
libavcodec/qsvdec.c:93:5: warning: braces around scalar initializer
2016-11-17 16:53:48 +01:00
Mark Thompson
0940b748bd qsvdec: Only warn about unconsumed data if it happens more than once 2016-11-14 19:38:19 +00:00
Mark Thompson
030d84fa2e qsvdec: Pass field order information to libmfx
The VC-1 decoder fails to initialise if this is not set.
2016-11-14 19:38:19 +00:00
Mark Thompson
cd1047f391 qsvdec: Pass the correct profile to libmfx
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.
2016-11-14 19:38:19 +00:00
Anton Khirnov
4ab61cd983 qsv{enc,dec}: extend the internal frame allocator
Handle the internal frame requests, which is required by the HEVC
encoding plugin.

Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
2016-11-07 12:48:00 +01:00
Anton Khirnov
00aeedd841 qsv{dec,enc}: use a struct as a memory id with internal memory allocator
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>
2016-11-07 12:47:54 +01:00
Anton Khirnov
404e51478e qsv{dec,enc}: always use an internal mfxFrameSurface1
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>
2016-11-07 12:47:46 +01:00
Luca Barbato
801ac7156d qsv: Be informative when reporting that no data has been consumed 2016-10-30 21:55:03 +01:00
Anton Khirnov
e328178da9 qsvdec: only access hwaccel_context is the pixel format is QSV
We do not strictly specify that hwaccel_context must be cleared if no
hwaccel is used.

Reported-By: wm4 <nfxjfg@googlemail.com>
2016-07-31 08:19:45 +02:00
Anton Khirnov
95414eb2dc qsv: print more complete error messages
Include the libmfx error code and its description
2016-07-22 19:08:13 +02:00
Anton Khirnov
924e2ecd2b qsvdec: when a frames ctx is supplied, use its frame dimensions
The allocated frame size may be larger than the coded dimensions.
2016-07-03 09:13:29 +02:00
Anton Khirnov
92736c74fb qsvdec: add support for P010 (10-bit 420) decoding 2016-07-03 09:13:29 +02:00
Anton Khirnov
ce320cf1c4 qsvdec: use the same mfxFrameInfo for allocating frames that was passed to DECODE_Init
Stop duplicating this information.
2016-07-03 09:13:29 +02:00
Anton Khirnov
536bb17e96 qsvdec: make ff_qsv_map_pixfmt() return a MFX fourcc as well
Stop hardcoding NV12.

Also, move this function to the shared code, it will be used by the
encoder as well.
2016-07-03 09:13:29 +02:00
Anton Khirnov
32c8359093 lavc: export the timestamps when decoding in AVFrame.pts
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.
2016-06-21 19:54:42 +02:00
Anton Khirnov
a0524d9b1e qsvdec: support getting the session from an AVHWFramesContext 2016-06-21 19:53:38 +02:00
Anton Khirnov
6f19bbcf85 qsvdec: move reading the user-provided session to qsv_decode_init()
This is a more appropriate place for it.
2016-06-21 19:52:19 +02:00
Anton Khirnov
3c53627ac1 qsvdec: store the sync point in heap memory
The reasoning is the same as for the corresponding qsvenc patch.
2016-02-24 10:41:45 +01:00
Maxym Dmytrychenko
3b6473b43e qsvdec: properly handle the warning from MFXVideoCORE_SyncOperation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-01 16:09:14 +01:00
Anton Khirnov
8aecec8402 qsvdec: make ff_qsv_decode_init() static
It is not used outside of qsvdec.c anymore.
2015-09-28 15:46:58 +02:00
Anton Khirnov
2c32eace5e qsvdec: close the MFX decoder on uninit 2015-09-28 15:45:17 +02:00
Vittorio Giovara
059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Anton Khirnov
41d47ea85f lavc: add Intel libmfx-based HEVC decoder. 2015-07-25 17:37:01 +02:00
Anton Khirnov
96dca089b1 qsvdec: move qsv_process_data() from qsvdec_h264 to the common code
It will be shared with the upcoming mpeg2 and hevc decoders.
2015-07-25 17:24:25 +02:00
Anton Khirnov
22522d9c2c qsvdec: fix a memleak of async_fifo
init() is called whenever format changes, so current code would leak the
fifo in this case.
2015-07-25 17:23:46 +02:00
Anton Khirnov
aa9d15d89b qsvdec: avoid an infinite loop with no consumed data and no output
This is triggerable with the HEVC decoder. It is unclear yet whether the
bug is in the calling code or the MSDK, but it seems better to check for
this in any case.
2015-07-25 17:23:29 +02:00
Anton Khirnov
f5c4d38c78 qsvdec: properly handle asynchronous decoding
Wait for async_depth frames before syncing.
2015-07-19 09:47:45 +02:00
Anton Khirnov
66acb76bb0 lavc: add Intel libmfx-based HEVC encoder 2015-07-08 23:40:11 +02:00
Anton Khirnov
9ba27c2348 qsvdec: add 'decode' to the non-static function names 2015-03-27 21:57:47 +01:00
Anton Khirnov
d0a63d8b98 qsvdec: split off some code that will be shared with the encoder 2015-03-27 21:57:28 +01:00
Anton Khirnov
b04d009b0e qsv: rename to qsvdec
This is to avoid conflicts with the upcoming QSV encoding support.
2015-03-27 21:56:36 +01:00