문제

Does anyone know how to convert Intel Media SDK (version: Media SDK 2010) H.264 video frame decoded output NV12 format to RGB888 (RGB24) bit conversion?

Basically Media SDK decoder output will be in NV12 format and the render needs the RGB24 bit format, so if any conversion code avaiable for converting NV12-->RGB24 would be great help for us.

도움이 되었습니까?

해결책

Have a look at YUV to RGB Conversion and afterwards you can use the information about YUV pixel formats (link directs to NV12) as input to the first link and do the conversion.

다른 팁

Check out this code: https://github.com/andrechen/yuv2rgb Although it for NV21, but the only difference is order of UV (VU) bytes. All you need to do, is to reverse the order (loadvu function):

static void loadvu(int& U, int& V, unsigned char const* &uv) {
    U = (*uv++) - 128;
    V = (*uv++) - 128;
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top