<(B)?1:0)+((ag<B)?1:0) (8-465) Otherwise (chromaStyleFilteringFlag is equal to 1), tc=tco+1 (8-466) Let Clip1() be a function that is replaced by Cliply( ) when chromaEdgeFlag is equal to 0 and by Clip1c() when chromaEdgeFlag is equal to 1. The filtered result samples P'o and q'o are derived by: = Clip3( tc,tc,((((qo-po)<<2)+(p1-q1)+4)>>3) (8-467) (8-468) q'o = Clip1(qo - A ) (8-469) The filtered result sample p'1 is derived as follows: If chromaStyleFilteringFlag is equal to 0 and ap is less than B, (8-470) Otherwise (chromaStyleFilteringFlag is equal to 1 or ap is greater than or equal to (3), (8-471) The filtered result sample q'1 is derived as follows: If chromaStyleFilteringFlag is equal to 0 and aq is less than B, (8-472) Otherwise (chromaStyleFilteringFlag is equal to 1 or aq is greater than or equal to (3), q'1 = q1 (8-473) The filtered result samples P'2 and q'2 are always set equal to the input samples P2 and q2: P'2 =p2 (8-474) q'2=q2 (8-475) 8.7.2.4 Filtering process for edges for bS equal to 4 Inputs to this process are the input sample values pi and qi (i = 0..3) of a single set of samples across an edge that is to be filtered, chromaEdgeFlag, chromaStyleFilteringFlag, and the values of the threshold variables a and for the set of samples, as specified in clause 8.7.2. Outputs of this process are the filtered result sample values p' and q' (i = 0..2) for the set of input sample values. Let ap and aq be two threshold variables as specified in Equations 8-463 and 8-464, respectively, in clause 8.7.2.3. The filtered result samples p'i (i = 0..2) are derived as follows: If chromaStyleFilteringFlag is equal to 0 and the following condition holds, && Abs(po-qo)<((a>>2)+2) (8-476) then the variables P'o, P'1, and p'2 are derived by: (8-477) Rec. ITU-T H.264 (01/2012) P'1(p2+p1+po+q02)>>2 (8-478) (8-479) Otherwise (chromaStyleFilteringFlag is equal to 1 or the condition in Equation 8-476 does not hold), the variables P'o, P'1, and P'2 are derived by: p'o=(2*p1+po+q1+2)>>2 (8-480) p' ==pi (8-481) P'2=p2 (8-4