 X set equal to 0 ..part WidthC - 1, and y set equal to 0..partHeightC - 1. The prediction sample values are derived as follows: If predFlagL0 is equal to 1 and predFlagL1 is equal to 0, predPartc[ X, y ] = predPartLOc[ y (8-271) Otherwise, if predFlagL0 is equal to 0 and predFlagLI 1 is equal to 1, predPartc[x,y]=predPartL1c[x, y ] (8-272) Otherwise (predFlagL and predFlagL1 are equal to 1), predPartc[ X, y ] = ( predPartL0c[ X, y ] + predPartL1c[ +1) >> 1. (8-273) 8.4.2.3.2 Weighted sample prediction process Inputs to this process are the same as specified in clause 8.4.2.3. Outputs of this process are the same as specified in clause 8.4.2.3. Depending on the available component for which the prediction block is derived, the following applies: If the luma sample prediction values predPartL X, y ] are derived, the following applies with C set equal to L, X set equal to 0. partWidth - 1, y set equal to )..partHeight - 1, and Clip1( being substituted with Cliply(). Otherwise, if the chroma Cb component sample prediction values predPartcol x, y ] are derived, the following applies with C set equal to Cb, X set equal to 0..partWidthC - 1, y set equal to 0..partHeightC - 1, and Clip1 () being substituted with Clip1c(). Otherwise (the chroma Cr component sample prediction values predPartcr[ X, y ] are derived), the following applies with C set equal to Cr, X set equal to ..partWidthC - 1, y set equal to 0..partHeightC - 1, and Clip1() being substituted with Clip1c(). The prediction sample values are derived as follows: If the predFlagL0 is equal to 1 and predFlagL1 is equal to 0, the final predicted sample values predPartc[ X, y ] are derived by if( logWDc >= (8-274) predPartc[ X, y = Clip1 predPartLOc[ X, y ] * Woc + 00c ) Otherwise, if the predFlagL0 is equal to 0 and predFlagL1 is equal to 1, the final predicted sample values predPartc[ X, y ] are derived by if( logWDc predPartc[ = (8-275) predPartc[ X, y ] = Clip1 predPartL1c[ X, y *W1c+01c) Otherwise (both predFlagL0 and predFlagL1 are equal to 1), the final pred