[FFmpeg-cvslog] movenc: Always write EDTS when we are able to.

Michael Niedermayer git at videolan.org
Wed Dec 7 05:33:53 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec  7 05:06:13 2011 +0100| [901af94b6976c05d7c092024c1dcf891ab3be66a] | committer: Michael Niedermayer

movenc: Always write EDTS when we are able to.

Inspired by a patch from Michael Root
Idea-by: Baptiste Coudurier
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/movenc.c          |    5 ++---
 tests/ref/acodec/alac         |    4 ++--
 tests/ref/acodec/pcm_s16be    |    4 ++--
 tests/ref/acodec/pcm_s24be    |    4 ++--
 tests/ref/acodec/pcm_s32be    |    4 ++--
 tests/ref/acodec/pcm_s8       |    4 ++--
 tests/ref/lavf/mov            |    4 ++--
 tests/ref/vsynth1/dnxhd_1080i |    4 ++--
 tests/ref/vsynth1/mpeg4       |    4 ++--
 tests/ref/vsynth1/prores      |    4 ++--
 tests/ref/vsynth1/qtrle       |    4 ++--
 tests/ref/vsynth1/qtrlegray   |    4 ++--
 tests/ref/vsynth1/svq1        |    4 ++--
 tests/ref/vsynth2/dnxhd_1080i |    4 ++--
 tests/ref/vsynth2/mpeg4       |    4 ++--
 tests/ref/vsynth2/prores      |    4 ++--
 tests/ref/vsynth2/qtrle       |    4 ++--
 tests/ref/vsynth2/qtrlegray   |    4 ++--
 tests/ref/vsynth2/svq1        |    4 ++--
 19 files changed, 38 insertions(+), 39 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 80c45a5..d718cf1 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1401,9 +1401,8 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *tra
     avio_wb32(pb, 0); /* size */
     ffio_wfourcc(pb, "trak");
     mov_write_tkhd_tag(pb, track, st);
-    if (track->mode == MODE_PSP || track->flags & MOV_TRACK_CTTS || track->cluster[0].dts)
-        if(!mov->fragments) // EDTS with fragments is tricky as we dont know the duration when its written
-        mov_write_edts_tag(pb, track);  // PSP Movies require edts box
+    if(!mov->fragments) // EDTS with fragments is tricky as we dont know the duration when its written
+        mov_write_edts_tag(pb, track);  // PSP Movies and several other cases require edts box
     if (track->tref_tag)
         mov_write_tref_tag(pb, track);
     mov_write_mdia_tag(pb, track);
