summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/nvenc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 8ef3ede89c..2593ba4cff 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -743,6 +743,15 @@ static int nvenc_setup_encoder(AVCodecContext *avctx)
ctx->params.darWidth = avctx->width;
}
+ // De-compensate for hardware, dubiously, trying to compensate for
+ // playback at 704 pixel width.
+ if (avctx->width == 720 && (avctx->height == 480 || avctx->height == 576)) {
+ av_reduce(&ctx->params.darWidth, &ctx->params.darHeight,
+ ctx->params.darWidth * 44,
+ ctx->params.darHeight * 45,
+ 1024 * 1024);
+ }
+
ctx->params.frameRateNum = avctx->time_base.den;
ctx->params.frameRateDen = avctx->time_base.num * avctx->ticks_per_frame;