[libav-devel] [PATCH 2/2] lavc/qsvenc_jpeg: set a default quality

2018-10-11 Thread Zhong Li
Keep alignment with vaapi mjpeg encoder. Signed-off-by: Zhong Li --- libavcodec/qsvenc_jpeg.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/qsvenc_jpeg.c b/libavcodec/qsvenc_jpeg.c index 7465bb9..bbfd009 100644 --- a/libavcodec/qsvenc_jpeg.c +++ b/libavcodec/qsvenc_jpeg.c

[libav-devel] [PATCH 1/2] lavc/qsvenc_jpeg: add async_depth support

2018-10-11 Thread Zhong Li
abviously improves qsv (m)jpeg encoding performance due to the default async_depth is changed to 4. Signed-off-by: Zhong Li --- libavcodec/qsvenc_jpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/qsvenc_jpeg.c b/libavcodec/qsvenc_jpeg.c index e11b74d..7465bb9 100644 --- a/libavcodec

[libav-devel] [PATCH] lavu/qsv: fix a random hwupload failure regression

2018-09-30 Thread Zhong Li
Variable 'ret' hasn't been initialized,thus introducing a random hwupload failure regression due to qsv session uninitialized. Signed-off-by: Zhong Li --- libavutil/hwcontext_qsv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_qsv.c b/libavutil

[libav-devel] [PATCH] lavu/hwcontext_qsv: Add support for AV_PIX_FMT_BGRA.

2018-09-06 Thread Zhong Li
. Thanks for LinJie's discovery. Signed-off-by: Zhong Li Verified-by: Fu, Linjie --- libavfilter/qsvvpp.c | 2 +- libavutil/hwcontext_qsv.c | 44 ++-- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/libavfilter/qsvvpp.c b/libavfilter

[libav-devel] [PATCH] lavc/qsvenc: dump BufferSizeInKB message

2018-08-27 Thread Zhong Li
Signed-off-by: Zhong Li --- libavcodec/qsvenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index c2c2911..611449c 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -160,8 +160,8 @@ static void dump_video_param

[libav-devel] [PATCH] lavc/qsvenc: allow to set qp range for h264 BRC

2018-08-27 Thread Zhong Li
Signed-off-by: Zhong Li --- libavcodec/qsvenc.c | 14 ++ libavcodec/qsvenc_h264.c | 2 ++ 2 files changed, 16 insertions(+) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index e7ca62f..c2c2911 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -665,6

[libav-devel] [PATCH 3/3] lavc/qsvdec: release packet if mpeg2/vp8/vc1 decoding failure

2018-08-15 Thread Zhong Li
H264/265 have been fixed such an issue with commit 559370f2c45110afd8308eec7194437736c323d4. Similar fixing is needed for other codecs. Signed-off-by: Zhong Li --- libavcodec/qsvdec_other.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvdec_other.c b

[libav-devel] [PATCH 1/3] lavf/qsv: return an error if getting session handle failed

2018-08-15 Thread Zhong Li
Solve some issues found by an automated code scansion. Suppress the complain "variables 'handle' is used but maybe uninitialized". Signed-off-by: Zhong Li --- libavfilter/qsvvpp.c | 5 + libavfilter/vf_deinterlace_qsv.c | 5 + libavfilter/vf_scale_qsv.c |

[libav-devel] [PATCH 2/3] lavc/qsvenc: fix a misleading log message

2018-08-15 Thread Zhong Li
Signed-off-by: Zhong Li --- libavcodec/qsvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index c74b3ae..e7ca62f 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -1142,7 +1142,7 @@ static void print_interlace_msg

[libav-devel] [PATCH] lavf/qsv: suppress code scan complain

2018-07-03 Thread Zhong Li
Suppress the complain "variables 'handle' is used but maybe uninitialized". Signed-off-by: Zhong Li --- libavfilter/qsvvpp.c | 5 + libavfilter/vf_deinterlace_qsv.c | 5 + libavfilter/vf_scale_qsv.c | 5 + 3 files changed, 15 insertions(+) diff --git a/l

[libav-devel] [PATCH] lavc/qsv_overlay: suppress code scan complain

2018-07-03 Thread Zhong Li
Suppress the complain "variables 'pix_fmt' is used but maybe uninitialized". Signed-off-by: Zhong Li --- libavfilter/vf_overlay_qsv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c index 89f2fb1..33d5

[libav-devel] [PATCH] qsvenc: use the compression_level to replace private option

