Commit c63da6e9 authored by Derek Buitenhuis's avatar Derek Buitenhuis

Merge commit '9cac1b4b'

* commit '9cac1b4b':
  qsvenc: Add private option to replace coder_type
Merged-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parents 32766877 9cac1b4b
......@@ -460,8 +460,14 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
if (avctx->codec_id != AV_CODEC_ID_HEVC) {
q->extco.Header.BufferId = MFX_EXTBUFF_CODING_OPTION;
q->extco.Header.BufferSz = sizeof(q->extco);
q->extco.CAVLC = avctx->coder_type == FF_CODER_TYPE_VLC ?
MFX_CODINGOPTION_ON : MFX_CODINGOPTION_UNKNOWN;
#if FF_API_CODER_TYPE
FF_DISABLE_DEPRECATION_WARNINGS
if (avctx->coder_type != 0)
q->cavlc = avctx->coder_type == FF_CODER_TYPE_VLC;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
q->extco.CAVLC = q->cavlc ? MFX_CODINGOPTION_ON
: MFX_CODINGOPTION_UNKNOWN;
q->extco.PicTimingSEI = q->pic_timing_sei ?
MFX_CODINGOPTION_ON : MFX_CODINGOPTION_UNKNOWN;
......
......@@ -69,6 +69,7 @@
{ "adaptive_i", "Adaptive I-frame placement", OFFSET(qsv.adaptive_i), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "adaptive_b", "Adaptive B-frame placement", OFFSET(qsv.adaptive_b), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "b_strategy", "Strategy to choose between I/P/B-frames", OFFSET(qsv.b_strategy), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "cavlc", "Enable CAVLC", OFFSET(qsv.cavlc), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE }, \
typedef int SetEncodeCtrlCB (AVCodecContext *avctx,
const AVFrame *frame, mfxEncodeCtrl* enc_ctrl);
......@@ -129,6 +130,7 @@ typedef struct QSVEncContext {
int adaptive_i;
int adaptive_b;
int b_strategy;
int cavlc;
int int_ref_type;
int int_ref_cycle_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment