Commit 38fcbfbe authored by Loren Merritt's avatar Loren Merritt

--no-fast-pskip

patch by Alex Wright.



git-svn-id: svn://svn.videolan.org/x264/trunk@384 df754926-b1dd-0310-bc7b-ec298dee348c
parent 5ce628fa
......@@ -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;
......
......@@ -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 ) ||
......
......@@ -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 )
......
......@@ -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 <string> 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);
......
......@@ -35,7 +35,7 @@
#include <stdarg.h>
#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;
......
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