[FFmpeg-devel] [PATCH] 0001 - added PicTimingSSEI-libavcodec-qsvenc_h264.c
Sven Dueking
svennablet at gmail.com
Tue Aug 18 16:35:56 CEST 2015
From: Sven Dueking <sven at nablet.com>
---
libavcodec/qsvenc.c | 3 +++
libavcodec/qsvenc.h | 1 +
libavcodec/qsvenc_h264.c | 1 +
3 files changed, 5 insertions(+)
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index e5d3fa6..52e416c 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -146,6 +146,9 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
q->extco.CAVLC = avctx->coder_type == FF_CODER_TYPE_VLC ?
MFX_CODINGOPTION_ON : MFX_CODINGOPTION_UNKNOWN;
+ q->extco.PicTimingSEI = q->pic_timing_sei == 1 ?
+ MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
+
q->extparam[0] = (mfxExtBuffer *)&q->extco;
q->param.ExtParam = q->extparam;
diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
index 19be2aa..2316488 100644
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@ -61,6 +61,7 @@ typedef struct QSVEncContext {
int preset;
int avbr_accuracy;
int avbr_convergence;
+ int pic_timing_sei;
char *load_plugins;
} QSVEncContext;
diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index 95396fc..bbdaa4d 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -69,6 +69,7 @@ static const AVOption options[] = {
{ "idr_interval", "Distance (in I-frames) between IDR frames", OFFSET(qsv.idr_interval), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
{ "avbr_accuracy", "Accuracy of the AVBR ratecontrol", OFFSET(qsv.avbr_accuracy), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
{ "avbr_convergence", "Convergence of the AVBR ratecontrol", OFFSET(qsv.avbr_convergence), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
+ { "pic_timing_sei", "Insert picture timing SEI with pic_struct_syntax element", OFFSET(qsv.pic_timing_sei), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
{ "profile", NULL, OFFSET(qsv.profile), AV_OPT_TYPE_INT, { .i64 = MFX_PROFILE_UNKNOWN }, 0, INT_MAX, VE, "profile" },
{ "unknown" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, VE, "profile" },
--
1.8.3.1
More information about the ffmpeg-devel
mailing list