Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

YUV output problem after YV12 to NV12 conversion

shavkat_n_
Beginner
1,016 Views

Hello

I'm doing color conversion YV12(YUV420) to NV12 using ffmpeg using sws_getCachedContext & sws_scale. Then I feed it IntelMedia VPP & Encoder. I have output but it is as following.

Y(luma) seem ok, but there seem to be a mismatch with UV(chroma) planes. Please give a hint if you recognize this problem.

912345_1minvideo.mp4_20170420_113501.028.jpg

0 Kudos
1 Reply
shavkat_n_
Beginner
1,016 Views

I found the reason for this issue. Seems output slice linesize was being bitshifted and got cut in half. 

Isn't avcodec_get_chroma_sub_sample for AVPixelFormat of AV_PIX_FMT_NV12 supposed to output 0 for horizontal shift ??

0 Kudos
Reply