summaryrefslogtreecommitdiffstats
path: root/libavcodec/qsvdec.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc/qsvdec: set complete_frame flags for progressive pictureZhong Li2018-04-081-1/+3
| | | | | | | | | | | | | | | | | | | | | Set the flag MFX_BITSTREAM_COMPLETE_FRAME when it is a progressive picture. This can fix vc1 decoding segment fault issues because can't set the start code correctly. See: ./avconv -hwaccel qsv -c:v vc1_qsv -i /fate-suite/vc1/SA00040.vc1 -vf "hwdownload, format=nv12" -f rawvideo /dev/null v2: fix some h264 interlaced clips regression a. field_order of some h264 interlaced video (e.g: cama3_vtc_b.avc) is marked as AV_FIELD_UNKNOWN in h264_parser.c. This is not a completed frames. So only set the MFX_BITSTREAM_COMPLETE_FRAME when it is progressive. b. some clips have both progressive and interlaced frames (e.g.CAPAMA3_Sand_F.264), the parsed field_order maybe changed druing the decoding progress. This patch has been verified for other codecs(mpeg2/hevc/vp8). Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* lavc/qsvdec: expose frame pic_type and key_frameZhong Li2018-04-081-0/+9
| | | | | | | | | | | | | Currently pict_type and key_frame are unset. Add an extra param to fetch the picture type from qsv decoder The judgement “key frame is equal to IDR frame” only suitable for H264. For HEVC, all IRAP frames are key frames, and other codecs have no IDR frame. Signed-off-by: ChaoX A Liu <chaox.a.liu@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* qsvdec: Relax the surface vs coded dimension checkZhong Li2018-01-261-3/+0
| | | | | | | | | | | | | | | Fix a common vp8 decoding failure. Many vp8 clips cannot decode if hw_frames_ctx is enabled, reporting "Error during QSV decoding.: incompatible video parameters (-14)". It is due to mfx.FrameInfo.Width/Height not matching coded_w/coded_h. See: avconv -hwaccel qsv -init_hw_device qsv -c:v vp8_qsv -i vp8-test-vectors-r1/vp80-00-comprehensive-001.ivf -vf "hwdownload,format=nv12" -pix_fmt yuv420p -f md5 - Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* qsv: better to use alignment by 16 and HEVC 10b requires alignment by 32Maxym Dmytrychenko2018-01-081-4/+14
|
* lavc: Add hardware config metadata for decoders supporting hardware outputMark Thompson2017-12-191-0/+13
| | | | | | | | | 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.
* qsvdec: Allow use of hw_device_ctx to make the internal sessionMark Thompson2017-04-021-2/+14
|
* qsv: Add ability to create a session from a deviceMark Thompson2017-04-021-3/+3
|
* 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>
* qsvdec: Drop stray extra braces around initializerDiego Biurrun2016-11-171-1/+1
| | | | libavcodec/qsvdec.c:93:5: warning: braces around scalar initializer
* 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.
* 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>
* 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>
* 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>
* qsv: Be informative when reporting that no data has been consumedLuca Barbato2016-10-301-1/+1
|
* 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>
* qsv: print more complete error messagesAnton Khirnov2016-07-221-6/+5
| | | | Include the libmfx error code and its description
* 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.
* qsvdec: add support for P010 (10-bit 420) decodingAnton Khirnov2016-07-031-4/+11
|
* qsvdec: use the same mfxFrameInfo for allocating frames that was passed to ↵Anton Khirnov2016-07-031-9/+6
| | | | | | DECODE_Init Stop duplicating this information.
* 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.
* 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
|
* 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.
* qsvdec: store the sync point in heap memoryAnton Khirnov2016-02-241-6/+28
| | | | The reasoning is the same as for the corresponding qsvenc patch.
* qsvdec: properly handle the warning from MFXVideoCORE_SyncOperationMaxym Dmytrychenko2016-01-011-1/+3
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* qsvdec: make ff_qsv_decode_init() staticAnton Khirnov2015-09-281-2/+2
| | | | It is not used outside of qsvdec.c anymore.
* 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>
* lavc: add Intel libmfx-based HEVC decoder.Anton Khirnov2015-07-251-1/+2
|
* qsvdec: move qsv_process_data() from qsvdec_h264 to the common codeAnton Khirnov2015-07-251-3/+106
| | | | It will be shared with the upcoming mpeg2 and hevc decoders.
* qsvdec: fix a memleak of async_fifoAnton Khirnov2015-07-251-4/+6
| | | | | init() is called whenever format changes, so current code would leak the fifo in this case.
* qsvdec: avoid an infinite loop with no consumed data and no outputAnton Khirnov2015-07-251-0/+7
| | | | | | 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.
* qsvdec: properly handle asynchronous decodingAnton Khirnov2015-07-191-8/+33
| | | | Wait for async_depth frames before syncing.
* lavc: add Intel libmfx-based HEVC encoderAnton Khirnov2015-07-081-1/+1
|
* qsvdec: add 'decode' to the non-static function namesAnton Khirnov2015-03-271-2/+2
|
* qsvdec: split off some code that will be shared with the encoderAnton Khirnov2015-03-271-84/+5
|
* qsv: rename to qsvdecAnton Khirnov2015-03-271-0/+369
This is to avoid conflicts with the upcoming QSV encoding support.
OpenPOWER on IntegriCloud