mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
Merge commit '508378556631dc18d32247b4a4e35703758e1ca9'
* commit '508378556631dc18d32247b4a4e35703758e1ca9': qsv: Support explicit lookahead downscaling Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
374f818bfb
@ -599,6 +599,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
q->extco2.Trellis = q->trellis;
|
||||
#endif
|
||||
|
||||
#if QSV_HAVE_LA_DS
|
||||
q->extco2.LookAheadDS = q->look_ahead_downsampling;
|
||||
#endif
|
||||
|
||||
#if QSV_HAVE_BREF_TYPE
|
||||
#if FF_API_PRIVATE_OPT
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
@ -615,10 +619,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extco2;
|
||||
|
||||
#if QSV_HAVE_LA_DS
|
||||
q->extco2.LookAheadDS = q->look_ahead_downsampling;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -55,6 +55,13 @@
|
||||
#define QSV_HAVE_QVBR 0
|
||||
#endif
|
||||
|
||||
#if !QSV_HAVE_LA_DS
|
||||
#define MFX_LOOKAHEAD_DS_UNKNOWN 0
|
||||
#define MFX_LOOKAHEAD_DS_OFF 0
|
||||
#define MFX_LOOKAHEAD_DS_2x 0
|
||||
#define MFX_LOOKAHEAD_DS_4x 0
|
||||
#endif
|
||||
|
||||
#define QSV_COMMON_OPTS \
|
||||
{ "async_depth", "Maximum processing parallelism", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 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 }, \
|
||||
|
@ -113,10 +113,13 @@ static const AVOption options[] = {
|
||||
{ "look_ahead_depth", "Depth of look ahead in number frames", OFFSET(qsv.look_ahead_depth), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 100, VE },
|
||||
#endif
|
||||
#if QSV_HAVE_LA_DS
|
||||
{ "look_ahead_downsampling", NULL, OFFSET(qsv.look_ahead_downsampling), AV_OPT_TYPE_INT, { .i64 = MFX_LOOKAHEAD_DS_UNKNOWN }, MFX_LOOKAHEAD_DS_UNKNOWN, MFX_LOOKAHEAD_DS_2x, VE, "look_ahead_downsampling" },
|
||||
{ "look_ahead_downsampling", "Downscaling factor for the frames saved for the lookahead analysis", OFFSET(qsv.look_ahead_downsampling),
|
||||
AV_OPT_TYPE_INT, { .i64 = MFX_LOOKAHEAD_DS_UNKNOWN }, MFX_LOOKAHEAD_DS_UNKNOWN, MFX_LOOKAHEAD_DS_2x, VE, "look_ahead_downsampling" },
|
||||
{ "unknown" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_UNKNOWN }, INT_MIN, INT_MAX, VE, "look_ahead_downsampling" },
|
||||
{ "auto" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_UNKNOWN }, INT_MIN, INT_MAX, VE, "look_ahead_downsampling" },
|
||||
{ "off" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_OFF }, INT_MIN, INT_MAX, VE, "look_ahead_downsampling" },
|
||||
{ "2x" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_2x }, INT_MIN, INT_MAX, VE, "look_ahead_downsampling" },
|
||||
{ "4x" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_LOOKAHEAD_DS_4x }, INT_MIN, INT_MAX, VE, "look_ahead_downsampling" },
|
||||
#endif
|
||||
|
||||
{ "int_ref_type", "Intra refresh type", OFFSET(qsv.int_ref_type), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE, "int_ref_type" },
|
||||
|
Loading…
Reference in New Issue
Block a user