[FFmpeg-trac] #7839(avcodec:new): QVBR breaks mpeg2_qsv
FFmpeg
trac at avcodec.org
Fri Apr 26 22:59:15 EEST 2019
#7839: QVBR breaks mpeg2_qsv
-------------------------------------+-------------------------------------
Reporter: atorp | Owner:
Type: defect | Status: new
Priority: important | Component: avcodec
Version: git-master | Resolution:
Keywords: qsv | Blocked By:
regression |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by atorp):
Hi lizhong1008,
Regarding the problem, I think I have one idea to solve it:
- If you check in the Intel Media SDK for Linux (Open Source) you can
review the MPEG2 ENCODER implementation. See this part of the code:
- https://github.com/Intel-Media-
SDK/MediaSDK/blob/fcb7e6bf4c6b3acbc2698ecb45926be6ac8cd911/_studio/mfx_lib/encode_hw/mpeg2/src/mfx_mpeg2_encode_utils_hw.cpp#L602
- As you can note, inside the initialization of the Encoder the code tries
to check the Hardware, with the function CheckHwCaps(), and after it
checks the buffer capabilities, with the function CheckExtendedBuffers().
- My assumption is this: The MPEG2 encoder doesn't support the CO3
extension, even if the H264 encoder does it. Or perhaps it depends on the
Intel CPU running, or the driver version. In any case, AT RUNTIME it's
possible that the use of the CO3 extension will generate a failed
initialization of the MFX context. This last is for sure true, because the
only difference between the patch pointed is the inclusion of the CO3 in
the code. And my proposed workaround needs to disable both QVBR and CO3.
So the problem is the CO3 extension. And not because the API, but because
the refuse to initialize the MFX context when configuring the MPEG2
encoder. So the only viable solution is to check it at runtime or not use
it at all when configuring the MPEG2 encoder.
You agree?
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7839#comment:19>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list