[Libav-user] Qt + swsscale on android
Dmitry Adjiev
adjiev.dmitry at gmail.com
Sat Sep 13 21:16:07 CEST 2014
2014-09-13 21:34 GMT+04:00 Dmitry Adjiev <adjiev.dmitry at gmail.com>:
>
>
> 2014-09-13 21:32 GMT+04:00 Dmitry Adjiev <adjiev.dmitry at gmail.com>:
>
>> 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
>>
>
>
> Here is link to the image:
> https://www.dropbox.com/s/iv5rgi90ic3xrwg/guvcview_image-3.jpg?dl=0
> --
> Regards,
> Dmitry
>
Fixed!
See here:
http://stackoverflow.com/questions/22511309/video-from-pipe-yuv-with-libav-rgb-with-sws-scale-draw-with-qt
--
Regards,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140913/50c9f8fa/attachment.html>
More information about the Libav-user
mailing list