diff --git a/tests/ref/acodec/alac b/tests/ref/acodec/alac
index 6ae10fa..db6393a 100644
--- a/tests/ref/acodec/alac
+++ b/tests/ref/acodec/alac
@@ -1,4 +1,4 @@
-b7a590dd346b2fbaf49421c72a4a84bd *./tests/data/acodec/alac.m4a
-389130 ./tests/data/acodec/alac.m4a
+4fe333ff79e86cca6ba8c109cc08263e *./tests/data/acodec/alac.m4a
+389166 ./tests/data/acodec/alac.m4a
 64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/alac.acodec.out.wav
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  1058400/  1058400
diff --git a/tests/ref/acodec/pcm_s16be b/tests/ref/acodec/pcm_s16be
index 53c4b43..e027f4e 100644
--- a/tests/ref/acodec/pcm_s16be
+++ b/tests/ref/acodec/pcm_s16be
@@ -1,4 +1,4 @@
-9686b93d1439fc2df991a004ab0298f4 *./tests/data/acodec/pcm_s16be.mov
-1058993 ./tests/data/acodec/pcm_s16be.mov
+aeec610f33d8eec7031c5c6a9aab4cc0 *./tests/data/acodec/pcm_s16be.mov
+1059029 ./tests/data/acodec/pcm_s16be.mov
 64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s16be.acodec.out.wav
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  1058400/  1058400
diff --git a/tests/ref/acodec/pcm_s24be b/tests/ref/acodec/pcm_s24be
index 743183e..282868e 100644
--- a/tests/ref/acodec/pcm_s24be
+++ b/tests/ref/acodec/pcm_s24be
@@ -1,4 +1,4 @@
-22c5c3df0a4765e28c205a4fb95b3cdc *./tests/data/acodec/pcm_s24be.mov
-1588193 ./tests/data/acodec/pcm_s24be.mov
+9ea74aa6d09fcfe9a1e232efecfb07fe *./tests/data/acodec/pcm_s24be.mov
+1588229 ./tests/data/acodec/pcm_s24be.mov
 64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s24be.acodec.out.wav
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  1058400/  1058400
diff --git a/tests/ref/acodec/pcm_s32be b/tests/ref/acodec/pcm_s32be
index e2fbd3b..dd8e31e 100644
--- a/tests/ref/acodec/pcm_s32be
+++ b/tests/ref/acodec/pcm_s32be
@@ -1,4 +1,4 @@
-b36ac7a1b4fc28248a565a676e555bd1 *./tests/data/acodec/pcm_s32be.mov
-2117393 ./tests/data/acodec/pcm_s32be.mov
+25535c11babbc971b6a958e92feaee37 *./tests/data/acodec/pcm_s32be.mov
+2117429 ./tests/data/acodec/pcm_s32be.mov
 64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s32be.acodec.out.wav
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  1058400/  1058400
diff --git a/tests/ref/acodec/pcm_s8 b/tests/ref/acodec/pcm_s8
index 34e5149..e7c3c2e 100644
--- a/tests/ref/acodec/pcm_s8
+++ b/tests/ref/acodec/pcm_s8
@@ -1,4 +1,4 @@
-b78d2a30df75af08ecf86f201281fec2 *./tests/data/acodec/pcm_s8.mov
-529793 ./tests/data/acodec/pcm_s8.mov
+d63813e9255a74324ea4559d6a8a1f7c *./tests/data/acodec/pcm_s8.mov
+529829 ./tests/data/acodec/pcm_s8.mov
 651d4eb8d98dfcdda96ae6c43d8f156b *./tests/data/pcm_s8.acodec.out.wav
 stddev:  147.89 PSNR: 52.93 MAXDIFF:  255 bytes:  1058400/  1058400
diff --git a/tests/ref/lavf/mov b/tests/ref/lavf/mov
index 1202eb4..7763796 100644
--- a/tests/ref/lavf/mov
+++ b/tests/ref/lavf/mov
@@ -1,3 +1,3 @@
-6706bb7887aa828a0a734552c3d9fc40 *./tests/data/lavf/lavf.mov
-357749 ./tests/data/lavf/lavf.mov
+93ed3b20190daa51aeb19f62f939d04a *./tests/data/lavf/lavf.mov
+357821 ./tests/data/lavf/lavf.mov
 ./tests/data/lavf/lavf.mov CRC=0x2f6a9b26
diff --git a/tests/ref/vsynth1/dnxhd_1080i b/tests/ref/vsynth1/dnxhd_1080i
index 177f0ab..526e454 100644
--- a/tests/ref/vsynth1/dnxhd_1080i
+++ b/tests/ref/vsynth1/dnxhd_1080i
@@ -1,4 +1,4 @@
-b0c02b4f7ce6b57668e54970443f9a42 *./tests/data/vsynth1/dnxhd-1080i.mov
-3031859 ./tests/data/vsynth1/dnxhd-1080i.mov
+d2621659037803a30b77e3d4f87eb733 *./tests/data/vsynth1/dnxhd-1080i.mov
+3031895 ./tests/data/vsynth1/dnxhd-1080i.mov
 0c651e840f860592f0d5b66030d9fa32 *./tests/data/dnxhd_1080i.vsynth1.out.yuv
 stddev:    6.29 PSNR: 32.15 MAXDIFF:   64 bytes:   760320/  7603200
diff --git a/tests/ref/vsynth1/mpeg4 b/tests/ref/vsynth1/mpeg4
index a84bc08..fbf3b8f 100644
--- a/tests/ref/vsynth1/mpeg4
+++ b/tests/ref/vsynth1/mpeg4
@@ -1,4 +1,4 @@
-859c8b545c1c702343d201836833ce23 *./tests/data/vsynth1/odivx.mp4
-539960 ./tests/data/vsynth1/odivx.mp4
+f32960be0f05be8b2ed03447e1eaea6f *./tests/data/vsynth1/odivx.mp4
+539996 ./tests/data/vsynth1/odivx.mp4
 8828a375448dc5c2215163ba70656f89 *./tests/data/mpeg4.vsynth1.out.yuv
 stddev:    7.97 PSNR: 30.10 MAXDIFF:  105 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth1/prores b/tests/ref/vsynth1/prores
