[FFmpeg-devel] MXF : default fied dominance is TFF

Gaullier Nicolas nicolas.gaullier at arkena.com
Mon Sep 8 14:17:14 CEST 2014


I did not found an easy way to set up initialization values to properly handle defaults but I am not a highly skilled developer, and maybe someone will find how to implement this more elegantly.
They are also many other properties in mxf that are only optional, for example component depth and horizontal/vertical subsampling factors that are actually parsed, but as far from now it does not seem sufficiently useful to distinguish between the initialization value '0' and 'not present'.
In my opinion, in the solely case of the field dominance, when it is found/set to '0', it seems interesting to fail/raise a warning at least, but it is somewhat particular and should not involve a big code refactoring to handle this.
----
Nicolas

-----Message d'origine-----
De : ffmpeg-devel-bounces at ffmpeg.org [mailto:ffmpeg-devel-bounces at ffmpeg.org] De la part de Carl Eugen Hoyos
Envoyé : lundi 8 septembre 2014 12:15
À : ffmpeg-devel at ffmpeg.org
Objet : Re: [FFmpeg-devel] MXF : default fied dominance is TFF

Gaullier Nicolas <nicolas.gaullier <at> arkena.com> writes:

>      case 0x3212:
>          descriptor->field_dominance = avio_r8(pb);
> +        descriptor->field_dominance_present = 1;

Is it possible to instead initialize 
descriptor->field_dominance to MXF_TFF?

>                  case SeparateFields:
> +                    if (!descriptor->field_dominance_present)
> +                        descriptor->field_dominance = MXF_TFF;
>                      switch (descriptor->field_dominance) {
>                      case MXF_TFF:
>                          st->codec->field_order = AV_FIELD_TT;

Doesn't this allow to remove the default case below?

Carl Eugen

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list