HI J.P, Thanks for the links and pointers. When I get back to coding I'll have a look at making the changes to swscale.
The other route would be to do the colour conversion down on the GPU, but this would have to be just an option. Robert. On Sat, Feb 28, 2009 at 10:38 AM, J.P. Delport <[email protected]> wrote: > Hi, > >>> I'll send some references and code later. >> >> See e.g. here: >> http://lists.mplayerhq.hu/pipermail/libav-user/2008-November/001618.html >> and >> http://lists.mplayerhq.hu/pipermail/libav-user/2008-June/000683.html > > e.g. > img_convert vs swscale > > ---8<--- > #if defined IPF_USE_SWSCALE > int err = sws_scale(ConvertToSaveCtx_, > InputFrame_->data, InputFrame_->linesize, 0, cc->height, > SaveFrame_->data, SaveFrame_->linesize); > #else > img_convert((AVPicture *)SaveFrame_, cc->pix_fmt, > (AVPicture *)InputFrame_, InputFrameFormat_, > cc->width, cc->height); > #endif > > You have to create the swscale context earlier, e.g. > > ConvertToSaveCtx_ = sws_getContext(ImageFormat_.getWidth(), > ImageFormat_.getHeight(), InputFrameFormat_, > ImageFormat_.getWidth(), > ImageFormat_.getHeight(), SaveFrameFormat_, > > SWS_BILINEAR, NULL, NULL, NULL); > > ---8<--- > > One other thing that changed at some stage was this. The version might have > to be tuned: > > #if LIBAVFORMAT_VERSION_INT > ((52<<16) + (1<<8) + 0) > url_fclose(FormatContext_->pb); > #else > url_fclose(&FormatContext_->pb); > #endif > > ---8<--- > > > jp > > -- > This message is subject to the CSIR's copyright terms and conditions, e-mail > legal notice, and implemented Open Document Format (ODF) standard. The full > disclaimer details can be found at http://www.csir.co.za/disclaimer.html. > > This message has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. MailScanner thanks Transtec > Computers for their support. > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