index 69e90f0..6710a6b 100644
--- a/tests/ref/vsynth1/prores
+++ b/tests/ref/vsynth1/prores
@@ -1,4 +1,4 @@
-6484056f2f99410c20a0d987d0255a1d *./tests/data/vsynth1/prores.mov
-5022759 ./tests/data/vsynth1/prores.mov
+062e1f5ec6ebdbc43ee69e0393221866 *./tests/data/vsynth1/prores.mov
+5022795 ./tests/data/vsynth1/prores.mov
 a2e2d1d45341a94ff994d1d92629f778 *./tests/data/prores.vsynth1.out.yuv
 stddev:    2.47 PSNR: 40.27 MAXDIFF:   31 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth1/qtrle b/tests/ref/vsynth1/qtrle
index 332a498..bf824ec 100644
--- a/tests/ref/vsynth1/qtrle
+++ b/tests/ref/vsynth1/qtrle
@@ -1,4 +1,4 @@
-92a24c3cb16de8352db01e094c2cab9a *./tests/data/vsynth1/qtrle.mov
-15263036 ./tests/data/vsynth1/qtrle.mov
+b67340783a817fe398fd138175c7fa07 *./tests/data/vsynth1/qtrle.mov
+15263072 ./tests/data/vsynth1/qtrle.mov
 93695a27c24a61105076ca7b1f010bbd *./tests/data/qtrle.vsynth1.out.yuv
 stddev:    3.42 PSNR: 37.44 MAXDIFF:   48 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth1/qtrlegray b/tests/ref/vsynth1/qtrlegray
index 2250441..74a6216 100644
--- a/tests/ref/vsynth1/qtrlegray
+++ b/tests/ref/vsynth1/qtrlegray
@@ -1,4 +1,4 @@
-54651e32f751432fad61acb364de80f5 *./tests/data/vsynth1/qtrlegray.mov
-5113232 ./tests/data/vsynth1/qtrlegray.mov
+f0c3cd26e80674a62683685d0508622a *./tests/data/vsynth1/qtrlegray.mov
+5113268 ./tests/data/vsynth1/qtrlegray.mov
 29def4aed035ed65d3a89f7d382fccbe *./tests/data/qtrlegray.vsynth1.out.yuv
 stddev:   25.95 PSNR: 19.85 MAXDIFF:  122 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth1/svq1 b/tests/ref/vsynth1/svq1
index 984a675..90d6fc8 100644
--- a/tests/ref/vsynth1/svq1
+++ b/tests/ref/vsynth1/svq1
@@ -1,4 +1,4 @@
-e3257e307140bf1c2e117f4ed6131c1c *./tests/data/vsynth1/svq1.mov
-1334171 ./tests/data/vsynth1/svq1.mov
+ebaf85e8743ad1f6c2228d473fe16d83 *./tests/data/vsynth1/svq1.mov
+1334207 ./tests/data/vsynth1/svq1.mov
 9cc35c54b2c77d36bd7e308b393c1f81 *./tests/data/svq1.vsynth1.out.yuv
 stddev:    9.58 PSNR: 28.50 MAXDIFF:  210 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth2/dnxhd_1080i b/tests/ref/vsynth2/dnxhd_1080i
index 1d4af69..79563be 100644
--- a/tests/ref/vsynth2/dnxhd_1080i
+++ b/tests/ref/vsynth2/dnxhd_1080i
@@ -1,4 +1,4 @@
-4841132b013b373862ee5b9c4dc7592c *./tests/data/vsynth2/dnxhd-1080i.mov
-3031859 ./tests/data/vsynth2/dnxhd-1080i.mov
+af3b282a2194a7e2748df7684330728a *./tests/data/vsynth2/dnxhd-1080i.mov
+3031895 ./tests/data/vsynth2/dnxhd-1080i.mov
 3c559af629ae0a8fb1a9a0e4b4da7733 *./tests/data/dnxhd_1080i.vsynth2.out.yuv
 stddev:    1.31 PSNR: 45.77 MAXDIFF:   23 bytes:   760320/  7603200
