Zhong Li
3c26ce4644
lavc/qsv: handle MFX_FRAMETYPE_UNKNOWN case
...
Signed-off-by: Zhong Li <zhong.li@intel.com>
7 years ago
Zhong Li
8a0c2901f1
lavc/qsv: suppress code scan complain
...
Suppress the complain "variables 'type' is used but maybe uninitialized".
7 years ago
Maxym Dmytrychenko
cca5e4f040
qsv: adding Multi Frame Encode support
...
Starting from API 1.25 helps to improve performance of the simultaneous
encode, 1:N scenario, like:
./avconv -y -hwaccel qsv -c:v h264_qsv -r 30000/1001 -i
~/bbb_sunflower_1080p_60fps_normal.mp4 -vframes 600 -an \
-filter_complex "split=2[s1][s2]; [s1]scale_qsv=1280:720[o1];
[s2]scale_qsv=960:540[o2]" \
-map [o1] -c:v h264_qsv -b:v 3200k -minrate 3200k -maxrate 3200k -f
rawvideo /tmp/3200a.264 \
-map [o2] -c:v h264_qsv -b:v 1750k -minrate 1750k -maxrate 1750k -f
rawvideo /tmp/1750a.264
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
7 years ago
Zhong Li
52ed83fa1a
lavc/qsvdec: expose frame pic_type and key_frame
...
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>
7 years ago
Zhong Li
6829a07944
qsvdec: Relax the surface vs coded dimension check
...
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>
7 years ago
Luca Barbato
ea25ccd1b2
qsv: Join the derived session to the parent
...
Should improve the performance on multiple transcoding from a single
source.
8 years ago
Huang, Zhengxu
2fd6e7d077
libavcodec/mjpeg_qsv: Add QSV MJPEG encoder
...
usage:
-hwaccel qsv -c:v h264_qsv -i in -c:v mjpeg_qsv -global_quality 80 -f
mjpeg out
Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Zhengxu Huang <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew Zhang <huazh407@gmail.com
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
8 years ago
Mark Thompson
91c3b50d74
qsv: Add ability to create a session from a device
...
(cherry picked from commit 4936a48b1e
)
8 years ago
Mark Thompson
4936a48b1e
qsv: Add ability to create a session from a device
8 years ago
Anton Khirnov
984736dd9e
lavc: make sure not to return EAGAIN from codecs
...
This error is treated specially by the API.
CC: libav-stable@libav.org
8 years ago
Diego Biurrun
715b824346
qsv: Drop some unused variables
8 years ago
Mark Thompson
e0b164576f
qsv: Add VP8 decoder
8 years ago
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.
8 years ago
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>
8 years ago
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>
8 years ago
Mark Thompson
1f26a231bb
qsv: Merge libav implementation
...
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.
8 years ago
Anton Khirnov
8e07c22e50
qsvenc: print warnings from encode/init
9 years ago
Anton Khirnov
95414eb2dc
qsv: print more complete error messages
...
Include the libmfx error code and its description
9 years ago
Anton Khirnov
21962261c7
qsv: handle the semi-packed formats in map_fourcc as well
...
This will allow using this function for encoding as well, where the
input format is already the semi-packed version.
9 years ago
Anton Khirnov
92736c74fb
qsvdec: add support for P010 (10-bit 420) decoding
9 years ago
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.
9 years ago
Anton Khirnov
ad9c9440d5
qsvenc: support getting the session from an AVHWFramesContext
9 years ago
Anton Khirnov
a0524d9b1e
qsvdec: support getting the session from an AVHWFramesContext
9 years ago
Luca Barbato
92c1a83ee9
qsv: Fix loading multiple plugins
...
av_get_token does not strip the trailing separator.
9 years ago
Luca Barbato
ce9d7da765
qsv: Move down the implementation query
...
The plugin loaded may not match the general implementation capability
wise.
9 years ago
Ivan Uskov
ce91bab70f
libavcodec/qsv.c: Issue fixed: QSV engine does not release display handler under linux platform.
...
Reviewed-by: Gwenole Beauchesne <gb.devel@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Anton Khirnov
66acb76bb0
lavc: add Intel libmfx-based HEVC encoder
10 years ago
Ivan Uskov
9c95734e1c
libavcodec/qsv.c: Linux-only code part has been moved to separate function in order to avoid the "ISO C90 forbids mixed declarations and code" compiler warning.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Ivan Uskov
db89f45535
avcodec/qsv: Extending QSV/MFX session initialization for the linux platform where a display handle is required.
...
Now ff_qsv_init_internal_session() is able
to find appropriate display handle under linux using VAAPI.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
d0a63d8b98
qsvdec: split off some code that will be shared with the encoder
10 years ago
Anton Khirnov
b04d009b0e
qsv: rename to qsvdec
...
This is to avoid conflicts with the upcoming QSV encoding support.
10 years ago
Yukinori Yamazoe
212556cd21
qsv: Improve the log message of when initializing MFX_IMPL_HARDWARE{2, 3, 4}
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Anton Khirnov
4e08c82110
lavc: add an Intel libmfx-based H.264 decoder
...
Based on the code by Luca Barbato <lu_zero@gentoo.org> and Yukinori
Yamazoe <drocon11@gmail.com>.
10 years ago