Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: common/common.c
- ===================================================================
- --- common/common_orig.c
- +++ common/common.c
- @@ -894,6 +894,8 @@
- p->rc.i_aq_mode = atoi(value);
- OPT("aq-strength")
- p->rc.f_aq_strength = atof(value);
- + OPT("fade-compensate")
- + p->rc.f_fade_compensate = atof(value);
- OPT("pass")
- {
- int pass = x264_clip3( atoi(value), 0, 3 );
- @@ -1204,7 +1206,10 @@
- s += sprintf( s, " subme=%d", p->analyse.i_subpel_refine );
- s += sprintf( s, " psy=%d", p->analyse.b_psy );
- if( p->analyse.b_psy )
- + {
- + s += sprintf( s, " fade_compensate=%.2f", p->rc.f_fade_compensate );
- s += sprintf( s, " psy_rd=%.2f:%.2f", p->analyse.f_psy_rd, p->analyse.f_psy_trellis );
- + }
- s += sprintf( s, " mixed_ref=%d", p->analyse.b_mixed_references );
- s += sprintf( s, " me_range=%d", p->analyse.i_me_range );
- s += sprintf( s, " chroma_me=%d", p->analyse.b_chroma_me );
- Index: encoder/encoder.c
- ===================================================================
- --- encoder/encoder_orig.c
- +++ encoder/encoder.c
- @@ -654,10 +654,17 @@
- if( !h->param.b_cabac )
- h->param.analyse.i_trellis = 0;
- h->param.analyse.i_trellis = x264_clip3( h->param.analyse.i_trellis, 0, 2 );
- + if( h->param.analyse.i_weighted_pred == X264_WEIGHTP_NONE )
- + h->param.rc.f_fade_compensate += 0.1;
- + if( h->param.analyse.i_weighted_pred == X264_WEIGHTP_BLIND )
- + h->param.rc.f_fade_compensate = 0;
- + if( !h->param.rc.b_mb_tree )
- + h->param.rc.f_fade_compensate = 0;
- if( !h->param.analyse.b_psy )
- {
- h->param.analyse.f_psy_rd = 0;
- h->param.analyse.f_psy_trellis = 0;
- + h->param.rc.f_fade_compensate = 0;
- }
- if( !h->param.analyse.i_trellis )
- h->param.analyse.f_psy_trellis = 0;
- Index: encoder/slicetype.c
- ===================================================================
- --- encoder/slicetype_orig.c
- +++ encoder/slicetype.c
- @@ -224,7 +224,7 @@
- else
- SET_WEIGHT( weights[0], 1, minscale, mindenom, minoff );
- - if( h->param.analyse.i_weighted_pred == X264_WEIGHTP_FAKE && weights[0].weightfn )
- + if( weights[0].weightfn )
- fenc->f_weighted_cost_delta[i_delta_index] = (float)minscore / origscore;
- if( weights[0].weightfn && b_lookahead )
- @@ -635,7 +635,7 @@
- x264_emms();
- float weightdelta = 0.0;
- if( ref0_distance && frame->f_weighted_cost_delta[ref0_distance-1] > 0 )
- - weightdelta = (1.0 - frame->f_weighted_cost_delta[ref0_distance-1]);
- + weightdelta = (1.0 - frame->f_weighted_cost_delta[ref0_distance-1]) * 10.0f * h->param.rc.f_fade_compensate;
- /* Allow the strength to be adjusted via qcompress, since the two
- * concepts are very similar. */
- Index: x264.c
- ===================================================================
- --- x264_orig.c
- +++ x264.c
- @@ -425,6 +425,8 @@
- " - 2: Auto-variance AQ (experimental)\n", defaults->rc.i_aq_mode );
- H1( " --aq-strength <float> Reduces blocking and blurring in flat and\n"
- " textured areas. [%.1f]\n", defaults->rc.f_aq_strength );
- + H1( " --fade-compensate <float> Allocate more bits to fades [%.1f]\n", defaults->rc.f_fade_compensate );
- + H2( " Approximate sane range: 0.0 - 1.0\n" );
- H1( "\n" );
- H0( " -p, --pass <integer> Enable multipass ratecontrol\n"
- " - 1: First pass, creates stats file\n"
- @@ -690,6 +692,7 @@
- { "no-dct-decimate", no_argument, NULL, 0 },
- { "aq-strength", required_argument, NULL, 0 },
- { "aq-mode", required_argument, NULL, 0 },
- + { "fade-compensate", required_argument, NULL, 0 },
- { "deadzone-inter", required_argument, NULL, '0' },
- { "deadzone-intra", required_argument, NULL, '0' },
- { "level", required_argument, NULL, 0 },
- Index: x264.h
- ===================================================================
- --- x264_orig.h
- +++ x264.h
- @@ -306,6 +306,7 @@
- int i_aq_mode; /* psy adaptive QP. (X264_AQ_*) */
- float f_aq_strength;
- + float f_fade_compensate; /* Give more bits to fades. */
- int b_mb_tree; /* Macroblock-tree ratecontrol. */
- int i_lookahead;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement