From: Fiona Glaser Date: Fri, 26 Feb 2010 13:04:48 +0000 (-0800) Subject: Fix regression in r1453 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ed734467e63bc9f528eabbfd8d58c7d7adec509;p=libx264 Fix regression in r1453 r1453 broke psy-trellis with --trellis 2 --- diff --git a/encoder/analyse.c b/encoder/analyse.c index 4b12b22d..9a276979 100644 --- a/encoder/analyse.c +++ b/encoder/analyse.c @@ -581,6 +581,10 @@ static void inline x264_psy_trellis_init( x264_t *h, int do_both_dct ) /* Reset fenc satd scores cache for psy RD */ static inline void x264_mb_init_fenc_cache( x264_t *h, int b_satd ) { + if( h->param.analyse.i_trellis == 2 && h->mb.i_psy_trellis ) + x264_psy_trellis_init( h, h->param.analyse.b_transform_8x8 ); + if( !h->mb.i_psy_rd ) + return; /* Writes beyond the end of the array, but not a problem since fenc_satd_cache is right after. */ h->mc.memzero_aligned( h->mb.pic.fenc_hadamard_cache, sizeof(h->mb.pic.fenc_hadamard_cache) ); if( b_satd )