[x264-devel] [PATCH] fix uninitialised vars in x264_intra_rd_refine() for I_8x8 case

Jason Garrett-Glaser darkshikari at gmail.com
Mon Jun 22 22:14:55 CEST 2009


On Mon, Jun 22, 2009 at 1:08 PM, Igor Mozolevsky<igor at hybrid-lab.co.uk> wrote:
>
>
> 2009/6/22 Jason Garrett-Glaser <darkshikari at gmail.com>
>>
>> On Mon, Jun 22, 2009 at 12:42 PM, Igor Mozolevsky<igor at hybrid-lab.co.uk>
>> wrote:
>> > 2009/6/22 Jason Garrett-Glaser <darkshikari at gmail.com>:
>> >> On Mon, Jun 22, 2009 at 12:33 PM, Igor
>> >> Mozolevsky<igor at hybrid-lab.co.uk> wrote:
>> >>> If i_satd <= i_best
>> >>
>> >> But i_satd can't be less than i_best, since i_best is initialized to
>> >> COST_MAX64, which is a dozen orders of magnitude larger than the
>> >> largest possible FIX8 i8x8 RD cost.
>> >
>> > Can it be equal? If not, is there a need for `if( i_best > i_satd )'
>> > tests then?
>>
>> No, it can't be equal either, but it isn't as if >= is faster than >.
>
> So are you saying that i_best > i_satd will always be true? Why have the
> `if' in the first place then?

No, it will always be true at least one time during the loop.

> Also, i_nnz is initialised to zero for I_4x4 in the existing codebase.

To shut up a GCC warning.

Dark Shikari


More information about the x264-devel mailing list