1. An apparatus for sample adaptive offset (SAO) filtering in video encoding comprising: a unified processing engine including: a statistics collection unit receiving blocks of original pixels and corresponding blocks of encoded/decoded pixels, said statistics collection unit including a subtracter forming a difference between a video attribute of each original pixel and the corresponding encoded/decoded pixel, a plurality of band offset classifiers determining whether a pixel has a corresponding band offset, a band offset error accumulator accumulating said difference for each pixel having a determined band offset and determining a number of pixels in a block having each band offset classification, a plurality of edge offset classifiers determining an edge offset type for each pixel, and an edge offset error accumulator accumulating said difference for each pixel having a determined edge offset and determining a number of pixels in a block having each edge offset classification; a RD offset unit connected to said statistics collection unit receiving said difference for each pixel having a determined band offset, said number of pixels in a block having each band offset classification from said band offset error accumulator, said difference for each pixel having a determined edge offset and said number of pixels in a block having each edge offset classification from said edge offset error accumulator, said RD offset unit generating a minimum RD cost (J) for each category of band offsets and edge offsets for all possible ranges of offsets within each category as follows: 
 J =( NO 2 −2 OE )+λ R where: J is the RD cost; N is the number of pixels; O is the corresponding offset value for that category; and E is difference between the original pixel and the corresponding encoded/decoded pixel; R is the bit rate after deblocking; and λ is a scaling constant; a RDO for SAO type unit connected to said statistics collection unit receiving said difference for each pixel having a determined band offset, said number of pixels in a block having each band offset classification from said band offset error accumulator, said difference for each pixel having a determined edge offset and said number of pixels in a block having each edge offset classification from said edge offset error accumulator and to said RD offset unit receiving said minimum RD cost (J) for each category of band offsets and edge offsets, said RDO for SAO type unit generating an RD cost to find the optimal SAO type as follows: 
 J t =J SAO −J 0 =D t +λR t where: J t is the RD cost to find the optimal SAO type; D t is the distortion reduction by SAO; and R t is the bitrate to code the SAO parameter; and a merge mode cost unit connected to said statistics collection unit receiving said difference for each pixel having a determined band offset, said number of pixels in a block having each band offset classification from said band offset error accumulator, said difference for each pixel having a determined edge offset and said number of pixels in a block having each edge offset classification from said edge offset error accumulator and receiving left SAO parameters and up SAO parameters, said merge mode cost unit determining a cost for each of the left SAO parameters and the up SAO parameters; said unified processing engine operating once for a luminance video attribute and once for each of two chrominance video attributes; and a SAO merge decision unit connected to said unified processing engine receiving said RD cost to find the optimal SAO type for each video attribute from said RDO for SAO type unit and said cost for each of the left SAO parameters and the up SAO parameters from said merge mode cost unit for each video attribute, said SAO merge decision unit determining an optimal mode and generating current LCU Parameters corresponding to said optimal mode.