If Sergey are right and you see wrong coefficients for B & R - use another function, please:
// Name: ippiColorToGray
// Purpose: Converts an RGB image to gray scale (custom coefficients)
// pSrc Pointer to the source image , points to point(0,0)
// pDst Pointer to the destination image , points to point(0,0)
// roiSize Size of the ROI in pixels. Since the function performs point
// operations (without a border), the ROI may be the whole image.
// srcStep Step in bytes through the source image to jump on the next line
// dstStep Step in bytes through the destination image to jump on the next line
// coeffs User-defined vector of coefficients.
// The sum of the coefficients should be less than or equal to 1
// ippStsNullPtrErr pSrc == NULL, or pDst == NULL
// ippStsSizeErr roiSize has a field with zero or negative value
// ippStsNoErr No errors
// The following equation is used to convert an RGB image to gray scale:
// Y = coeffs * R + coeffs * G + coeffs * B;
just swap coefficients from the formula above.