From: Jason Garrett-Glaser Date: Tue, 26 Jul 2011 14:40:23 +0000 (-0700) Subject: Fix a bug in lossless sub-8x8 RD X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=c28471e2500a6071aab8f9c3adac104f201e5f2a;p=x264.git Fix a bug in lossless sub-8x8 RD Caused crashes in rare cases with lossless encoding. Regression in 4:4:4. --- diff --git a/encoder/macroblock.c b/encoder/macroblock.c index 85521dfa..7b772c4e 100644 --- a/encoder/macroblock.c +++ b/encoder/macroblock.c @@ -1135,8 +1135,8 @@ static ALWAYS_INLINE void x264_macroblock_encode_p8x8_internal( x264_t *h, int i dctcoef dc; pixel *p_fenc = h->mb.pic.p_fenc[1+ch] + 4*x + 4*y*FENC_STRIDE; pixel *p_fdec = h->mb.pic.p_fdec[1+ch] + 4*x + 4*y*FDEC_STRIDE; - nz = h->zigzagf.sub_4x4ac( h->dct.luma4x4[16+i8+ch*4], p_fenc, p_fdec, &dc ); - h->mb.cache.non_zero_count[x264_scan8[16+i8+ch*4]] = nz; + nz = h->zigzagf.sub_4x4ac( h->dct.luma4x4[16+i8+ch*16], p_fenc, p_fdec, &dc ); + h->mb.cache.non_zero_count[x264_scan8[16+i8+ch*16]] = nz; } h->mb.i_cbp_chroma = 0x02; }