summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-08-22 07:55:34 +0200
committerAnton Khirnov <anton@khirnov.net>2011-08-31 10:25:54 +0200
commit3b82aeeec0a320a78d548ff0147b3cdb26ea982c (patch)
treee976a8f4c33a0e6146cf55a6040912c740cf3dbd /libavcodec/libx264.c
parent373257fa793b5ec2c22236a446d889018838e362 (diff)
libx264: add 'fast-pskip' private option.
Deprecate CODEC_FLAG2_FASTPSKIP.
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index d164dce28a..646a7a5915 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -55,6 +55,7 @@ typedef struct X264Context {
int b_pyramid;
int mixed_refs;
int dct8x8;
+ int fast_pskip;
} X264Context;
static void X264_log(void *p, int level, const char *fmt, va_list args)
@@ -247,7 +248,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA;
- x4->params.analyse.b_fast_pskip = avctx->flags2 & CODEC_FLAG2_FASTPSKIP;
x4->params.analyse.i_trellis = avctx->trellis;
x4->params.analyse.i_noise_reduction = avctx->noise_reduction;
@@ -328,6 +328,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.analyse.b_weighted_bipred = avctx->flags2 & CODEC_FLAG2_WPRED;
x4->params.analyse.b_mixed_references = avctx->flags2 & CODEC_FLAG2_MIXED_REFS;
x4->params.analyse.b_transform_8x8 = avctx->flags2 & CODEC_FLAG2_8X8DCT;
+ x4->params.analyse.b_fast_pskip = avctx->flags2 & CODEC_FLAG2_FASTPSKIP;
#endif
if (x4->aq_mode >= 0)
@@ -355,6 +356,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.analyse.b_mixed_references = x4->mixed_refs;
if (x4->dct8x8 >= 0)
x4->params.analyse.b_transform_8x8 = x4->dct8x8;
+ if (x4->fast_pskip >= 0)
+ x4->params.analyse.b_fast_pskip = x4->fast_pskip;
if (x4->fastfirstpass)
x264_param_apply_fastfirstpass(&x4->params);
@@ -450,6 +453,7 @@ static const AVOption options[] = {
{ "normal", "Non-strict (not Blu-ray compatible)", 0, FF_OPT_TYPE_CONST, {X264_B_PYRAMID_NORMAL}, INT_MIN, INT_MAX, VE, "b_pyramid" },
{ "mixed-refs", "One reference per partition, as opposed to one reference per macroblock", OFFSET(mixed_refs), FF_OPT_TYPE_INT, {-1}, -1, 1, VE },
{ "8x8dct", "High profile 8x8 transform.", OFFSET(dct8x8), FF_OPT_TYPE_INT, {-1 }, -1, 1, VE},
+ { "fast-pskip", NULL, OFFSET(fast_pskip), FF_OPT_TYPE_INT, {-1 }, -1, 1, VE},
{ NULL },
};