[Libav-user] Retrieve 10bit video frames

Dnegel X. dnegel666 at gmail.com
Thu May 17 00:33:45 CEST 2012


I would like to decode 10bit videos into PIX_FMT_YUV422P10LE pixel format,

    struct SwsContext* swContext  = sws_getContext(width, height,
                                        width, height, PIX_FMT_YUV422P10LE,
                                        SWS_FAST_BILINEAR, NULL, NULL,

    sws_scale(swContext, frame->data, frame->linesize, 0, height,
                    frameYUV->data, frameYUV->linesize);

However, the decoded frameYUV->data is of type uint8_t, and I would expect
to get something able to store 10bit values like a uint16_t. So, what is
returned in this 8bit array in this case? How can I proceed to get the
10bit values?

Thanks for your help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120517/69975167/attachment.html>

More information about the Libav-user mailing list