Before using libjpeg decode images, I specified out_color_space as YCbCr, eventually
The image seems to be decoded YUV444 of (a behavior 3 x width size), if I downsample
YUV422 or YUV420 into this, you will find downsample the image is not correct.
Since the input image is YCbCr, RGB is not, I feel absolutely no need for RGB-> YUV conversion,
But somehow just can not get the correct YUV data?
Great God you do not know whether encountered such a problem? I ask how to solve?
Reply:
Eventually found himself guilty of a stupid mistake. Wrong operator precedence.
i & v_mask == 0 expression is virtually identical to the i & (v_mask == 0)
Rather than I expected (i & v_mask) == 0.
Remind you, try to remember the parentheses, even if not required, you can also enhance readability.

Reply:
Well, this error is easily ignored, the next noteworthy, learn! !
No comments:
Post a Comment