Signed-off-by: Zhong Li <[email protected]>
---
libavcodec/qsvenc.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 2259a79..c45b2a6 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -532,22 +532,22 @@ static int init_video_param(AVCodecContext *avctx,
QSVEncContext *q)
if (avctx->codec_id != AV_CODEC_ID_HEVC) {
q->extco.Header.BufferId = MFX_EXTBUFF_CODING_OPTION;
q->extco.Header.BufferSz = sizeof(q->extco);
+ if (q->rdo >= 0)
+ q->extco.RateDistortionOpt = q->rdo > 0 ? MFX_CODINGOPTION_ON :
MFX_CODINGOPTION_OFF;
+
+ if (avctx->codec_id == AV_CODEC_ID_H264) {
#if FF_API_CODER_TYPE
FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->coder_type >= 0)
- q->cavlc = avctx->coder_type == FF_CODER_TYPE_VLC;
+ if (avctx->coder_type >= 0)
+ q->cavlc = avctx->coder_type == FF_CODER_TYPE_VLC;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
- q->extco.CAVLC = q->cavlc ? MFX_CODINGOPTION_ON
- : MFX_CODINGOPTION_UNKNOWN;
+ q->extco.CAVLC = q->cavlc ? MFX_CODINGOPTION_ON
+ : MFX_CODINGOPTION_UNKNOWN;
- q->extco.PicTimingSEI = q->pic_timing_sei ?
- MFX_CODINGOPTION_ON :
MFX_CODINGOPTION_UNKNOWN;
+ q->extco.PicTimingSEI = q->pic_timing_sei ?
+ MFX_CODINGOPTION_ON :
MFX_CODINGOPTION_UNKNOWN;
- if (q->rdo >= 0)
- q->extco.RateDistortionOpt = q->rdo > 0 ? MFX_CODINGOPTION_ON :
MFX_CODINGOPTION_OFF;
-
- if (avctx->codec_id == AV_CODEC_ID_H264) {
if (avctx->strict_std_compliance != FF_COMPLIANCE_NORMAL)
q->extco.NalHrdConformance = avctx->strict_std_compliance >
FF_COMPLIANCE_NORMAL ?
MFX_CODINGOPTION_ON :
MFX_CODINGOPTION_OFF;
--
1.8.3.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel