diff mbox

[FFmpeg-devel] avcodec/nvenc: Remove aspect-ratio decompensation logic

Message ID 20161123222105.9822-1-philipl@overt.org
State Accepted
Commit 829db8effd76b579ae9aca5ee8f85d3ade6af253
Headers show

Commit Message

Philip Langdale Nov. 23, 2016, 10:21 p.m. UTC
This dubious behaviour in nvenc was finally removed by nvidia, and
as we refuse to run on anything older than 7.0, we don't need to
keep it around for old versions.

Signed-off-by: Philip Langdale <philipl@overt.org>
---
 libavcodec/nvenc.c | 12 ------------
 1 file changed, 12 deletions(-)

Comments

Timo Rothenpieler Nov. 25, 2016, 12:40 p.m. UTC | #1
This LGTM, the compensation is indeed gone on all current Nvidia Drivers
I tested.
diff mbox

Patch

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index cd14af2..d24d278 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -953,18 +953,6 @@  static av_cold int nvenc_setup_encoder(AVCodecContext *avctx)
         ctx->init_encode_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(&dw, &dh,
-                  ctx->init_encode_params.darWidth * 44,
-                  ctx->init_encode_params.darHeight * 45,
-                  1024 * 1024);
-        ctx->init_encode_params.darHeight = dh;
-        ctx->init_encode_params.darWidth = dw;
-    }
-
     ctx->init_encode_params.frameRateNum = avctx->time_base.den;
     ctx->init_encode_params.frameRateDen = avctx->time_base.num * avctx->ticks_per_frame;