lavc/libx265: allow users to set closed GOP via generic lavc flag

lavc flag 'cgop' can be used to set closed GOP.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Gyan Doshi 2018-06-01 16:14:02 +05:30
parent 5205b3289e
commit 841c1efc78
2 changed files with 2 additions and 1 deletions

View File

@ -114,6 +114,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
ctx->params->sourceWidth = avctx->width;
ctx->params->sourceHeight = avctx->height;
ctx->params->bEnablePsnr = !!(avctx->flags & AV_CODEC_FLAG_PSNR);
ctx->params->bOpenGOP = !(avctx->flags & AV_CODEC_FLAG_CLOSED_GOP);
/* Tune the CTU size based on input resolution. */
if (ctx->params->sourceWidth < 64 || ctx->params->sourceHeight < 64)

View File

@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 19
#define LIBAVCODEC_VERSION_MICRO 104
#define LIBAVCODEC_VERSION_MICRO 105
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \