[FFmpeg-devel] [PATCH 1/3] avcodec/nvenc: Fix b-frame parameter handling
Michael Niedermayer
michaelni at gmx.at
Fri Jan 23 00:14:49 CET 2015
On Fri, Jan 16, 2015 at 01:02:38AM +0100, Timo Rothenpieler wrote:
> ---
> libavcodec/nvenc.c | 20 ++++++++------------
> 1 file changed, 8 insertions(+), 12 deletions(-)
>
> diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
> index 5cd7727..90856be 100644
> --- a/libavcodec/nvenc.c
> +++ b/libavcodec/nvenc.c
> @@ -155,7 +155,6 @@ typedef struct NvencContext
> char *preset;
> int cbr;
> int twopass;
> - int gobpattern;
> int gpu;
> } NvencContext;
>
> @@ -582,6 +581,13 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
> memcpy(&ctx->encode_config, &preset_config.presetCfg, sizeof(ctx->encode_config));
> ctx->encode_config.version = NV_ENC_CONFIG_VER;
>
> + /* 0 is intra-only, 1 is I/P only, 2 is one B Frame, 3 two B frames, and so on. */
> + ctx->encode_config.frameIntervalP = avctx->max_b_frames + 1;
how can the user choose between intra only and IP ?
i would have assumed that gop_size <= 1 would select intra only
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150123/6445b036/attachment.asc>
More information about the ffmpeg-devel
mailing list