[Libav-user] Color space conversion

Jasleen Kaur Jasleen at beesys.com
Wed Oct 29 07:07:47 CET 2014



________________________________________
From: libav-user-bounces at ffmpeg.org [libav-user-bounces at ffmpeg.org] on behalf of Carl Eugen Hoyos [cehoyos at ag.or.at]
Sent: Wednesday, October 29, 2014 5:47 AM
To: libav-user at ffmpeg.org
Subject: Re: [Libav-user] Color space conversion

Jasleen Kaur <Jasleen at ...> writes:

> uint8_t *plane[] = { m_picture_buf, m_picture_buf + ysize,
> m_picture_buf + ysize + vusize, 0 };

>From a quick look this has to be:
uint8_t *plane[] = { m_picture_buf,
                     m_picture_buf + ysize + vusize,
                     m_picture_buf + ysize };

because you want YV12 and not YUV420P.

Carl Eugen

_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user

Thanks Carl

Didnt work this way too.I tried changing the sequence of buffers given for encoding too.(interchanging U and V offsets)

I have to encode this YUV420 data further to H.264 using FFMPEG itself, this buffer is further given as following to the encoder

picture->data[0] = m_picture_buf; //Y
picture->data[1] = m_picture_buf+ y_size; // U 
picture->data[2] = m_picture_buf+ y_size*5/4; // V


Jasleen


More information about the Libav-user mailing list