[FFmpeg-cvslog] r32368 - in trunk/libswscale: swscale.h utils.c
Michael Niedermayer
michaelni
Mon Sep 27 01:48:34 CEST 2010
On Sun, Sep 26, 2010 at 05:27:46PM -0300, Ramiro Polla wrote:
> On Sun, Sep 26, 2010 at 4:33 PM, michael <subversion at mplayerhq.hu> wrote:
> [...]
> > ?/**
> > + * Alloctaes an empty SwsContext, this must be filled and passed to sws_init_context().
> > + * For filling see AVOptions, options.c and sws_setColorspaceDetails().
> > + */
> > +struct SwsContext *sws_alloc_context(void);
>
> Also SwsContext is still opaque to the user. This is good because it
> hides the internals of SwsContext to the user which gives us more
> flexibility to work on swscale, but it's harder for the user to use
> (as in he has to go through AVOptions). I suggest something like this
> in swscale.h:
>
> struct SwsContext {
> const AVClass *av_class;
> void *opaque; /* for swscale's internal use */
> int src_w;
> int src_h;
> int dst_w;
> int dst_h;
> enum PixelFormat src_pix_fmt;
> enum PixelFormat dst_pix_fmt;
> enum ScalingAlgorithm algo;
> SwsFilter *src_filter;
> SwsFilter *dst_filter;
> const double *param;
> int cpu_accel; /* not necessary if we decide to remove
> user-specified runtime cpu detection */
> int flags; /* bitexact, accurate_rnd, print_info, full_chroma_inp,
> full_chroma_int */
> /* possibly other options, like chroma drop which is not part of
> AVOptions */
> };
My idea was a SwsParam struct and making SwsContexts first fields match
SwsParams
the user then can just cast the opaque SwsContext to a non opaque SwsParms
and access the public fields as he likes
That way we dont duplicate / split the things internally which would be a
bit ugly imho
that said, this can be added at any time in the future as it doesnt breal
ABI/API
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20100927/30aa1d21/attachment.pgp>
More information about the ffmpeg-cvslog
mailing list