[x264-devel] Don't force fast-intra for subme < 3

Anton Mitrofanov git at videolan.org
Mon Dec 25 20:39:54 CET 2017


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Fri Sep 22 17:28:18 2017 +0300| [e3fae10bf7db9571d5c69ad910f10df625bad73e] | committer: Anton Mitrofanov

Don't force fast-intra for subme < 3

It have caused significant quality hit without any meaningful (if any) speed up.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=e3fae10bf7db9571d5c69ad910f10df625bad73e
---

 encoder/analyse.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/encoder/analyse.c b/encoder/analyse.c
index a289b242..ecd6dae1 100644
--- a/encoder/analyse.c
+++ b/encoder/analyse.c
@@ -443,14 +443,12 @@ static void mb_analyse_init( x264_t *h, x264_mb_analysis_t *a, int qp )
         /* Fast intra decision */
         if( a->b_early_terminate && h->mb.i_mb_xy - h->sh.i_first_mb > 4 )
         {
-            /* Always run in fast-intra mode for subme < 3 */
-            if( h->mb.i_subpel_refine > 2 &&
-              ( IS_INTRA( h->mb.i_mb_type_left[0] ) ||
+            if( IS_INTRA( h->mb.i_mb_type_left[0] ) ||
                 IS_INTRA( h->mb.i_mb_type_top ) ||
                 IS_INTRA( h->mb.i_mb_type_topleft ) ||
                 IS_INTRA( h->mb.i_mb_type_topright ) ||
                 (h->sh.i_type == SLICE_TYPE_P && IS_INTRA( h->fref[0][0]->mb_type[h->mb.i_mb_xy] )) ||
-                (h->mb.i_mb_xy - h->sh.i_first_mb < 3*(h->stat.frame.i_mb_count[I_4x4] + h->stat.frame.i_mb_count[I_8x8] + h->stat.frame.i_mb_count[I_16x16])) ) )
+                (h->mb.i_mb_xy - h->sh.i_first_mb < 3*(h->stat.frame.i_mb_count[I_4x4] + h->stat.frame.i_mb_count[I_8x8] + h->stat.frame.i_mb_count[I_16x16])) )
             { /* intra is likely */ }
             else
             {



More information about the x264-devel mailing list