diff --git a/tests/ref/vsynth2/mpeg4 b/tests/ref/vsynth2/mpeg4
index 27b9a6f..726e1d9 100644
--- a/tests/ref/vsynth2/mpeg4
+++ b/tests/ref/vsynth2/mpeg4
@@ -1,4 +1,4 @@
-f11f53931a1374acff6c04a21517809c *./tests/data/vsynth2/odivx.mp4
-119613 ./tests/data/vsynth2/odivx.mp4
+4d092ca067362a61b9c96f5f12a1ab5a *./tests/data/vsynth2/odivx.mp4
+119649 ./tests/data/vsynth2/odivx.mp4
 90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.vsynth2.out.yuv
 stddev:    5.34 PSNR: 33.57 MAXDIFF:   83 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth2/prores b/tests/ref/vsynth2/prores
index dae8942..8804260 100644
--- a/tests/ref/vsynth2/prores
+++ b/tests/ref/vsynth2/prores
@@ -1,4 +1,4 @@
-179b4f654de017fa74b8eaab93d9d2cb *./tests/data/vsynth2/prores.mov
-2843998 ./tests/data/vsynth2/prores.mov
+85f16a09120b668d02cb9cce86dfa9b1 *./tests/data/vsynth2/prores.mov
+2844034 ./tests/data/vsynth2/prores.mov
 b5844025c0f4c7c37db702c3213db232 *./tests/data/prores.vsynth2.out.yuv
 stddev:    1.31 PSNR: 45.77 MAXDIFF:   11 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth2/qtrle b/tests/ref/vsynth2/qtrle
index 08b8637..c4cd887 100644
--- a/tests/ref/vsynth2/qtrle
+++ b/tests/ref/vsynth2/qtrle
@@ -1,4 +1,4 @@
-998aa370cb23634272c64cc4ae759a9d *./tests/data/vsynth2/qtrle.mov
-14798223 ./tests/data/vsynth2/qtrle.mov
+f18ed8321e19a7cadedc3ba32d71e0ea *./tests/data/vsynth2/qtrle.mov
+14798259 ./tests/data/vsynth2/qtrle.mov
 98d0e2854731472c5bf13d8638502d0a *./tests/data/qtrle.vsynth2.out.yuv
 stddev:    1.26 PSNR: 46.10 MAXDIFF:   13 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth2/qtrlegray b/tests/ref/vsynth2/qtrlegray
index eae1d9b..4d97adc 100644
--- a/tests/ref/vsynth2/qtrlegray
+++ b/tests/ref/vsynth2/qtrlegray
@@ -1,4 +1,4 @@
-19ffbb5fe258dc96fa345b9fbbf7ba51 *./tests/data/vsynth2/qtrlegray.mov
-5111221 ./tests/data/vsynth2/qtrlegray.mov
+799451fc6215c51fc892a2284721b8e7 *./tests/data/vsynth2/qtrlegray.mov
+5111257 ./tests/data/vsynth2/qtrlegray.mov
 f63b5ebdfdba750e547c25131b0a3fd1 *./tests/data/qtrlegray.vsynth2.out.yuv
 stddev:   19.42 PSNR: 22.36 MAXDIFF:   72 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth2/svq1 b/tests/ref/vsynth2/svq1
index 2eb0c8d..b8ce852 100644
--- a/tests/ref/vsynth2/svq1
+++ b/tests/ref/vsynth2/svq1
@@ -1,4 +1,4 @@
-fdb06a9800712a0bf6941847afcbca57 *./tests/data/vsynth2/svq1.mov
-766655 ./tests/data/vsynth2/svq1.mov
+8d5275bf59aac368d5da11d9c34b8cf2 *./tests/data/vsynth2/svq1.mov
+766691 ./tests/data/vsynth2/svq1.mov
 aa03471dac3f49455a33a2b19fda1098 *./tests/data/svq1.vsynth2.out.yuv
 stddev:    3.23 PSNR: 37.93 MAXDIFF:   61 bytes:  7603200/  7603200



More information about the ffmpeg-cvslog mailing list