1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-12-07 05:06:13 +01:00
parent 1fa8ff38e4
commit 901af94b69
19 changed files with 38 additions and 39 deletions

View File

@ -1401,9 +1401,8 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *tra
avio_wb32(pb, 0); /* size */ avio_wb32(pb, 0); /* size */
ffio_wfourcc(pb, "trak"); ffio_wfourcc(pb, "trak");
mov_write_tkhd_tag(pb, track, st); 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
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
mov_write_edts_tag(pb, track); // PSP Movies require edts box
if (track->tref_tag) if (track->tref_tag)
mov_write_tref_tag(pb, track); mov_write_tref_tag(pb, track);
mov_write_mdia_tag(pb, track); mov_write_mdia_tag(pb, track);

View File

@ -1,4 +1,4 @@
b7a590dd346b2fbaf49421c72a4a84bd *./tests/data/acodec/alac.m4a 4fe333ff79e86cca6ba8c109cc08263e *./tests/data/acodec/alac.m4a
389130 ./tests/data/acodec/alac.m4a 389166 ./tests/data/acodec/alac.m4a
64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/alac.acodec.out.wav 64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/alac.acodec.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400

View File

@ -1,4 +1,4 @@
9686b93d1439fc2df991a004ab0298f4 *./tests/data/acodec/pcm_s16be.mov aeec610f33d8eec7031c5c6a9aab4cc0 *./tests/data/acodec/pcm_s16be.mov
1058993 ./tests/data/acodec/pcm_s16be.mov 1059029 ./tests/data/acodec/pcm_s16be.mov
64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s16be.acodec.out.wav 64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s16be.acodec.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400

View File

@ -1,4 +1,4 @@
22c5c3df0a4765e28c205a4fb95b3cdc *./tests/data/acodec/pcm_s24be.mov 9ea74aa6d09fcfe9a1e232efecfb07fe *./tests/data/acodec/pcm_s24be.mov
1588193 ./tests/data/acodec/pcm_s24be.mov 1588229 ./tests/data/acodec/pcm_s24be.mov
64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s24be.acodec.out.wav 64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s24be.acodec.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400

View File

@ -1,4 +1,4 @@
b36ac7a1b4fc28248a565a676e555bd1 *./tests/data/acodec/pcm_s32be.mov 25535c11babbc971b6a958e92feaee37 *./tests/data/acodec/pcm_s32be.mov
2117393 ./tests/data/acodec/pcm_s32be.mov 2117429 ./tests/data/acodec/pcm_s32be.mov
64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s32be.acodec.out.wav 64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm_s32be.acodec.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400

View File

@ -1,4 +1,4 @@
b78d2a30df75af08ecf86f201281fec2 *./tests/data/acodec/pcm_s8.mov d63813e9255a74324ea4559d6a8a1f7c *./tests/data/acodec/pcm_s8.mov
529793 ./tests/data/acodec/pcm_s8.mov 529829 ./tests/data/acodec/pcm_s8.mov
651d4eb8d98dfcdda96ae6c43d8f156b *./tests/data/pcm_s8.acodec.out.wav 651d4eb8d98dfcdda96ae6c43d8f156b *./tests/data/pcm_s8.acodec.out.wav
stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400 stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400

View File

@ -1,3 +1,3 @@
6706bb7887aa828a0a734552c3d9fc40 *./tests/data/lavf/lavf.mov 93ed3b20190daa51aeb19f62f939d04a *./tests/data/lavf/lavf.mov
357749 ./tests/data/lavf/lavf.mov 357821 ./tests/data/lavf/lavf.mov
./tests/data/lavf/lavf.mov CRC=0x2f6a9b26 ./tests/data/lavf/lavf.mov CRC=0x2f6a9b26

View File

@ -1,4 +1,4 @@
b0c02b4f7ce6b57668e54970443f9a42 *./tests/data/vsynth1/dnxhd-1080i.mov d2621659037803a30b77e3d4f87eb733 *./tests/data/vsynth1/dnxhd-1080i.mov
3031859 ./tests/data/vsynth1/dnxhd-1080i.mov 3031895 ./tests/data/vsynth1/dnxhd-1080i.mov
0c651e840f860592f0d5b66030d9fa32 *./tests/data/dnxhd_1080i.vsynth1.out.yuv 0c651e840f860592f0d5b66030d9fa32 *./tests/data/dnxhd_1080i.vsynth1.out.yuv
stddev: 6.29 PSNR: 32.15 MAXDIFF: 64 bytes: 760320/ 7603200 stddev: 6.29 PSNR: 32.15 MAXDIFF: 64 bytes: 760320/ 7603200

