From patchwork Wed Nov 23 22:21:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Langdale X-Patchwork-Id: 1538 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.90.1 with SMTP id o1csp2982999vsb; Wed, 23 Nov 2016 14:21:23 -0800 (PST) X-Received: by 10.194.57.180 with SMTP id j20mr5098821wjq.165.1479939683120; Wed, 23 Nov 2016 14:21:23 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g144si4872505wmg.12.2016.11.23.14.21.22; Wed, 23 Nov 2016 14:21:23 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@overt.org; dkim=neutral (body hash did not verify) header.i=@overt.org; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DFED5680D42; Thu, 24 Nov 2016 00:21:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from so254-29.mailgun.net (so254-29.mailgun.net [198.61.254.29]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6C6B6680D1E for ; Thu, 24 Nov 2016 00:21:09 +0200 (EET) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=overt.org; q=dns/txt; s=k1; t=1479939671; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=Rh4tDX54mJEsEDZH6jHO2n5BDEylGfBFZ6OV7eq6k0I=; b=wRJbGcdJINsNrpz//fWeQIfVLH9lq7L7iQwmMe2ultnvLEpbR+0AUJPoLBX161H/F4pXkQut f21a56QkuffbKFPDh03YV/eguSwSP0+cIGMbVyu3nNFqcZjuQxTDOTyORGb2kz02r/NLxphd 7yriza5K4zAndRWYEaljeEwHLwM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=overt.org; s=k1; q=dns; h=Sender: From: To: Cc: Subject: Date: Message-Id; b=zIlZLI288NNDM5S6e6TvwmjyTWosCLaYi9fzJBUmdn0bN9/Cpz3FHG6j6R4ICv3s7TE/0K sJaONB7qng2H6XwC2UJE7dvsgeBXJPaFqniGMCK6OJpdQJTQZxCNNucVxvfxU0HE8ea1yEnT qQJ06seAaGaXngRCLogzYN5j/47dI= X-Mailgun-Sending-Ip: 198.61.254.29 X-Mailgun-Sid: WyIyM2Q3MCIsICJmZm1wZWctZGV2ZWxAZmZtcGVnLm9yZyIsICI0YTg5NjEiXQ== Received: from mail.overt.org (155.208.178.107.bc.googleusercontent.com [107.178.208.155]) by mxa.mailgun.org with ESMTP id 58361656.7f461c379b90-smtp-out-n03; Wed, 23 Nov 2016 22:21:10 -0000 (UTC) Received: from authenticated-user (mail.overt.org [107.178.208.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.overt.org (Postfix) with ESMTPSA id 243FB6059E; Wed, 23 Nov 2016 22:21:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=overt.org; s=mail; t=1479939670; bh=q3vuLwWhloQ8tPQQaTxtQFIIiDJJwW38jXz7Q1j6Nqc=; h=From:To:Cc:Subject:Date:From; b=S+Pi5ubxVdrLSPW2FcUK+SAqFNcpcWHcXTfBSl/Po6TkmUWFTVU6ORlowCnCIpb30 6sLmwWvTx04OuHGyJz0ukl7hZxlrDCcFAIhe45edYTMverXVY5H37sn2I9zOW1cDte Dv70JQMJOLUUZIDVS6huHnapHzqSWQHmtpd29DeuM+1W+lfJXqBfxWkXyWhorCQ39c yTB3pK3eff7n5e7hRRMvAqjiLpNn4TfE8GpeN5HptU5yGYut6J+IS8yC8zCk8dpT7q go1ygKjdnQJCHqX6gxTHe5tG8c3DUKZf6nRftm7oypfwKCgn7UgcACsxcAm0U9QjEt Xw+p4n66l9uCw== From: Philip Langdale To: ffmpeg-devel@ffmpeg.org Date: Wed, 23 Nov 2016 14:21:05 -0800 Message-Id: <20161123222105.9822-1-philipl@overt.org> Subject: [FFmpeg-devel] [PATCH] avcodec/nvenc: Remove aspect-ratio decompensation logic X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Philip Langdale MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 --- libavcodec/nvenc.c | 12 ------------ 1 file changed, 12 deletions(-) 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;