[FFmpeg-devel] [PATCH 3/4] mxfenc: write optional field dominance flag in picture description

Michael Niedermayer michaelni at gmx.at
Wed Jun 6 17:09:53 CEST 2012


On Thu, May 31, 2012 at 01:52:12PM +0200, Matthieu Bouron wrote:
> On Thu, May 31, 2012 at 01:42:42PM +0200, Tomas Härdin wrote:
> > On Sun, 2012-05-27 at 14:21 +0200, Matthieu Bouron wrote:
> > > ---
> > > $title
> > > ---
> > >  libavformat/mxfenc.c   |   15 ++++++++++++++-
> > >  tests/ref/lavf/mxf     |    6 +++---
> > >  tests/ref/lavf/mxf_d10 |    2 +-
> > >  3 files changed, 18 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> > > index 1d11bae..fce8446 100644
> > > --- a/libavformat/mxfenc.c
> > > +++ b/libavformat/mxfenc.c
> > > @@ -73,6 +73,7 @@ typedef struct {
> > >      const UID *codec_ul;
> > >      int order;               ///< interleaving order if dts are equal
> > >      int interlaced;          ///< whether picture is interlaced
> > > +    int field_dominance;     ///< tff=1, bff=2
> > 
> > Wasn't there a plan to add this information to AVCodecContext?
> > top_field_first IIRC.
> > 
> > > @@ -790,8 +792,11 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
> > >      int stored_height = (st->codec->height+15)/16*16;
> > >      int display_height;
> > >      int f1, f2;
> > > +    unsigned desc_size = size+8+8+8+8+8+8+5+16+sc->interlaced*4+12+20;
> > > +    if (sc->interlaced && sc->field_dominance)
> > > +        desc_size += 5;
> > >  
> > > -    mxf_write_generic_desc(s, st, key, size+8+8+8+8+8+8+5+16+sc->interlaced*4+12+20);
> > > +    mxf_write_generic_desc(s, st, key, desc_size);
> > 
> > 
> > Looks correct.
> > 
> > Just noting that I think this could be reworked to  use the "write
> > everything, then update the length" approach that movenc uses.
> > 
> 
> Thanks. I was thinking about reworking this in a later patch.

ok, applied

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120606/5027dfd5/attachment.asc>


More information about the ffmpeg-devel mailing list