[Mesa-dev] [PATCH 06/11] vl/util: add copy func for yv12image to nv12surface

Andy Furniss adf.lists at gmail.com
Tue Jul 19 00:15:14 UTC 2016

Zhang, Boyuan wrote:
> Hi Andy,
> I just submitted another patch set, most of the issues you reported are solved, please see the information below:
> - Giving different frame rate should result different output size. The final result from my side is very close to the CBR I set. Please give a try with different frame rate and bit rate.
> - Picture corruption (half height pic) is caused by interlaced setting. Interlace encoding is not supported. However, for transcoding case, VAAPI decode will use interlace mode, which will cause this issue. The temp solution is to use an Environmental Variable to disable interlace when doing transcoding. Please try the following command with the new patch:
> DISABLE_INTERLACE=true gst-launch-1.0 filesrc location=~/big_buck_bunny_720p_1mb.mp4 ! qtdemux ! h264parse ! vaapidecode ! vaapih264enc ! filesink location=out.264
> - I420 yuv -> nv12 case seems working fine on my side, can you please provide the testing raw file and command you were using? I want to reproduce the issue from my side and try to fix it if possible. Thanks a lot!

Will try new patches tomorrow.

Here's a few frames of I420 in mkv at 1 fps, should play directly OK 
with mplayer/mpv - building is yellow.


Of course google will make a preview but you should be able to download 
the raw file by moving mouse towards the top of the screen.


gst-launch-1.0 -f filesrc location=I420-5f.mkv ! matroskademux ! 
vaapih264enc ! h264parse ! mp4mux ! filesink location=out-I420-1.mp4

and the result is blue building, force gstreamer to convert to nv12 
result is OK.

gst-launch-1.0 -f filesrc location=~/I420-5f.mkv ! matroskademux ! 
videoconvert ! video/x-raw,format=NV12 ! vaapih264enc ! h264parse ! 
mp4mux ! filesink location=out-I420-2.mp4

More information about the mesa-dev mailing list