summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.c
diff options
context:
space:
mode:
authorAgatha Hu <ahu@nvidia.com>2015-10-16 18:23:51 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2015-10-16 18:24:10 +0200
commit2b5dda3f486125584ddfa2c01c76458f1f59094e (patch)
tree8cdfc891f2005ad78f076f344bad7d1f7fc640b1 /libavcodec/nvenc.c
parent8e7571eacda57530b064f48bcc067c99f88a98ca (diff)
avcodec/nvenc: fix b frame n_quant_offset
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavcodec/nvenc.c')
-rw-r--r--libavcodec/nvenc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 18bcd96f09..0e6ef435a1 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -742,8 +742,6 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
switch (avctx->codec->id) {
case AV_CODEC_ID_H264:
ctx->encode_config.encodeCodecConfig.h264Config.idrPeriod = avctx->gop_size;
- ctx->encode_config.encodeCodecConfig.h264Config.hierarchicalPFrames = 1;
- ctx->encode_config.encodeCodecConfig.h264Config.hierarchicalBFrames = 1;
break;
case AV_CODEC_ID_H265:
ctx->encode_config.encodeCodecConfig.hevcConfig.idrPeriod = avctx->gop_size;
@@ -843,9 +841,9 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
if(avctx->i_quant_factor != 0.0 && avctx->b_quant_factor != 0.0) {
ctx->encode_config.rcParams.initialRCQP.qpIntra = qp_inter_p * fabs(avctx->i_quant_factor);
- ctx->encode_config.rcParams.initialRCQP.qpIntra += qp_inter_p * avctx->i_quant_offset;
+ ctx->encode_config.rcParams.initialRCQP.qpIntra += avctx->i_quant_offset;
ctx->encode_config.rcParams.initialRCQP.qpInterB = qp_inter_p * fabs(avctx->b_quant_factor);
- ctx->encode_config.rcParams.initialRCQP.qpInterB += qp_inter_p * avctx->b_quant_offset;
+ ctx->encode_config.rcParams.initialRCQP.qpInterB += avctx->b_quant_offset;
} else {
ctx->encode_config.rcParams.initialRCQP.qpIntra = qp_inter_p;
ctx->encode_config.rcParams.initialRCQP.qpInterB = qp_inter_p;