Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

GPU::VideoReader_GPU output strange color with YUV420 source

Hi,

I have a strange result when reading YUV420 video with gpu::VideoReader_GPU. FFmpeg on CPU give good results, but the gpu version output strange colors (especially in blue), near the true colors but not exactly the same...

cv::gpu::GpuMat             d_frame;
cv::gpu::VideoReader_GPU    d_reader("path.....");

/// then the following read() works, but colors are not exactly true...
d_reader.read(d_frame);

/// knowing that :
d_reader.dumpFormat(std::cout);

/// give the following output:
Frame Size    : 1920x1088
Codec         : H264
Chroma Format : YUV420

... instead of 1920x1080 : it appears like an old bug in FFMPEG, that was corrected since then. But the problem probably does not come from there, because the result is the same with other sources like :

Frame Size    : 1920x1080
Codec         : MPEG4
Chroma Format : YUV420

I compiled opencv 2.4.6 with CUDA and NCUVID. Is there any knowned fix for that problem ?

Thanks for your answers ;)