View File

@ -1,4 +1,4 @@
859c8b545c1c702343d201836833ce23 *./tests/data/vsynth1/odivx.mp4 f32960be0f05be8b2ed03447e1eaea6f *./tests/data/vsynth1/odivx.mp4
539960 ./tests/data/vsynth1/odivx.mp4 539996 ./tests/data/vsynth1/odivx.mp4
8828a375448dc5c2215163ba70656f89 *./tests/data/mpeg4.vsynth1.out.yuv 8828a375448dc5c2215163ba70656f89 *./tests/data/mpeg4.vsynth1.out.yuv
stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200 stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
6484056f2f99410c20a0d987d0255a1d *./tests/data/vsynth1/prores.mov 062e1f5ec6ebdbc43ee69e0393221866 *./tests/data/vsynth1/prores.mov
5022759 ./tests/data/vsynth1/prores.mov 5022795 ./tests/data/vsynth1/prores.mov
a2e2d1d45341a94ff994d1d92629f778 *./tests/data/prores.vsynth1.out.yuv a2e2d1d45341a94ff994d1d92629f778 *./tests/data/prores.vsynth1.out.yuv
stddev: 2.47 PSNR: 40.27 MAXDIFF: 31 bytes: 7603200/ 7603200 stddev: 2.47 PSNR: 40.27 MAXDIFF: 31 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
92a24c3cb16de8352db01e094c2cab9a *./tests/data/vsynth1/qtrle.mov b67340783a817fe398fd138175c7fa07 *./tests/data/vsynth1/qtrle.mov
15263036 ./tests/data/vsynth1/qtrle.mov 15263072 ./tests/data/vsynth1/qtrle.mov
93695a27c24a61105076ca7b1f010bbd *./tests/data/qtrle.vsynth1.out.yuv 93695a27c24a61105076ca7b1f010bbd *./tests/data/qtrle.vsynth1.out.yuv
stddev: 3.42 PSNR: 37.44 MAXDIFF: 48 bytes: 7603200/ 7603200 stddev: 3.42 PSNR: 37.44 MAXDIFF: 48 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
54651e32f751432fad61acb364de80f5 *./tests/data/vsynth1/qtrlegray.mov f0c3cd26e80674a62683685d0508622a *./tests/data/vsynth1/qtrlegray.mov
5113232 ./tests/data/vsynth1/qtrlegray.mov 5113268 ./tests/data/vsynth1/qtrlegray.mov
29def4aed035ed65d3a89f7d382fccbe *./tests/data/qtrlegray.vsynth1.out.yuv 29def4aed035ed65d3a89f7d382fccbe *./tests/data/qtrlegray.vsynth1.out.yuv
stddev: 25.95 PSNR: 19.85 MAXDIFF: 122 bytes: 7603200/ 7603200 stddev: 25.95 PSNR: 19.85 MAXDIFF: 122 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
e3257e307140bf1c2e117f4ed6131c1c *./tests/data/vsynth1/svq1.mov ebaf85e8743ad1f6c2228d473fe16d83 *./tests/data/vsynth1/svq1.mov
1334171 ./tests/data/vsynth1/svq1.mov 1334207 ./tests/data/vsynth1/svq1.mov
9cc35c54b2c77d36bd7e308b393c1f81 *./tests/data/svq1.vsynth1.out.yuv 9cc35c54b2c77d36bd7e308b393c1f81 *./tests/data/svq1.vsynth1.out.yuv
stddev: 9.58 PSNR: 28.50 MAXDIFF: 210 bytes: 7603200/ 7603200 stddev: 9.58 PSNR: 28.50 MAXDIFF: 210 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
4841132b013b373862ee5b9c4dc7592c *./tests/data/vsynth2/dnxhd-1080i.mov af3b282a2194a7e2748df7684330728a *./tests/data/vsynth2/dnxhd-1080i.mov
3031859 ./tests/data/vsynth2/dnxhd-1080i.mov 3031895 ./tests/data/vsynth2/dnxhd-1080i.mov
3c559af629ae0a8fb1a9a0e4b4da7733 *./tests/data/dnxhd_1080i.vsynth2.out.yuv 3c559af629ae0a8fb1a9a0e4b4da7733 *./tests/data/dnxhd_1080i.vsynth2.out.yuv
stddev: 1.31 PSNR: 45.77 MAXDIFF: 23 bytes: 760320/ 7603200 stddev: 1.31 PSNR: 45.77 MAXDIFF: 23 bytes: 760320/ 7603200

