[x264-devel] fix rd related functions

Gabriel Bouvigne gabriel.bouvigne at joost.com
Wed May 7 12:57:42 CEST 2008


Noboru Asai a écrit :

> (3) patch-fix-x264_intra_rd_refine-nnz
> 
> Callgraph of x264_intra_rd_refine function is:
> 
> x264_intra_rd_refine
>   -> x264_rd_cost_i8x8 (or x264_rd_cost_i4x4)
>      -> x264_partition_i8x8_size_cabac (or x264_partition_i4x4_size_cabac)
>         -> block_residual_write_cabac
>            -> x264_cabac_mb_cbf_ctxidxinc
> 
> Similarly (2), h->mb.cache.non_zero_count of left or top partition
> are not updated when partition is i8x8 or i4x4.
> (Updating non_zero_count may not be needed when partition is i8x8.)

I tryed this one, and on my testcases it had nearly no impact. The 
biggest difference I had was:
SSIM Mean Y:0.8702754 PSNR Avg:30.903 Global:29.701
which became:
SSIM Mean Y:0.8704693 PSNR Avg:30.906 Global:29.715
(with a 0.01% bitrate reduction)

note - due to changes with the trunk, your line:
+ i_nnz = array_non_zero_count( h->dct.block[idx].residual_ac, 15 );
should now be
+ i_nnz = array_non_zero_count( h->dct.luma4x4[idx], 15 );

--
Gabriel




More information about the x264-devel mailing list