[FFmpeg-cvslog] movenc: hotfix, dont store fiel for h264 / mpeg4-asp / dnxhd

Michael Niedermayer git at videolan.org
Wed Mar 20 22:51:25 CET 2013


ffmpeg | branch: release/0.11 | Michael Niedermayer <michaelni at gmx.at> | Thu Feb 14 17:11:34 2013 +0100| [b5469fec6a2114b3a73d71fd50a033da7005d7d6] | committer: Michael Niedermayer

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 at 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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b5469fec6a2114b3a73d71fd50a033da7005d7d6
---

 libavformat/movenc.c                 |    7 +++++--
 tests/ref/vsynth/vsynth1-dnxhd-1080i |    4 ++++
 tests/ref/vsynth/vsynth1-mpeg4       |    4 ++++
 tests/ref/vsynth/vsynth2-dnxhd-1080i |    4 ++++
 tests/ref/vsynth/vsynth2-mpeg4       |    4 ++++
 5 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 9e345d5..d59580d 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 0000000..dbe2c37
--- /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 0000000..b6da11c
--- /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 0000000..f657eb4
--- /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 0000000..399ef58
--- /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



More information about the ffmpeg-cvslog mailing list