Browse Source

Merge commit 'c716624853339ea4b1086a3957b334829370204c'

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

Conflicts:
	libavformat/mxfdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 11 years ago
parent
commit
23e48cd01f
1 changed files with 18 additions and 2 deletions
  1. +18
    -2
      libavformat/mxfdec.c

+ 18
- 2
libavformat/mxfdec.c View File

@@ -148,9 +148,11 @@ typedef struct {
int width; int width;
int height; /* Field height, not frame height */ int height; /* Field height, not frame height */
int frame_layout; /* See MXFFrameLayout enum */ int frame_layout; /* See MXFFrameLayout enum */
#define MXF_TFF 1
#define MXF_BFF 2
int field_dominance;
int channels; int channels;
int bits_per_sample; int bits_per_sample;
int field_dominance;
unsigned int component_depth; unsigned int component_depth;
unsigned int horiz_subsampling; unsigned int horiz_subsampling;
unsigned int vert_subsampling; unsigned int vert_subsampling;
@@ -1555,7 +1557,21 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
case MixedFields: case MixedFields:
break; break;
case SeparateFields: 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; break;
default: default:
av_log(mxf->fc, AV_LOG_INFO, "Unknown frame layout type: %d\n", descriptor->frame_layout); av_log(mxf->fc, AV_LOG_INFO, "Unknown frame layout type: %d\n", descriptor->frame_layout);


Loading…
Cancel
Save