[x264-devel] commit: Fix lossless mode borked in r901 (BugMaster )

git version control git at videolan.org
Wed Jul 16 19:53:23 CEST 2008


x264 | branch: master | BugMaster <BugMaster at narod.ru> | Wed Jul 16 11:54:51 2008 -0600| [64848ffdfa740f03948d6860c1d49adc6c5b4f7c]

Fix lossless mode borked in r901

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

 common/macroblock.h  |    4 ++++
 encoder/macroblock.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/common/macroblock.h b/common/macroblock.h
index bc78a6e..874e737 100644
--- a/common/macroblock.h
+++ b/common/macroblock.h
@@ -224,6 +224,10 @@ static const uint8_t block_idx_xy_1d[16] =
 {
     0, 1, 4, 5, 2, 3, 6, 7, 8, 9, 12, 13, 10, 11, 14, 15
 };
+static const uint8_t block_idx_yx_1d[16] =
+{
+    0, 4, 1, 5, 8, 12, 9, 13, 2, 6, 3, 7, 10, 14, 11, 15
+};
 static const uint8_t block_idx_xy_fenc[16] =
 {
     0*4 + 0*4*FENC_STRIDE, 1*4 + 0*4*FENC_STRIDE,
diff --git a/encoder/macroblock.c b/encoder/macroblock.c
index 788a8ea..488d020 100644
--- a/encoder/macroblock.c
+++ b/encoder/macroblock.c
@@ -147,7 +147,7 @@ static void x264_mb_encode_i16x16( x264_t *h, int i_qscale )
             int oe = block_idx_xy_fenc[i];
             int od = block_idx_xy_fdec[i];
             h->zigzagf.sub_4x4( h->dct.luma4x4[i], p_src+oe, p_dst+od );
-            dct_dc4x4[0][block_idx_xy_1d[i]] = h->dct.luma4x4[i][0];
+            dct_dc4x4[0][block_idx_yx_1d[i]] = h->dct.luma4x4[i][0];
             h->dct.luma4x4[i][0] = 0;
         }
         h->zigzagf.scan_4x4( h->dct.luma16x16_dc, dct_dc4x4 );



More information about the x264-devel mailing list