2018-06-07 Thread Zhong Li
Use a common way to control target_usage, keeping consistent with vaapi encoders. The private option preset is kept only for compatibility. Signed-off-by: Zhong Li --- libavcodec/qsvenc.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b

[libav-devel] [PATCH] qsvenc: remove vcm option on Linux

2018-06-07 Thread Zhong Li
1. vcm mode is only available for H264. 2. vcm is not supported on Linux, but it is shown when run "./avconv -h encoder=h264_qsv |grep vcm". This shouldn't happen. Signed-off-by: Zhong Li --- libavcodec/qsvenc.h | 1 - libavcodec/qsvenc_h264.c | 3 +++ 2 files changed, 3 insert

[libav-devel] [PATCH] lavc/qsvenc: add an option to disable MFE mode

2018-05-23 Thread Zhong Li
. Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc_h264.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c index ae00ff8..2ecdb10 100644 --- a/libavcodec/qsvenc_h264.c +++ b/libavcodec/qsvenc_h264.c @@

[libav-devel] [PATCH] lavu/hwcontext_qsv: Add support for AV_PIX_FMT_BGRA.

2018-05-21 Thread Zhong Li
RGB32(AV_PIX_FMT_BGRA on intel platforms) format may be used as overlay with alpha blending. So add AV_PIX_FMT_BGRA format support. Rename RGB32 to be BGRA to make it clearer as Mark Thompson's suggestion. Signed-off-by: Zhong Li <zhong...@intel.com> --- libavfilter/qsvvpp.c

[libav-devel] [PATCH V2] lavc/qsvenc: add an option to disable MFE mode

2018-05-21 Thread Zhong Li
-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc_h264.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c index ae00ff8..2ecdb10 100644 --- a/libavcodec/qsvenc_h264.c +++ b/libavcodec/qsvenc_h264.c @@ -94,7

[libav-devel] [PATCH 2/2] lavc/qsvenc: add mf_max_num option for MFE

2018-05-04 Thread Zhong Li
Maximum number of frames to be used for combining. Each encoder in joined sessions has to be initialized with the same value. Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.c | 1 + libavcodec/qsvenc.h | 1 + libavcodec/qsvenc_h264.c | 2 ++ 3 files chan

[libav-devel] [PATCH 1/2] lavc/qsvenc: add detail options for MFE mode

2018-05-04 Thread Zhong Li
Not convenient if using numerals to set MFE mode. It is ambiguous and misleading (e.g: user may misunderstand setting mfmode to 1 is to enable MFE but actually it is to disable MFE, and set it to be 5 or above is meaningless). Signed-off-by: Zhong Li <zhong...@intel.com> --- liba

[libav-devel] [PATCH] lavc/qsvenc: fix the hard code of height aligment checking

2018-04-04 Thread Zhong Li
Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index f6b1a0d..fc9ace4 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -1048,7 +1048,7 @@ stat

[libav-devel] [PATCH] lavc/qsvdec: expose frame pic_type and key_frame

2018-04-04 Thread Zhong Li
x.a@intel.com> Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsv.c | 24 libavcodec/qsv_internal.h | 3 +++ libavcodec/qsvdec.c | 9 + 3 files changed, 36 insertions(+) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c i

[libav-devel] [PATCH] lavf/qsvvpp: bypass vpp if not needed.

2018-04-04 Thread Zhong Li
Currently vpp pipeline is always created, even for the unnecessary cases such as setting the option "vpp_qsv=w=1280:h=720" for an input with native resolution 1280x720. Thus introduces unnecessary performance dropping, so bypass vpp if not needed. Signed-off-by: Zhong Li <zhong

[libav-devel] [PATCH V4 1/2] lavc/qsvdec: expose frame pic_type and key_frame

2018-03-29 Thread Zhong Li
x.a@intel.com> Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsv.c | 24 libavcodec/qsv_internal.h | 3 +++ libavcodec/qsvdec.c | 9 + 3 files changed, 36 insertions(+) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c i

[libav-devel] [PATCH 2/2] lavf/qsvvpp: bypass vpp if not needed.

2018-03-29 Thread Zhong Li
It is benefit to performance for specific case. Signed-off-by: Zhong Li <zhong...@intel.com> --- libavfilter/vf_vpp_qsv.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 610e821..5

[libav-devel] [PATCH] lavf/qsvvpp: bypass vpp is not needed.

