Advertisement
Guest User

Untitled

a guest
May 24th, 2010
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.40 KB | None | 0 0
  1. Index: common/common.c
  2. ===================================================================
  3. --- common/common_orig.c
  4. +++ common/common.c
  5. @@ -894,6 +894,8 @@
  6. p->rc.i_aq_mode = atoi(value);
  7. OPT("aq-strength")
  8. p->rc.f_aq_strength = atof(value);
  9. + OPT("fade-compensate")
  10. + p->rc.f_fade_compensate = atof(value);
  11. OPT("pass")
  12. {
  13. int pass = x264_clip3( atoi(value), 0, 3 );
  14. @@ -1204,7 +1206,10 @@
  15. s += sprintf( s, " subme=%d", p->analyse.i_subpel_refine );
  16. s += sprintf( s, " psy=%d", p->analyse.b_psy );
  17. if( p->analyse.b_psy )
  18. + {
  19. + s += sprintf( s, " fade_compensate=%.2f", p->rc.f_fade_compensate );
  20. s += sprintf( s, " psy_rd=%.2f:%.2f", p->analyse.f_psy_rd, p->analyse.f_psy_trellis );
  21. + }
  22. s += sprintf( s, " mixed_ref=%d", p->analyse.b_mixed_references );
  23. s += sprintf( s, " me_range=%d", p->analyse.i_me_range );
  24. s += sprintf( s, " chroma_me=%d", p->analyse.b_chroma_me );
  25. Index: encoder/encoder.c
  26. ===================================================================
  27. --- encoder/encoder_orig.c
  28. +++ encoder/encoder.c
  29. @@ -654,10 +654,17 @@
  30. if( !h->param.b_cabac )
  31. h->param.analyse.i_trellis = 0;
  32. h->param.analyse.i_trellis = x264_clip3( h->param.analyse.i_trellis, 0, 2 );
  33. + if( h->param.analyse.i_weighted_pred == X264_WEIGHTP_NONE )
  34. + h->param.rc.f_fade_compensate += 0.1;
  35. + if( h->param.analyse.i_weighted_pred == X264_WEIGHTP_BLIND )
  36. + h->param.rc.f_fade_compensate = 0;
  37. + if( !h->param.rc.b_mb_tree )
  38. + h->param.rc.f_fade_compensate = 0;
  39. if( !h->param.analyse.b_psy )
  40. {
  41. h->param.analyse.f_psy_rd = 0;
  42. h->param.analyse.f_psy_trellis = 0;
  43. + h->param.rc.f_fade_compensate = 0;
  44. }
  45. if( !h->param.analyse.i_trellis )
  46. h->param.analyse.f_psy_trellis = 0;
  47. Index: encoder/slicetype.c
  48. ===================================================================
  49. --- encoder/slicetype_orig.c
  50. +++ encoder/slicetype.c
  51. @@ -224,7 +224,7 @@
  52. else
  53. SET_WEIGHT( weights[0], 1, minscale, mindenom, minoff );
  54.  
  55. - if( h->param.analyse.i_weighted_pred == X264_WEIGHTP_FAKE && weights[0].weightfn )
  56. + if( weights[0].weightfn )
  57. fenc->f_weighted_cost_delta[i_delta_index] = (float)minscore / origscore;
  58.  
  59. if( weights[0].weightfn && b_lookahead )
  60. @@ -635,7 +635,7 @@
  61. x264_emms();
  62. float weightdelta = 0.0;
  63. if( ref0_distance && frame->f_weighted_cost_delta[ref0_distance-1] > 0 )
  64. - weightdelta = (1.0 - frame->f_weighted_cost_delta[ref0_distance-1]);
  65. + weightdelta = (1.0 - frame->f_weighted_cost_delta[ref0_distance-1]) * 10.0f * h->param.rc.f_fade_compensate;
  66.  
  67. /* Allow the strength to be adjusted via qcompress, since the two
  68. * concepts are very similar. */
  69. Index: x264.c
  70. ===================================================================
  71. --- x264_orig.c
  72. +++ x264.c
  73. @@ -425,6 +425,8 @@
  74. " - 2: Auto-variance AQ (experimental)\n", defaults->rc.i_aq_mode );
  75. H1( " --aq-strength <float> Reduces blocking and blurring in flat and\n"
  76. " textured areas. [%.1f]\n", defaults->rc.f_aq_strength );
  77. + H1( " --fade-compensate <float> Allocate more bits to fades [%.1f]\n", defaults->rc.f_fade_compensate );
  78. + H2( " Approximate sane range: 0.0 - 1.0\n" );
  79. H1( "\n" );
  80. H0( " -p, --pass <integer> Enable multipass ratecontrol\n"
  81. " - 1: First pass, creates stats file\n"
  82. @@ -690,6 +692,7 @@
  83. { "no-dct-decimate", no_argument, NULL, 0 },
  84. { "aq-strength", required_argument, NULL, 0 },
  85. { "aq-mode", required_argument, NULL, 0 },
  86. + { "fade-compensate", required_argument, NULL, 0 },
  87. { "deadzone-inter", required_argument, NULL, '0' },
  88. { "deadzone-intra", required_argument, NULL, '0' },
  89. { "level", required_argument, NULL, 0 },
  90. Index: x264.h
  91. ===================================================================
  92. --- x264_orig.h
  93. +++ x264.h
  94. @@ -306,6 +306,7 @@
  95.  
  96. int i_aq_mode; /* psy adaptive QP. (X264_AQ_*) */
  97. float f_aq_strength;
  98. + float f_fade_compensate; /* Give more bits to fades. */
  99. int b_mb_tree; /* Macroblock-tree ratecontrol. */
  100. int i_lookahead;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement