rawenc: switch to encode2().
authorAnton Khirnov <anton@khirnov.net>
Wed, 1 Feb 2012 14:33:51 +0000 (15:33 +0100)
committerAnton Khirnov <anton@khirnov.net>
Wed, 8 Feb 2012 20:51:24 +0000 (21:51 +0100)
commitcd1ad18a6539bd7fc2dc4c1740fbcbd498c0c0a2
treeeb85df8829ca31607cf4a6b7093121043c493110
parent38d553322891c8e47182f05199d19888422167dc
rawenc: switch to encode2().

This changes a number of FATE results, since before this commit, the
timestamps in all tests using rawenc were made up by lavf.

In most cases, the previous timestamps were completely bogus.

In some other cases -- raw formats, mostly h264 -- the new timestamps
are bogus as well. The only difference is that timestamps invented by
the muxer are replaced by timestamps invented by the demuxer.

cscd     -- avconv sets output codec timebase from r_frame_rate
and r_frame_rate is in this case some guessed number 31.42 (377/12),
which is not accurate enough to represent all timestamps. This results
in some frames having duplicate pts. Therefore, vsync 0 needs to be
changed to vsync 2 and avconv drops two frames. A proper fix in the
future would be to set output timebase to something saner in avconv.

nuv      -- previous timestamps for video were wrong AND the cscd
comment applies, one frame is dropped.

vp8-signbias -- the file contains two frames with identical timestamps,
so -vsync 0 needs to be removed/changed to -vsync 2 and avconv drops one
frame.

vc1-ism -- apparrently either the demuxer lies about timestamps or the
file is broken, since dts == pts on all packets, but reordering clearly
takes place.
72 files changed:
libavcodec/rawenc.c
tests/fate/screen.mak
tests/fate/video.mak
tests/fate/vpx.mak
tests/ref/fate/bethsoft-vid
tests/ref/fate/cscd
tests/ref/fate/deluxepaint-anm
tests/ref/fate/dfa4
tests/ref/fate/ea-cmv
tests/ref/fate/film-cvid-pcm-stereo-8bit
tests/ref/fate/h264-conformance-cabac_mot_fld0_full
tests/ref/fate/h264-conformance-cabac_mot_picaff0_full
tests/ref/fate/h264-conformance-cabref3_sand_d
tests/ref/fate/h264-conformance-cafi1_sva_c
tests/ref/fate/h264-conformance-cama1_vtc_c
tests/ref/fate/h264-conformance-cama2_vtc_b
tests/ref/fate/h264-conformance-cama3_vtc_b
tests/ref/fate/h264-conformance-capa1_toshiba_b
tests/ref/fate/h264-conformance-capama3_sand_f
tests/ref/fate/h264-conformance-cavlc_mot_fld0_full_b
tests/ref/fate/h264-conformance-cavlc_mot_picaff0_full_b
tests/ref/fate/h264-conformance-cvfi1_sony_d
tests/ref/fate/h264-conformance-cvfi1_sva_c
tests/ref/fate/h264-conformance-cvfi2_sony_h
tests/ref/fate/h264-conformance-cvfi2_sva_c
tests/ref/fate/h264-conformance-cvmapaqp3_sony_e
tests/ref/fate/h264-conformance-cvmp_mot_fld_l30_b
tests/ref/fate/h264-conformance-cvmp_mot_frm_l31_b
tests/ref/fate/h264-conformance-cvnlfi1_sony_c
tests/ref/fate/h264-conformance-cvnlfi2_sony_h
tests/ref/fate/h264-conformance-cvpa1_toshiba_b
tests/ref/fate/h264-conformance-fi1_sony_e
tests/ref/fate/h264-conformance-frext-bcrm_freh10
tests/ref/fate/h264-conformance-frext-brcm_freh11
tests/ref/fate/h264-conformance-frext-brcm_freh4
tests/ref/fate/h264-conformance-frext-freh6
tests/ref/fate/h264-conformance-frext-freh7_b
tests/ref/fate/h264-conformance-frext-frext2_panasonic_b
tests/ref/fate/h264-conformance-frext-frext4_panasonic_a
tests/ref/fate/h264-conformance-frext-hcaff1_hhi_b
tests/ref/fate/h264-conformance-frext-hpcafl_bcrm_c
tests/ref/fate/h264-conformance-frext-hpcaflnl_bcrm_c
tests/ref/fate/h264-conformance-frext-hpcamapalq_bcrm_b
tests/ref/fate/h264-conformance-frext-hpcvfl_bcrm_a
tests/ref/fate/h264-conformance-frext-hpcvflnl_bcrm_a
tests/ref/fate/h264-conformance-mr3_tandberg_b
tests/ref/fate/h264-conformance-mr6_bt_b
tests/ref/fate/h264-conformance-mr7_bt_b
tests/ref/fate/h264-conformance-mr8_bt_b
tests/ref/fate/h264-conformance-mr9_bt_b
tests/ref/fate/h264-conformance-sharp_mp_field_1_b
tests/ref/fate/h264-conformance-sharp_mp_field_2_b
tests/ref/fate/h264-conformance-sharp_mp_field_3_b
tests/ref/fate/h264-conformance-sharp_mp_paff_1r2
tests/ref/fate/h264-conformance-sharp_mp_paff_2r
tests/ref/fate/mimic
tests/ref/fate/mpeg2-field-enc
tests/ref/fate/nuv
tests/ref/fate/quickdraw
tests/ref/fate/real-rv40
tests/ref/fate/sierra-vmd
tests/ref/fate/tiertex-seq
tests/ref/fate/tscc-32bit
tests/ref/fate/vc1-ism
tests/ref/fate/vc1_sa00040
tests/ref/fate/vc1_sa00050
tests/ref/fate/vc1_sa10091
tests/ref/fate/vc1_sa20021
tests/ref/fate/vmnc-32bit
tests/ref/fate/vp8-sign-bias
tests/ref/fate/wmv8-drm
tests/ref/lavf/gxf