2018-03-28 Thread Zhong Li
It is benefit to performance for specific case. Signed-off-by: Zhong Li <zhong...@intel.com> --- libavfilter/vf_vpp_qsv.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 610e821..5

[libav-devel] [PATCH] lavc/qsvdec: expose frame pic_type

2018-03-28 Thread Zhong Li
IRAP frames are key frames, and other codecs have no IDR frame. Signed-off-by: ChaoX A Liu <chaox.a@intel.com> Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsv.c | 24 libavcodec/qsv_internal.h | 3 +++ libavcodec/qsvdec.c |

[libav-devel] [PATCH V2 2/3] lavu/hwcontext_qsv: Add support for pix_fmt RGB32.

2018-03-22 Thread Zhong Li
RGB32 format may be used as overlay with alpha blending. So add RGB32 format support. Signed-off-by: ChaoX A Liu <chaox.a@intel.com> Signed-off-by: Zhong Li <zhong...@intel.com> --- libavutil/hwcontext_qsv.c | 43 +-- 1 file changed, 3

[libav-devel] [PATCH V3 3/3] lavc/qsvdec: expose frame pic_type

2018-03-22 Thread Zhong Li
IRAP frames are key frames, and other codecs have no IDR frame. Signed-off-by: ChaoX A Liu <chaox.a@intel.com> Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsv.c | 24 libavcodec/qsv_internal.h | 3 +++ libavcodec/qsvdec.c |

[libav-devel] [PATCH V2 1/3] lavc/qsvdec: set complete_frame flags for progressive picture

2018-03-22 Thread Zhong Li
rogressive 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...@intel.com> --- libavcodec/qsvdec.c | 4 +++- 1 file changed, 3

[libav-devel] [PATCH 2/2] lavu/hwcontext_qsv: Add support for pix_fmt RGB32.

2018-03-19 Thread Zhong Li
And support nv12/yuyv422/rgb32 formats for qsv_transfer_data Signed-off-by: ChaoX A Liu <chaox.a@intel.com> Signed-off-by: Zhong Li <zhong...@intel.com> --- libavutil/hwcontext_qsv.c | 49 +-- 1 file changed, 39 insertions(+), 10 deleti

[libav-devel] [PATCH 1/2] lavc/qsvdec: set complete_frame flags for non-interlaced frames.

2018-03-19 Thread Zhong Li
Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index c74ec68..dc44865 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -321,6 +321,9 @@ static int qsv_decod

[libav-devel] [PATCH 2/2] lavc/qsvenc: add the Access Unit Delimiter NAL Unit support

2018-03-15 Thread Zhong Li
Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.c | 1 + libavcodec/qsvenc.h | 2 ++ libavcodec/qsvenc_h264.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index baa2c630..f6b1a0d 100644 --- a/libavcodec/qs

[libav-devel] [PATCH 1/2] lavc/qsvenc: fix the typo of FrameRateExtD

2018-03-15 Thread Zhong Li
Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index d4dd4a3..baa2c630 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -374,7 +374,7 @@ stat

[libav-devel] [PATCH] lavc/qsvenc: provide detail error message if parameters invalid

2018-03-01 Thread Zhong Li
Currently always shows "Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode", but sometimes it is not accurate. Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.c | 31 +-- 1 file changed, 25

[libav-devel] [PATCH] qsvenc: AVBR is not supported on non-windows OS

2018-01-30 Thread Zhong Li
AVBR is supported from API 1.3 but only available for Windows Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.c | 17 ++--- libavcodec/qsvenc.h | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c

[libav-devel] [PATCH V2] lavc/qsvdec: expose frame pic_type and key_frame

2018-01-30 Thread Zhong Li
Currently key_frame and pict_type are unset. Add an extra param to fetch the picture type from qsv decoder Signed-off-by: ChaoX A Liu <chaox.a@intel.com> Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsv.c | 24 libavcodec/qsv_int

[libav-devel] [PATCH] lavc/qsvdec: expose frame pic_type and key_frame

2018-01-28 Thread Zhong Li
Currently key_frame and pict_type are unset. Add an extra param to fetch the picture type from qsv decoder Signed-off-by: ChaoX A Liu <chaox.a@intel.com> Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsv.c | 24 libavcodec/qsv_int

[libav-devel] [PATCH] qsvdec: fix vp8 decoding failure issues

2018-01-25 Thread Zhong Li
t/vp8-test-vectors-r1/vp80-00-comprehensive-001.ivf -vf "hwdownload,format=nv12" -pix_fmt yuv420p -f md5 - This patch also allows coded_w/h smaller than surface_w/h. Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsv.c| 2 +- libavcodec/qsvdec.c | 3 --- 2 files

