X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Fqsvenc_hevc.c;h=f132a26c1ad8948608dae879f529a43d835d90cb;hb=bd2d70c0b8f416cf1f70e910ed675c0d46fb0010;hp=a8b293e19cf41fa328cee6bfff584691fda0efd6;hpb=ce726e77579363fffa3233a865025a6790c9f924;p=ffmpeg diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c index a8b293e19cf..f132a26c1ad 100644 --- a/libavcodec/qsvenc_hevc.c +++ b/libavcodec/qsvenc_hevc.c @@ -186,6 +186,9 @@ static av_cold int qsv_enc_init(AVCodecContext *avctx) } } + // HEVC and H264 meaning of the value is shifted by 1, make it consistent + q->qsv.idr_interval++; + ret = ff_qsv_enc_init(avctx, &q->qsv); if (ret < 0) return ret; @@ -225,6 +228,8 @@ 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 }, -1, INT_MAX, VE, "idr_interval" }, + { "begin_only", "Output an IDR-frame only at the beginning of the stream", 0, AV_OPT_TYPE_CONST, { .i64 = -1 }, 0, 0, VE, "idr_interval" }, { "load_plugin", "A user plugin to load in an internal session", OFFSET(load_plugin), AV_OPT_TYPE_INT, { .i64 = LOAD_PLUGIN_DEFAULT }, 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" },