> -----Original Message----- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > Of Mark Thompson > Sent: Tuesday, March 05, 2019 8:26 AM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH 4/5] vaapi_encode: Add ROI support > > On 28/02/2019 06:33, Guo, Yejun wrote:>> -----Original Message----- > >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On > Behalf > >> Of Mark Thompson > >> Sent: Thursday, February 28, 2019 6:00 AM > >> To: ffmpeg-devel@ffmpeg.org > >> Subject: [FFmpeg-devel] [PATCH 4/5] vaapi_encode: Add ROI support > >> > >> --- > >> libavcodec/vaapi_encode.c | 129 > >> ++++++++++++++++++++++++++++++++ > >> libavcodec/vaapi_encode.h | 9 +++ > >> libavcodec/vaapi_encode_h264.c | 2 + > >> libavcodec/vaapi_encode_h265.c | 2 + > >> libavcodec/vaapi_encode_mpeg2.c | 2 + > >> libavcodec/vaapi_encode_vp8.c | 2 + > >> libavcodec/vaapi_encode_vp9.c | 2 + > >> 7 files changed, 148 insertions(+) > > > > I tried this patch with below command, but do not see any quality change > with my eyes. > > I debugged in gdb and found the ROI data are correct in function > vaapi_encode_issue. > > > > I do not investigate deeper, and just want to first confirm if you see the > quality change or not. I might did something basic wrong. > > > > ffmpeg_g -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -s 1920x1080 > -i ../video > > /1080P_park_joy_1920x1080_500frames.yuv -vf format=nv12,hwupload > -c:v h264_vaapi -b:v 3M -y tmp.264 > > (my trick code in vf_scale.c is called with the above command) > > > > I tried the similar option with libx264 and found obvious video quality > changes. > > If you are using the i965 driver then you might need > <https://github.com/intel/intel-vaapi-driver/pull/447> to make it work. The > iHD driver worked for me with no changes. > > In CQP mode with H.264 it's straightforward to verify the output directly, too > - any stream analyser or other tool which can show the QP on each > macroblock will make it very obvious, since you will see exactly the offset > you > set in your regions of interest. (The reference decoder with trace enabled > shows it as mb_qp_delta as well.)
yes, CQP mode is more straightforward. I can see the difference obviously with my eyes when using option "-qp 50", and yes, with the analyzer tool, I can see each MB's final qp is set as expected, but do not see the difference in 'slice_qp_delta' and 'mb_qp_delta' in the analyzer. > > Thanks, > > - Mark > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel