diff options
author | Zhong Li <zhong.li@intel.com> | 2018-06-01 18:21:28 +0800 |
---|---|---|
committer | Zhong Li <zhong.li@intel.com> | 2018-08-07 11:26:37 +0800 |
commit | 6088b7b0373faad7a8e62a8c4eb4ced9084ad2d9 (patch) | |
tree | 952ea48d9babc081de71e398d4e1b3c908a5bdfa /libavcodec/qsvenc_h264.c | |
parent | aa8e5eecac97dd3c87518e0accfb96dea05066c8 (diff) | |
download | ffmpeg-6088b7b0373faad7a8e62a8c4eb4ced9084ad2d9.tar.gz |
lavc/qsvenc: expose qp of encoded frames
Requirement from ticket #7254.
Currently only H264 supported by MSDK.
Signed-off-by: Zhong Li <zhong.li@intel.com>
Diffstat (limited to 'libavcodec/qsvenc_h264.c')
-rw-r--r-- | libavcodec/qsvenc_h264.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c index 7aa65e96bc..985f4aca9c 100644 --- a/libavcodec/qsvenc_h264.c +++ b/libavcodec/qsvenc_h264.c @@ -94,6 +94,11 @@ static av_cold int qsv_enc_close(AVCodecContext *avctx) { QSVH264EncContext *q = avctx->priv_data; +#if QSV_VERSION_ATLEAST(1, 26) + av_log(avctx, AV_LOG_VERBOSE, "encoded %d frames, avarge qp is %.2f\n", + avctx->frame_number,(double)q->qsv.sum_frame_qp / avctx->frame_number); +#endif + return ff_qsv_enc_close(avctx, &q->qsv); } |