[libav-devel] [PATCH 1/2] lavu/qsv: add log message for libmfx version

2017-12-28 Thread Zhong Li
It is benefit to diagnose issues related to different libmfx version. Signed-off-by: Zhong Li <zhong...@intel.com> --- libavutil/hwcontext_qsv.c | 4 1 file changed, 4 insertions(+) diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index 5018a05..9270b22

[libav-devel] [PATCH 2/2] examples/qsvdec: remove the deprecated filed refcounted_frames

2017-12-28 Thread Zhong Li
It was just useful for deprecated API (avcodec_decode_video2), but useless for new decode APIs (avcodec_send_packet/avcodec_receive_frame). Signed-off-by: Zhong Li <zhong...@intel.com> --- doc/examples/qsvdec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/examples/qsvdec.c

[libav-devel] [PATCH] qsv/vp8dec: fix memory leak issue

2017-12-06 Thread Zhong Li
Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvdec_other.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/qsvdec_other.c b/libavcodec/qsvdec_other.c index 1ba803b..cc5f205 100644 --- a/libavcodec/qsvdec_other.c +++ b/libavcodec/qsvdec_other.c @@ -60,6

[libav-devel] [PATCH 2/2] lavc/qsvenc: add error messeage if ICQ unsupported.

2017-12-06 Thread Zhong Li
Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 35f19d1..dbecb45 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -295,6 +295,12 @@ static int select_r

[libav-devel] [PATCH 1/2] lavc/qsvenc: ICQ/VCM/QVBR are not avilable on Linux

2017-12-06 Thread Zhong Li
Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h index 9b0b84b..7f11460 100644 --- a/libavcodec/qsvenc.h +++ b/libavcodec/qsvenc.h @@ -43,9 +43,16 @@ #define QSV_H

[libav-devel] [PATCH V2] lavc/qsvenc: set HRD buffer size

2017-12-01 Thread Zhong Li
Hypothetical Reference Decoding (HRD) model assumes that data flows into a buffer of the fixed size BufferSizeInKB with a constant bitrate. Smaller BufferSizeInKB means smaller frame size variations, but more difficult to maintain HRD. Signed-off-by: Zhong Li <zhong...@intel.com> --- liba

[libav-devel] [PATCH] lavc/qsvenc: set HRD buffer size

2017-11-27 Thread Zhong Li
Hypothetical Reference Decoding (HRD) model assumes that data flows into a buffer of the fixed size BufferSizeInKB with a constant bitrate. BufferSizeInKB represents the maximum possible size of any compressed frames. Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.c | 2

[libav-devel] [PATCH v2 1/2] qsvenc: cavlc option is only available for h264

2017-11-23 Thread Zhong Li
H264 encoding can support both CAVLC and CABAC, so the cavlc option is available. But it is not available for other codecs such as hevc and mpeg2. For example, CABAC is the only entropy coding way for hevc, and mpeg2 just use VLC. Signed-off-by: Zhong Li <zhong...@intel.com> --- liba

[libav-devel] [PATCH v2 2/2] qsv/h264enc: fix cavlc option setting useless issue

2017-11-23 Thread Zhong Li
"coder" (which should be deprecated) is set to cabac Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.c | 2 +- libavcodec/qsvenc_h264.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index

[libav-devel] [PATCH 2/2] qsv/h264enc: fix cavlc option setting useless issue

2017-11-12 Thread Zhong Li
"coder" (which should be deprecated) is set to cabac Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.c | 11 ++- libavcodec/qsvenc_h264.c | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc

[libav-devel] [PATCH 1/2] qsvenc: move cavlc out of common option

2017-11-12 Thread Zhong Li
CAVLC option is only available for h264 encoding. CABAC is the only entropy coding way for hevc. Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvenc.h | 3 +-- libavcodec/qsvenc_h264.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/qsve

[libav-devel] [PATCH] qsv/hevcdec: Load hw plugin by default on non-windows os

2017-11-10 Thread Zhong Li
Software plugin is not available on Linux, Only works on Windows. Similar changes have been applied to qsv hevc encoder by b05128f3c953bd66483e697d60a2e7e45ee9cfa0. Signed-off-by: Zhong Li <zhong...@intel.com> --- libavcodec/qsvdec_h2645.c | 8 +++- 1 file changed, 7 insertions