2014-09-13 21:34 GMT+04:00 Dmitry Adjiev <[email protected]>: > > > 2014-09-13 21:32 GMT+04:00 Dmitry Adjiev <[email protected]>: > >> 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
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
