hardware: i.mx6q
softwart: yocto 3.14.28
GPU will convert yuv to rgb while I load texture by function glTexDirectVIVMap.
Generally this convert method is limit rang for yuv input.
16 <= Y <= 235
16 <= U <= 240
16 <= V <= 240
A = Y - 16
B = U - 128
C = V - 128
R = clip((298*A + 410*C + 128) >> 8)
G = clip((298*A - 101*B - 209*C + 128) >> 8)
B = clip((298*A + 519*B + 128) >> 8)
May I configure it as full range for yuv input?
0 <= Y <= 255
0 <= U <= 255
0 <= V <= 255
A = Y
B = U
C = V
R = clip((256*A + 292*C) >> 8)
G = clip((256*A - 100*B - 149*C) >> 8)
B = clip((256*A + 520*B) >> 8)
refer to the Reference Manual, chatper 31.4.1.13 YUV to RGB Conversion of R2D GPU, the range of YUV is:
16 <= Y <= 235
16 <= U <= 240
16 <= V <= 240
if you need full range, I suggest that you can use CSC of IPU, for more detailed inforamtion, pls refer the chapter 37.4.9.5 Color Space Conversion unit - CSC
Hi Joan Xie,
YUV2RGB is not the final purpose.
Our application is 360 surround view.
our input is full range yuv source.
We need to load it by GPU. But GPU is work on limit rang.
It's may cause color deflection.