[FFmpeg-devel] [RFC] Scalar color conversion utils (colorutils.[hc])?
Michael Niedermayer
michaelni
Sun May 3 02:31:41 CEST 2009
On Sat, May 02, 2009 at 10:46:33PM +0200, Stefano Sabatini wrote:
> On date Saturday 2009-05-02 22:11:42 +0200, Michael Niedermayer encoded:
> > On Sat, May 02, 2009 at 09:37:09PM +0200, Stefano Sabatini wrote:
> > > On date Saturday 2009-05-02 18:45:49 +0200, Michael Niedermayer encoded:
> [...]
> > > > I will add the enum to AVCodecContext myself, the rest is currently not of
> > > > any relevance as it isnt and would not be used by anything. It requires lavfi
> > > > to be merged first ...
> > >
> > > I have a patch for this, but I have many things to study before to be
> > > confident with the field, also I'm not sure the idea of including CIE
> > > colorspaces is really a good idea.
> >
> > my suggestion is attached, ill commit mine if there are no suggestions for
> > improvment.
>
> [...]
> > Index: libavcodec/options.c
> > ===================================================================
> > --- libavcodec/options.c (revision 18731)
> > +++ libavcodec/options.c (working copy)
> > @@ -394,6 +394,10 @@
> > {"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), FF_OPT_TYPE_FLOAT, 1.0/3, 0.0, FLT_MAX, V|E},
> > {"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use), FF_OPT_TYPE_FLOAT, 3, 0.0, FLT_MAX, V|E},
> > {"ticks_per_frame", NULL, OFFSET(ticks_per_frame), FF_OPT_TYPE_INT, 1, 1, INT_MAX, A|V|E|D},
> > +{"color_primaries", NULL, OFFSET(color_primaries), FF_OPT_TYPE_INT, COLPRI_UNSPECIFIED, 1, COLPRI_NB-1, V|E|D},
> > +{"color_trc", NULL, OFFSET(color_trc), FF_OPT_TYPE_INT, COLTRC_UNSPECIFIED, 1, COLTRC_NB-1, V|E|D},
> > +{"colorspace", NULL, OFFSET(colorspace), FF_OPT_TYPE_INT, COLSPC_UNSPECIFIED, 1, COLSPC_NB-1, V|E|D},
> > +{"color_range", NULL, OFFSET(color_range), FF_OPT_TYPE_INT, COLRANGE_UNSPECIFIED, 0, COLRANGE_NB-1, V|E|D},
> > {NULL},
> > };
> >
> > Index: libavcodec/avcodec.h
> > ===================================================================
> > --- libavcodec/avcodec.h (revision 18731)
> > +++ libavcodec/avcodec.h (working copy)
> > @@ -441,6 +441,43 @@
> > AVDISCARD_ALL = 48, ///< discard all
> > };
> >
> > +enum AVColorPrimaries{
> > + COLPRI_BT709 =1, ///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
> > + COLPRI_UNSPECIFIED=2,
> > + COLPRI_BT470M =4,
> > + COLPRI_BT470BG =5, ///< also BT601-6 625 / BT1358 625 / BT1700 625 PAL & SECAM
>
> What about _ITU-R_ BT... here and below?
>
> > + COLPRI_SMPTE170M =6, ///< also BT601-6 525 / BT1358 525 / BT1700 NTSC
> > + COLPRI_SMPTE240M =7, ///< functionally identical to above
> > + COLPRI_FILM =8,
> > + COLPRI_NB , ///< Not part of ABI
> > +};
>
> Also maybe adding AV_ or FF_ here and below may exorcise namespace
> conflict problems.
changed these, any other comments?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20090503/56fbb04b/attachment.pgp>
More information about the ffmpeg-devel
mailing list