From: Loren Merritt Date: Mon, 5 Dec 2005 12:46:46 +0000 (+0000) Subject: --no-fast-pskip X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=38fcbfbeb53d402f9431f18709aee37987dcf318;p=x264.git --no-fast-pskip patch by Alex Wright. git-svn-id: svn://svn.videolan.org/x264/trunk@384 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/common/common.c b/common/common.c index 423d63c3..73878ebe 100644 --- a/common/common.c +++ b/common/common.c @@ -121,6 +121,7 @@ void x264_param_default( x264_param_t *param ) param->analyse.b_chroma_me = 1; param->analyse.i_mv_range = -1; // set from level_idc param->analyse.i_chroma_qp_offset = 0; + param->analyse.b_fast_pskip = 1; param->analyse.b_psnr = 1; param->i_cqm_preset = X264_CQM_FLAT; diff --git a/encoder/analyse.c b/encoder/analyse.c index c28c0576..334220dc 100644 --- a/encoder/analyse.c +++ b/encoder/analyse.c @@ -1766,7 +1766,7 @@ void x264_macroblock_analyse( x264_t *h ) int i_intra_cost, i_intra_type; /* Fast P_SKIP detection */ - if( !h->mb.b_lossless && + if( h->param.analyse.b_fast_pskip && (( h->mb.i_mb_type_left == P_SKIP ) || ( h->mb.i_mb_type_top == P_SKIP ) || ( h->mb.i_mb_type_topleft == P_SKIP ) || diff --git a/encoder/encoder.c b/encoder/encoder.c index 50148104..68af6465 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -367,6 +367,7 @@ static int x264_validate_parameters( x264_t *h ) h->param.analyse.b_psnr = 0; h->param.analyse.i_chroma_qp_offset = 0; h->param.analyse.i_trellis = 0; + h->param.analyse.b_fast_pskip = 0; } if( ( h->param.i_width % 16 || h->param.i_height % 16 ) && !h->mb.b_lossless ) diff --git a/x264.c b/x264.c index 61f24b86..6e72a931 100644 --- a/x264.c +++ b/x264.c @@ -261,6 +261,7 @@ static void Help( x264_param_t *defaults ) " - 0: disabled\n" " - 1: enabled only on the final encode of a MB\n" " - 2: enabled on all mode decisions\n" + " --no-fast-pskip Disables early SKIP detection on P-frames\n" "\n" " --cqm Preset quant matrices [\"flat\"]\n" " - jvt, flat\n" @@ -478,6 +479,7 @@ static int Parse( int argc, char **argv, #define OPT_MIXED_REFS 314 #define OPT_CRF 315 #define OPT_B_RDO 316 +#define OPT_NO_FAST_PSKIP 317 static struct option long_options[] = { @@ -516,6 +518,7 @@ static int Parse( int argc, char **argv, { "no-chroma-me", no_argument, NULL, OPT_NO_CHROMA_ME }, { "8x8dct", no_argument, NULL, '8' }, { "trellis", required_argument, NULL, 't' }, + { "no-fast-pskip", no_argument, NULL, OPT_NO_FAST_PSKIP }, { "level", required_argument, NULL, OPT_LEVEL }, { "ratetol", required_argument, NULL, OPT_RATETOL }, { "vbv-maxrate", required_argument, NULL, OPT_VBVMAXRATE }, @@ -748,6 +751,9 @@ static int Parse( int argc, char **argv, case 't': param->analyse.i_trellis = atoi(optarg); break; + case OPT_NO_FAST_PSKIP: + param->analyse.b_fast_pskip = 0; + break; case OPT_LEVEL: if( atof(optarg) < 6 ) param->i_level_idc = (int)(10*atof(optarg)+.5); diff --git a/x264.h b/x264.h index a33e75a9..1de65f7f 100644 --- a/x264.h +++ b/x264.h @@ -35,7 +35,7 @@ #include -#define X264_BUILD 41 +#define X264_BUILD 42 /* x264_t: * opaque handler for decoder and encoder */ @@ -200,6 +200,7 @@ typedef struct int b_bframe_rdo; /* RD based mode decision for B-frames */ int b_mixed_references; /* allow each mb partition in P-frames to have it's own reference number */ int i_trellis; /* trellis RD quantization */ + int b_fast_pskip; /* early SKIP detection on P-frames */ int b_psnr; /* Do we compute PSNR stats (save a few % of cpu) */ } analyse;