[Libav-user] BGR24 to YUV pixel conversion
the1evilgenius at gmail.com
Tue Apr 23 16:22:04 CEST 2013
//begin relevant code here
mSwsContext = sws_getContext(input_width,
ret = avpicture_fill(&input_picture,
if (mSwsContext != NULL)
ret = sws_scale(mSwsContext,
//ret here is always 0
On Tue, Apr 23, 2013 at 10:21 AM, Neil Menne
<nhmenne42 at students.tntech.edu>wrote:
> I'm trying to convert a raw image that I receive as a unsigned character
> array. I then create (via avpicture_alloc) two AVPictures (one for the
> source and one for the destination). I then do an avpicture_fill for the
> input using the unsigned character array. The value returned by
> avpicture_fill matches the size of the original image.
> When I do the sws_scale, I get a printout saying "bad src image pointers"
> which comes from the check_image_pointers function in sws_scale. My
> question is this: How is this happening? I'm filling an allocated picture.
> Where is the disconnect?
> Thanks in advance, guys.
> P.S. here's the relevant snippet of code
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user