libx264: add 'psy_trellis' private option.
Deprecate corresponding global option.
This commit is contained in:
parent
93e623c642
commit
2a44a8f609
@ -2748,7 +2748,6 @@ typedef struct AVCodecContext {
|
|||||||
* - decoding: unused
|
* - decoding: unused
|
||||||
*/
|
*/
|
||||||
attribute_deprecated float psy_rd;
|
attribute_deprecated float psy_rd;
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PSY trellis
|
* PSY trellis
|
||||||
@ -2756,7 +2755,8 @@ typedef struct AVCodecContext {
|
|||||||
* - encoding: Set by user
|
* - encoding: Set by user
|
||||||
* - decoding: unused
|
* - decoding: unused
|
||||||
*/
|
*/
|
||||||
float psy_trellis;
|
attribute_deprecated float psy_trellis;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RC lookahead
|
* RC lookahead
|
||||||
|
@ -46,6 +46,7 @@ typedef struct X264Context {
|
|||||||
int aq_mode;
|
int aq_mode;
|
||||||
float aq_strength;
|
float aq_strength;
|
||||||
float psy_rd;
|
float psy_rd;
|
||||||
|
float psy_trellis;
|
||||||
} X264Context;
|
} X264Context;
|
||||||
|
|
||||||
static void X264_log(void *p, int level, const char *fmt, va_list args)
|
static void X264_log(void *p, int level, const char *fmt, va_list args)
|
||||||
@ -240,7 +241,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
|
|||||||
x4->params.rc.i_lookahead = avctx->rc_lookahead;
|
x4->params.rc.i_lookahead = avctx->rc_lookahead;
|
||||||
|
|
||||||
x4->params.analyse.b_psy = avctx->flags2 & CODEC_FLAG2_PSY;
|
x4->params.analyse.b_psy = avctx->flags2 & CODEC_FLAG2_PSY;
|
||||||
x4->params.analyse.f_psy_trellis = avctx->psy_trellis;
|
|
||||||
|
|
||||||
x4->params.analyse.i_me_range = avctx->me_range;
|
x4->params.analyse.i_me_range = avctx->me_range;
|
||||||
x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
|
x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
|
||||||
@ -315,6 +315,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
|
|||||||
x4->params.rc.f_aq_strength = avctx->aq_strength;
|
x4->params.rc.f_aq_strength = avctx->aq_strength;
|
||||||
if (avctx->psy_rd >= 0)
|
if (avctx->psy_rd >= 0)
|
||||||
x4->params.analyse.f_psy_rd = avctx->psy_rd;
|
x4->params.analyse.f_psy_rd = avctx->psy_rd;
|
||||||
|
if (avctx->psy_trellis >= 0)
|
||||||
|
x4->params.analyse.f_psy_trellis = avctx->psy_trellis;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (x4->aq_mode >= 0)
|
if (x4->aq_mode >= 0)
|
||||||
@ -323,6 +325,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
|
|||||||
x4->params.rc.f_aq_strength = x4->aq_strength;
|
x4->params.rc.f_aq_strength = x4->aq_strength;
|
||||||
if (x4->psy_rd >= 0)
|
if (x4->psy_rd >= 0)
|
||||||
x4->params.analyse.f_psy_rd = x4->psy_rd;
|
x4->params.analyse.f_psy_rd = x4->psy_rd;
|
||||||
|
if (x4->psy_trellis >= 0)
|
||||||
|
x4->params.analyse.f_psy_trellis = x4->psy_trellis;
|
||||||
|
|
||||||
|
|
||||||
if (x4->fastfirstpass)
|
if (x4->fastfirstpass)
|
||||||
@ -405,6 +409,7 @@ static const AVOption options[] = {
|
|||||||
{ "autovariance", "Auto-variance AQ (experimental)", 0, FF_OPT_TYPE_CONST, {X264_AQ_AUTOVARIANCE}, INT_MIN, INT_MAX, VE, "aq_mode" },
|
{ "autovariance", "Auto-variance AQ (experimental)", 0, FF_OPT_TYPE_CONST, {X264_AQ_AUTOVARIANCE}, INT_MIN, INT_MAX, VE, "aq_mode" },
|
||||||
{ "aq_strength", "AQ strength. Reduces blocking and blurring in flat and textured areas.", OFFSET(aq_strength), FF_OPT_TYPE_FLOAT, {-1}, -1, FLT_MAX, VE},
|
{ "aq_strength", "AQ strength. Reduces blocking and blurring in flat and textured areas.", OFFSET(aq_strength), FF_OPT_TYPE_FLOAT, {-1}, -1, FLT_MAX, VE},
|
||||||
{ "pdy_rd", "Psy RD strength.", OFFSET(psy_rd), FF_OPT_TYPE_FLOAT, {-1 }, -1, FLT_MAX, VE},
|
{ "pdy_rd", "Psy RD strength.", OFFSET(psy_rd), FF_OPT_TYPE_FLOAT, {-1 }, -1, FLT_MAX, VE},
|
||||||
|
{ "psy_trellis", "Psy trellis strength", OFFSET(psy_trellis), FF_OPT_TYPE_FLOAT, {-1 }, -1, FLT_MAX, VE},
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -439,9 +439,7 @@ static const AVOption options[]={
|
|||||||
{"psy", "use psycho visual optimization", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_PSY }, INT_MIN, INT_MAX, V|E, "flags2"},
|
{"psy", "use psycho visual optimization", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_PSY }, INT_MIN, INT_MAX, V|E, "flags2"},
|
||||||
#if FF_API_X264_GLOBAL_OPTS
|
#if FF_API_X264_GLOBAL_OPTS
|
||||||
{"psy_rd", "specify psycho visual strength", OFFSET(psy_rd), FF_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1, FLT_MAX, V|E},
|
{"psy_rd", "specify psycho visual strength", OFFSET(psy_rd), FF_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1, FLT_MAX, V|E},
|
||||||
#endif
|
{"psy_trellis", "specify psycho visual trellis", OFFSET(psy_trellis), FF_OPT_TYPE_FLOAT, {.dbl = -1 }, -1, FLT_MAX, V|E},
|
||||||
{"psy_trellis", "specify psycho visual trellis", OFFSET(psy_trellis), FF_OPT_TYPE_FLOAT, {.dbl = 0 }, 0, FLT_MAX, V|E},
|
|
||||||
#if FF_API_X264_GLOBAL_OPTS
|
|
||||||
{"aq_mode", "specify aq method", OFFSET(aq_mode), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, INT_MAX, V|E},
|
{"aq_mode", "specify aq method", OFFSET(aq_mode), FF_OPT_TYPE_INT, {.dbl = -1 }, -1, INT_MAX, V|E},
|
||||||
{"aq_strength", "specify aq strength", OFFSET(aq_strength), FF_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1, FLT_MAX, V|E},
|
{"aq_strength", "specify aq strength", OFFSET(aq_strength), FF_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1, FLT_MAX, V|E},
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user