[FFmpeg-devel] Can the pixel format be changed between sws_scale() calls?

Michael Niedermayer michaelni
Mon Mar 30 01:55:28 CEST 2009


On Sun, Mar 29, 2009 at 07:47:49PM -0300, Ramiro Polla wrote:
> Hi,
> 
> If I understood the code correctly, every time sws_scale() is called,
> it runs a whole bunch of:
> if (srcFormat == something)
>     do_this()
> else if (srcFormat == something_else)
>     do_that()
> ...
> 
> for many different converters.
> 
> But {src,dst}Format cannot be changed from one call to another, since
> the user doesn't even have access to struct SwsContext.
> 
> I just want to make sure:
> is it safe to assume {src,dst}Format will not change, and therefore we
> can assign a function pointer to the appropriate converter at
> sws_getContext()?

yes

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090330/5b2d45eb/attachment.pgp>



More information about the ffmpeg-devel mailing list