aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-14 17:11:34 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-20 22:02:28 +0100
commitb5469fec6a2114b3a73d71fd50a033da7005d7d6 (patch)
tree5910e5bd3fb78af7675bd0aa6a87ab9857963815
parent864a7e73b9604f3db1dd58f4580a1c8f05219ea4 (diff)
downloadffmpeg-b5469fec6a2114b3a73d71fd50a033da7005d7d6.tar.gz
movenc: hotfix, dont store fiel for h264 / mpeg4-asp / dnxhd
Other software does not store it in this case, and the information is provided by the codec stream Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 405cc0d9052079307b2b4188c396ae30c8e9108b) Conflicts: tests/ref/lavf/mov tests/ref/seek/lavf_mov tests/ref/vsynth/vsynth1-dnxhd-1080i tests/ref/vsynth/vsynth1-mpeg4 tests/ref/vsynth/vsynth2-dnxhd-1080i tests/ref/vsynth/vsynth2-mpeg4
-rw-r--r--libavformat/movenc.c7
-rw-r--r--tests/ref/vsynth/vsynth1-dnxhd-1080i4
-rw-r--r--tests/ref/vsynth/vsynth1-mpeg44
-rw-r--r--tests/ref/vsynth/vsynth2-dnxhd-1080i4
-rw-r--r--tests/ref/vsynth/vsynth2-mpeg44
5 files changed, 21 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 9e345d5e40..d59580db91 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1083,8 +1083,11 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track)
else if (track->vos_len > 0)
mov_write_glbl_tag(pb, track);
- if (track->enc->field_order != AV_FIELD_UNKNOWN)
- mov_write_fiel_tag(pb, track);
+ if (track->enc->codec_id != CODEC_ID_H264 &&
+ track->enc->codec_id != CODEC_ID_MPEG4 &&
+ track->enc->codec_id != CODEC_ID_DNXHD)
+ if (track->enc->field_order != AV_FIELD_UNKNOWN)
+ mov_write_fiel_tag(pb, track);
if (track->enc->sample_aspect_ratio.den && track->enc->sample_aspect_ratio.num &&
track->enc->sample_aspect_ratio.den != track->enc->sample_aspect_ratio.num) {
diff --git a/tests/ref/vsynth/vsynth1-dnxhd-1080i b/tests/ref/vsynth/vsynth1-dnxhd-1080i
new file mode 100644
index 0000000000..dbe2c371e0
--- /dev/null
+++ b/tests/ref/vsynth/vsynth1-dnxhd-1080i
@@ -0,0 +1,4 @@
+124c991ee3ac0caef39a58a45287a762 *tests/data/fate/vsynth1-dnxhd-1080i.mov
+3031911 tests/data/fate/vsynth1-dnxhd-1080i.mov
+a09132c6db44f415e831dcaa630a351b *tests/data/fate/vsynth1-dnxhd-1080i.out.rawvideo
+stddev: 6.29 PSNR: 32.15 MAXDIFF: 64 bytes: 7603200/ 760320
diff --git a/tests/ref/vsynth/vsynth1-mpeg4 b/tests/ref/vsynth/vsynth1-mpeg4
new file mode 100644
index 0000000000..b6da11cef1
--- /dev/null
+++ b/tests/ref/vsynth/vsynth1-mpeg4
@@ -0,0 +1,4 @@
+a2acdf772bf7b7641079d8a03ea03ccf *tests/data/fate/vsynth1-mpeg4.mp4
+540024 tests/data/fate/vsynth1-mpeg4.mp4
+f80ec173d37f2f91add031e95579a220 *tests/data/fate/vsynth1-mpeg4.out.rawvideo
+stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-dnxhd-1080i b/tests/ref/vsynth/vsynth2-dnxhd-1080i
new file mode 100644
index 0000000000..f657eb4c95
--- /dev/null
+++ b/tests/ref/vsynth/vsynth2-dnxhd-1080i
@@ -0,0 +1,4 @@
+5d7ab75ce6e547ed63a7a0eacf18f078 *tests/data/fate/vsynth2-dnxhd-1080i.mov
+3031911 tests/data/fate/vsynth2-dnxhd-1080i.mov
+744ba46da5d4c19a28562ea31061d170 *tests/data/fate/vsynth2-dnxhd-1080i.out.rawvideo
+stddev: 1.31 PSNR: 45.77 MAXDIFF: 23 bytes: 7603200/ 760320
diff --git a/tests/ref/vsynth/vsynth2-mpeg4 b/tests/ref/vsynth/vsynth2-mpeg4
new file mode 100644
index 0000000000..399ef58e3f
--- /dev/null
+++ b/tests/ref/vsynth/vsynth2-mpeg4
@@ -0,0 +1,4 @@
+04f74c54f4db25e1d454ede9216632c1 *tests/data/fate/vsynth2-mpeg4.mp4
+119661 tests/data/fate/vsynth2-mpeg4.mp4
+9a1e085d9e488c5ead0c940c9612a37a *tests/data/fate/vsynth2-mpeg4.out.rawvideo
+stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200