[Libav-user] Qt + swsscale on android

Dmitry Adjiev adjiev.dmitry at gmail.com
Sat Sep 13 19:32:54 CEST 2014


Hello guys!
I have the issue with sws_scale and Qt on android:

Here is my code:

AVFrame *pict = av_frame_alloc();
                avpicture_alloc((AVPicture*) pict, AV_PIX_FMT_RGB24, width,
height);
                sws_scale(sws_ctx, const_cast<const u_int8_t** const>
(frame->data), frame->linesize, 0, height, pict->data, pict->linesize);
                QImage image(width, height, QImage::Format_RGB888);
                //QImage image(frame->data[0], frame->width, frame->height,
QImage::Format_RGB888);

                for (int y = 0; y < height; ++ y)
                    memcpy(image.scanLine(y), frame->data[0] + y *
frame->linesize[0], codec->width * 3);


In result Image repeats  3 times, please find attached file
What I do wrong?
-- 
Regards,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140913/7dd2b732/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: guvcview_image-3.jpg
Type: image/jpeg
Size: 98195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140913/7dd2b732/attachment.jpg>


More information about the Libav-user mailing list