2

Im using ffmpeg on Android. I have an image with the format ImageFormat.YUV_420_888and want to put the image into an AVFrame. The Problem is that I dont know what format ImageFormat.YUV_420_888 is in ffmpeg. I tried with AV_PIX_FMT_YUV420P but the result looks like this: Wrong result

It shoud look so: Right result

Here is how I copy the data:

Image.Plane[] planes = image.getPlanes();
for(int i = 0; i < planes.length; i++)
{
    BytePointer plane = new BytePointer(planes[i].getBuffer());
    tmpAVFrame.data(i, plane);
}

Edit: With Pixel format AV_PIX_FMT_YUV440P only the colors are wrong: Wrong Colors

0 Answers0