View File

@ -1,4 +1,4 @@
f11f53931a1374acff6c04a21517809c *./tests/data/vsynth2/odivx.mp4 4d092ca067362a61b9c96f5f12a1ab5a *./tests/data/vsynth2/odivx.mp4
119613 ./tests/data/vsynth2/odivx.mp4 119649 ./tests/data/vsynth2/odivx.mp4
90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.vsynth2.out.yuv 90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.vsynth2.out.yuv
stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200 stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
179b4f654de017fa74b8eaab93d9d2cb *./tests/data/vsynth2/prores.mov 85f16a09120b668d02cb9cce86dfa9b1 *./tests/data/vsynth2/prores.mov
2843998 ./tests/data/vsynth2/prores.mov 2844034 ./tests/data/vsynth2/prores.mov
b5844025c0f4c7c37db702c3213db232 *./tests/data/prores.vsynth2.out.yuv b5844025c0f4c7c37db702c3213db232 *./tests/data/prores.vsynth2.out.yuv
stddev: 1.31 PSNR: 45.77 MAXDIFF: 11 bytes: 7603200/ 7603200 stddev: 1.31 PSNR: 45.77 MAXDIFF: 11 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
998aa370cb23634272c64cc4ae759a9d *./tests/data/vsynth2/qtrle.mov f18ed8321e19a7cadedc3ba32d71e0ea *./tests/data/vsynth2/qtrle.mov
14798223 ./tests/data/vsynth2/qtrle.mov 14798259 ./tests/data/vsynth2/qtrle.mov
98d0e2854731472c5bf13d8638502d0a *./tests/data/qtrle.vsynth2.out.yuv 98d0e2854731472c5bf13d8638502d0a *./tests/data/qtrle.vsynth2.out.yuv
stddev: 1.26 PSNR: 46.10 MAXDIFF: 13 bytes: 7603200/ 7603200 stddev: 1.26 PSNR: 46.10 MAXDIFF: 13 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
19ffbb5fe258dc96fa345b9fbbf7ba51 *./tests/data/vsynth2/qtrlegray.mov 799451fc6215c51fc892a2284721b8e7 *./tests/data/vsynth2/qtrlegray.mov
5111221 ./tests/data/vsynth2/qtrlegray.mov 5111257 ./tests/data/vsynth2/qtrlegray.mov
f63b5ebdfdba750e547c25131b0a3fd1 *./tests/data/qtrlegray.vsynth2.out.yuv f63b5ebdfdba750e547c25131b0a3fd1 *./tests/data/qtrlegray.vsynth2.out.yuv
stddev: 19.42 PSNR: 22.36 MAXDIFF: 72 bytes: 7603200/ 7603200 stddev: 19.42 PSNR: 22.36 MAXDIFF: 72 bytes: 7603200/ 7603200

View File

@ -1,4 +1,4 @@
fdb06a9800712a0bf6941847afcbca57 *./tests/data/vsynth2/svq1.mov 8d5275bf59aac368d5da11d9c34b8cf2 *./tests/data/vsynth2/svq1.mov
766655 ./tests/data/vsynth2/svq1.mov 766691 ./tests/data/vsynth2/svq1.mov
aa03471dac3f49455a33a2b19fda1098 *./tests/data/svq1.vsynth2.out.yuv aa03471dac3f49455a33a2b19fda1098 *./tests/data/svq1.vsynth2.out.yuv
stddev: 3.23 PSNR: 37.93 MAXDIFF: 61 bytes: 7603200/ 7603200 stddev: 3.23 PSNR: 37.93 MAXDIFF: 61 bytes: 7603200/ 7603200