Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.32 KB | None | 0 0
  1. diff --git a/encoder/analyse.c b/encoder/analyse.c
  2. index 0dd7235..f27169c 100644
  3. --- a/encoder/analyse.c
  4. +++ b/encoder/analyse.c
  5. @@ -1033,7 +1033,7 @@ static void x264_mb_analyse_intra( x264_t *h, x264_mb_analysis_t *a, int i_satd_
  6.  
  7.  static void x264_intra_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_thresh )
  8.  {
  9. -    if( a->i_satd_i16x16 <= i_satd_thresh )
  10. +    if( a->i_satd_i16x16 < i_satd_thresh )
  11.      {
  12.          h->mb.i_type = I_16x16;
  13.          x264_analyse_update_cache( h, a );
  14. @@ -1042,7 +1042,7 @@ static void x264_intra_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_thresh )
  15.      else
  16.          a->i_satd_i16x16 = COST_MAX;
  17.  
  18. -    if( a->i_satd_i4x4 <= i_satd_thresh && a->i_satd_i4x4 < COST_MAX )
  19. +    if( a->i_satd_i4x4 < i_satd_thresh )
  20.      {
  21.          h->mb.i_type = I_4x4;
  22.          x264_analyse_update_cache( h, a );
  23. @@ -1051,7 +1051,7 @@ static void x264_intra_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_thresh )
  24.      else
  25.          a->i_satd_i4x4 = COST_MAX;
  26.  
  27. -    if( a->i_satd_i8x8 <= i_satd_thresh && a->i_satd_i8x8 < COST_MAX )
  28. +    if( a->i_satd_i8x8 < i_satd_thresh && a->i_satd_i8x8 < COST_MAX )
  29.      {
  30.          h->mb.i_type = I_8x8;
  31.          x264_analyse_update_cache( h, a );
  32. @@ -2576,7 +2576,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd )
  33.          a->l0.i_rd16x16 = x264_rd_cost_mb( h, a->i_lambda2 );
  34.      }
  35.  
  36. -    if( a->l0.i_cost16x8 <= thresh )
  37. +    if( a->l0.i_cost16x8 < thresh )
  38.      {
  39.          h->mb.i_partition = D_16x8;
  40.          x264_analyse_update_cache( h, a );
  41. @@ -2585,7 +2585,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd )
  42.      else
  43.          a->l0.i_cost16x8 = COST_MAX;
  44.  
  45. -    if( a->l0.i_cost8x16 <= thresh )
  46. +    if( a->l0.i_cost8x16 < thresh )
  47.      {
  48.          h->mb.i_partition = D_8x16;
  49.          x264_analyse_update_cache( h, a );
  50. @@ -2594,7 +2594,7 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd )
  51.      else
  52.          a->l0.i_cost8x16 = COST_MAX;
  53.  
  54. -    if( a->l0.i_cost8x8 <= thresh )
  55. +    if( a->l0.i_cost8x8 < thresh )
  56.      {
  57.          h->mb.i_type = P_8x8;
  58.          h->mb.i_partition = D_8x8;
  59. @@ -2655,7 +2655,7 @@ static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_i
  60.      //FIXME not all the update_cache calls are needed
  61.      h->mb.i_partition = D_16x16;
  62.      /* L0 */
  63. -    if( a->l0.me16x16.cost <= thresh && a->l0.i_rd16x16 == COST_MAX )
  64. +    if( a->l0.me16x16.cost < thresh && a->l0.i_rd16x16 == COST_MAX )
  65.      {
  66.          h->mb.i_type = B_L0_L0;
  67.          x264_analyse_update_cache( h, a );
  68. @@ -2663,7 +2663,7 @@ static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_i
  69.      }
  70.  
  71.      /* L1 */
  72. -    if( a->l1.me16x16.cost <= thresh && a->l1.i_rd16x16 == COST_MAX )
  73. +    if( a->l1.me16x16.cost < thresh && a->l1.i_rd16x16 == COST_MAX )
  74.      {
  75.          h->mb.i_type = B_L1_L1;
  76.          x264_analyse_update_cache( h, a );
  77. @@ -2671,7 +2671,7 @@ static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_i
  78.      }
  79.  
  80.      /* BI */
  81. -    if( a->i_cost16x16bi <= thresh && a->i_rd16x16bi == COST_MAX )
  82. +    if( a->i_cost16x16bi < thresh && a->i_rd16x16bi == COST_MAX )
  83.      {
  84.          h->mb.i_type = B_BI_BI;
  85.          x264_analyse_update_cache( h, a );
  86. @@ -2679,7 +2679,7 @@ static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_i
  87.      }
  88.  
  89.      /* 8x8 */
  90. -    if( a->i_cost8x8bi <= thresh && a->i_rd8x8bi == COST_MAX )
  91. +    if( a->i_cost8x8bi < thresh && a->i_rd8x8bi == COST_MAX )
  92.      {
  93.          h->mb.i_type = B_8x8;
  94.          h->mb.i_partition = D_8x8;
  95. @@ -2689,7 +2689,7 @@ static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_i
  96.      }
  97.  
  98.      /* 16x8 */
  99. -    if( a->i_cost16x8bi <= thresh && a->i_rd16x8bi == COST_MAX )
  100. +    if( a->i_cost16x8bi < thresh && a->i_rd16x8bi == COST_MAX )
  101.      {
  102.          h->mb.i_type = a->i_mb_type16x8;
  103.          h->mb.i_partition = D_16x8;
  104. @@ -2698,7 +2698,7 @@ static void x264_mb_analyse_b_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd_i
  105.      }
  106.  
  107.      /* 8x16 */
  108. -    if( a->i_cost8x16bi <= thresh && a->i_rd8x16bi == COST_MAX )
  109. +    if( a->i_cost8x16bi < thresh && a->i_rd8x16bi == COST_MAX )
  110.      {
  111.          h->mb.i_type = a->i_mb_type8x16;
  112.          h->mb.i_partition = D_8x16;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement