From 11446152ba7c79774d65f8556f2282ad838942d7 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Fri, 26 Feb 2010 05:04:48 -0800 Subject: [PATCH] Fix regression in r1453 r1453 broke psy-trellis with --trellis 2 --- encoder/analyse.c | 4 ++++ 1 file changed, 4 insertions(+) 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 ) -- 2.47.3