[FFmpeg-devel] [PATCH] avcodec/qsvenc_hevc: add idr_interval option

Mark Thompson sw at jkqxz.net
Thu Jul 6 14:51:48 EEST 2017


On 06/07/17 11:48, Steven Liu wrote:
> From: Steven Liu <lingjiujianke at gmail.com>
> 
> user need to control the idr_interval for qsv hevc
> 
> Signed-off-by: Steven Liu <lq at onvideo.cn>
> ---
>  libavcodec/qsvenc_hevc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
> index 7d4d55bb61..c063e27eea 100644
> --- a/libavcodec/qsvenc_hevc.c
> +++ b/libavcodec/qsvenc_hevc.c
> @@ -214,6 +214,7 @@ static av_cold int qsv_enc_close(AVCodecContext *avctx)
>  static const AVOption options[] = {
>      QSV_COMMON_OPTS
>  
> +    { "idr_interval", "Distance (in I-frames) between IDR frames", OFFSET(qsv.idr_interval), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
>      { "load_plugin", "A user plugin to load in an internal session", OFFSET(load_plugin), AV_OPT_TYPE_INT, { .i64 = LOAD_PLUGIN_HEVC_SW }, LOAD_PLUGIN_NONE, LOAD_PLUGIN_HEVC_HW, VE, "load_plugin" },
>      { "none",     NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_NONE },    0, 0, VE, "load_plugin" },
>      { "hevc_sw",  NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_HEVC_SW }, 0, 0, VE, "load_plugin" },
> 

Sure, I guess?

Though, what use-case do you intend this option for in H.265?  It already generates IRAP frames at the GOP interval, and unlike H.264 there isn't any confusion about whether they are usable as seek points.

(I can't actually remember exactly what types of NAL units it generates with and without this option; I'll have a look later.)



More information about the ffmpeg-devel mailing list