[x264-devel] Fix chroma intra analysis in 4:4:4 lossless mode

Anton Mitrofanov git at videolan.org
Sat Oct 22 02:30:22 CEST 2011


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Sun Oct  9 19:14:16 2011 +0400| [1fe87df5857266f0099a473962e7f32a89d9b701] | committer: Jason Garrett-Glaser

Fix chroma intra analysis in 4:4:4 lossless mode

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

 encoder/analyse.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/encoder/analyse.c b/encoder/analyse.c
index 98a77c3..a514b57 100644
--- a/encoder/analyse.c
+++ b/encoder/analyse.c
@@ -702,8 +702,16 @@ static void x264_mb_analyse_intra_chroma( x264_t *h, x264_mb_analysis_t *a )
         }
 
         /* Cheap approximation of chroma costs to avoid a full i4x4/i8x8 analysis. */
-        h->predict_16x16[a->i_predict16x16]( h->mb.pic.p_fdec[1] );
-        h->predict_16x16[a->i_predict16x16]( h->mb.pic.p_fdec[2] );
+        if( h->mb.b_lossless )
+        {
+            x264_predict_lossless_16x16( h, 1, a->i_predict16x16 );
+            x264_predict_lossless_16x16( h, 2, a->i_predict16x16 );
+        }
+        else
+        {
+            h->predict_16x16[a->i_predict16x16]( h->mb.pic.p_fdec[1] );
+            h->predict_16x16[a->i_predict16x16]( h->mb.pic.p_fdec[2] );
+        }
         a->i_satd_chroma = h->pixf.mbcmp[PIXEL_16x16]( h->mb.pic.p_fdec[1], FDEC_STRIDE, h->mb.pic.p_fenc[1], FENC_STRIDE )
                          + h->pixf.mbcmp[PIXEL_16x16]( h->mb.pic.p_fdec[2], FDEC_STRIDE, h->mb.pic.p_fenc[2], FENC_STRIDE );
         return;



More information about the x264-devel mailing list