From: Jason Garrett-Glaser Date: Fri, 26 Feb 2010 13:04:48 +0000 (-0800) Subject: Fix regression in r1453 X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=11446152ba7c79774d65f8556f2282ad838942d7;p=x264.git Fix regression in r1453 r1453 broke psy-trellis with --trellis 2 --- diff --git a/encoder/analyse.c b/encoder/analyse.c index 02fbf7c2..98f33617 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 )