[Libav-user] GIF API access

Gustav González xtingray at gmail.com
Mon Mar 6 06:56:22 EET 2017


2017-03-05 20:46 GMT-05:00 Carl Eugen Hoyos <ceffmpeg at gmail.com>:

> 2017-03-06 1:44 GMT+01:00 Gustav González <xtingray at gmail.com>:
>
> > So, my next challenge is to low the size of the frames to finish my
> > implementation. Any hint?
>
> Yes, please see my last two emails in this thread.
>
> Carl Eugen
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>


Getting back to the libswscale approach, I was trying to transform the
QImage sequence into AVFrame variables:

        QImage image(path_to_image);
        AVPicture picture;
        avpicture_alloc(&picture, PIX_FMT_RGB32, w, h);
        memcpy(picture.data[0], image.bits(), w*h*4);

        QVector<int> strides(image.height(), image.bytesPerLine());
        struct SwsContext *sws_context = sws_getContext(w, h,
PIX_FMT_RGB32, w, h, AV_PIX_FMT_RGB8, SWS_BICUBIC, NULL, NULL, NULL);
        sws_scale(sws_context, picture.data, picture.linesize, 0, h,
frame->data, frame->linesize);

Is this code something similar or related to your suggestion? Thanks.

-- 
============================
  Gustav Gonzalez
  xtingray at gmail.com
============================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20170305/46467929/attachment.html>


More information about the Libav-user mailing list