Commit 23e48cd0 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'c7166248'

* commit 'c7166248':
  mxf: Read field dominance flag

Conflicts:
	libavformat/mxfdec.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 8fb67c10 c7166248
......@@ -148,9 +148,11 @@ typedef struct {
int width;
int height; /* Field height, not frame height */
int frame_layout; /* See MXFFrameLayout enum */
#define MXF_TFF 1
#define MXF_BFF 2
int field_dominance;
int channels;
int bits_per_sample;
int field_dominance;
unsigned int component_depth;
unsigned int horiz_subsampling;
unsigned int vert_subsampling;
......@@ -1555,7 +1557,21 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
case MixedFields:
break;
case SeparateFields:
st->codec->height *= 2; /* Turn field height into frame height. */
switch (descriptor->field_dominance) {
case MXF_TFF:
st->codec->field_order = AV_FIELD_TT;
break;
case MXF_BFF:
st->codec->field_order = AV_FIELD_BB;
break;
default:
avpriv_request_sample(mxf->fc,
"Field dominance %d support",
descriptor->field_dominance);
break;
}
/* Turn field height into frame height. */
st->codec->height *= 2;
break;
default:
av_log(mxf->fc, AV_LOG_INFO, "Unknown frame layout type: %d\n", descriptor->frame_layout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment