[FFmpeg-devel] [PATCH] Optimize nvenc parameters, add 3 more presets: fast, medium, slow

Clément Bœsch u at pkh.me
Fri Sep 11 11:50:57 CEST 2015


On Fri, Sep 11, 2015 at 11:45:59AM +0200, Timo Rothenpieler wrote:
> I applied the patch to the current ffmpeg master and made some style
> adjustments, you can take a look on my github fork:
> 
> https://github.com/BtbN/FFmpeg/commit/3b5964c521343b883f92079765148fd630a9370c
> 
> I also attached the patch for reference.
> 
> Any comments?

> From 3b5964c521343b883f92079765148fd630a9370c Mon Sep 17 00:00:00 2001
> From: Edward Richards <erichards at nvidia.com>
> Date: Fri, 11 Sep 2015 11:07:10 +0200
> Subject: [PATCH] avcodec/nvenc: Optimize nvenc parameters
> 
> Add 3 more presets: fast, medium, slow.
> Improve min/max QP calculation.
> Add more verbose log outputs.
> Unify nvenc log messages.
> 
> Signed-off-by: Timo Rothenpieler <timo at rothenpieler.org>
> ---
>  libavcodec/nvenc.c | 188 ++++++++++++++++++++++++++++++++++++-----------------
>  1 file changed, 130 insertions(+), 58 deletions(-)
> 
> diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
> index 3174b01..72f13de 100644
> --- a/libavcodec/nvenc.c
> +++ b/libavcodec/nvenc.c
> @@ -334,7 +334,7 @@ static int64_t timestamp_queue_dequeue(NvencDataList* queue)
>  do { \
>      (f) = (t)LOAD_FUNC(dl_fn->cuda_lib, s); \
>      if (!(f)) { \

> -        av_log(avctx, AV_LOG_FATAL, "Failed loading %s from CUDA library\n", s); \
> +        av_log(avctx, AV_LOG_FATAL, "[nvenc]: Failed loading %s from CUDA library\n", s); \

This kind of changes are unwanted. The codec name should already be raised
in the logging (through avctx). It also makes it inconsistent with every
other codecs with your own formating.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150911/af0bfd51/attachment.sig>


More information about the ffmpeg-devel mailing list