1. A method for processing image data comprising pixels having a luma component value, a first chroma component value and a second chroma component value, comprising: determining min and max chroma limit values based on the luma component values of input image data according to relationships among the luma and chroma components; transforming the first chroma component values by performing a processing operation in a first direction to produce first resultant values of the first chroma component; clipping the first resultant values of the first chroma component that are beyond the min and max chroma limit values to produce second resultant values of the first chroma component; transforming the second resultant values of the first chroma component by performing the processing operation in a second direction to produce third resultant values of the first chroma component; clipping the third resultant values of the first chroma component that are beyond the min and max chroma limit values to produce fourth resultant values of the first chroma component; determining min and max second chroma limit values based on the luma component values, the fourth resultant values of the first chroma component, and the input image data according to relationships among the luma and chroma components; transforming the second chroma component values by performing a processing operation in a first direction to produce first resultant values of the first chroma component; clipping the first resultant values of the second chroma component that are beyond the min and max second chroma limit values to produce second resultant values of the second chroma component; transforming the second resultant values of the second chroma component by performing the processing operation in a second direction to produce third resultant values of the second chroma component; and clipping the third resultant values of the second chroma component that are beyond the min and max second chroma limit values to produce fourth resultant values of the second chroma component.