Commit Graph

311 Commits

Author SHA1 Message Date
Anton Khirnov
27c7ca9c12 lavf: deobfuscate read_frame_internal().
Split off packet parsing into a separate function. Parse full packets at
once and store them in a queue, eliminating the need for tracking
parsing state in AVStream.

The horrible unreadable loop in read_frame_internal() now isn't weirdly
ordered and doesn't contain evil gotos, so it should be much easier to
understand.

compute_pkt_fields() now invents slightly different timestamps for two
raw vc1 tests, due to has_b_frames being set a bit later. They shouldn't
be more wrong (or right) than previous ones.
2012-03-05 18:47:05 +01:00
Derek Buitenhuis
6aa6e3e814 fate: Add sunrast regression test
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-03 20:57:03 -05:00
Justin Ruggles
51ddf35c90 wmaenc: fix m/s stereo encoding for the first frame
We need to set ms_stereo in encode_init() in order to avoid incorrectly
encoding the first frame as non-m/s while flagging it as m/s. Fixes an
uncomfortable pop in the left channel at the start of playback.

CC:libav-stable@libav.org
2012-03-03 18:20:10 -05:00
Justin Ruggles
f9cf91d822 tiertexseq: set audio stream start time to 0
Update FATE test to reflect delayed video due to the file having audio-only
frames prior to the first frame with video.
2012-03-03 17:03:27 -05:00
Justin Ruggles
0883109b27 voc/avs: Do not change the sample rate mid-stream.
Also, set the time base based on the sample rate.
lavf-voc seek test updated to reflect slightly different seek points.
2012-03-03 17:03:27 -05:00
Justin Ruggles
d0ab585074 vqf: set packet duration
Fixes timestamp calculation.
The FATE reference is updated because timestamp calculations are now more
accurate. Previous timestamps were based on average bit rate.
2012-03-03 17:03:26 -05:00
Justin Ruggles
0b8b7db01b mpegaudio_parser: do not ignore information from the first parsed frame
Update some demuxing and seeking fate tests.
2012-03-03 17:03:26 -05:00
Martin Storsjö
b087ce2bee g722: Fix the QMF scaling
This fixes clipping if the encoder input used the full 16 bit
input range (samples with a magnitude below 16383 worked fine).
The filtered subband samples should be 15 bit maximum, while
the code earlier produced them scaled to 16 bit.

This makes the decoder output have double the magnitude
compared to before.

The spec reference samples doesn't test the QMF at all, which
was why this part slipped past initially.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-02 18:58:19 +02:00
Anton Khirnov
efec3bc65a electronicarts: set timebase for tgv video.
The container has no timestamps and the framerate isn't stored in the
data either.
The decoder sets codec timebase to experimentally found value 1/15. Do
the same for the demuxer too, it should at least be better than the
default 1/90000.
2012-03-02 11:11:38 +01:00
Anton Khirnov
e39400c3a8 electronicarts: parse the framerate for cmv video. 2012-03-02 11:11:38 +01:00
Anton Khirnov
1d3144c318 electronicarts: don't set codec timebase
Demuxers are not supposed to set it.
Set stream timebase and framerates instead (this is a cfr container with
no timestamps).
2012-03-02 11:11:38 +01:00
Justin Ruggles
f240df6a74 FATE: do not decode audio in the nuv test.
We already have sufficient coverage for 16-bit pcm.
2012-02-29 15:45:50 -05:00
Paul B Mahol
31b132c094 fate: add cdxl test for bit line plane arrangement
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-29 15:11:05 -05:00
Martin Storsjö
85b221e4d3 dpxenc: Don't include the libavcodec ident if bitexact mode is enabled
This avoids breaking fate every time the lavc version is bumped.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-29 20:08:09 +02:00
Kostya Shishkov
12b812d2e5 prores: store and retrieve extended colourspace information
Based on the patch by Phil Barrett.
2012-02-29 09:29:02 +01:00
Kostya Shishkov
235d693286 prores: handle 444 chroma in right order
ProRes codes chroma blocks in 444 mode in different order than luma blocks,
so make both decoder and encoder read/write chroma blocks in right order.

Reported by Phil Barrett
2012-02-29 09:28:34 +01:00
Anton Khirnov
63efd83ae1 mpegvideo_enc: add chroma/luma_elim_threshold private options.
Deprecate corresponding AVCodecContext fields.
2012-02-29 07:23:31 +01:00
Derek Buitenhuis
273f4b39fc fate: Overhaul WavPack coverage
WavPack has a comprehensive test suite, and a bunch
of corner cases.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-27 09:40:36 -08:00
Anton Khirnov
7929e22bde lavf: don't guess r_frame_rate from either stream or codec timebase.
Neither of those is guaranteed to be connected to framerate in any way
(if it even exists).

Fixes bug 56.
2012-02-26 19:32:33 +01:00
Anton Khirnov
832ba44d8d avconv: saner output video timebase.
r_frame_rate should in theory have something to do with input framerate,
but in practice it is often made up from thin air by lavf. So unless we
are targeting a constant output framerate, it's better to just use input
stream timebase.

Brings back dropped frames in nuv and cscd tests introduced in
cd1ad18a65
2012-02-26 07:48:45 +01:00
Anton Khirnov
87d7a92b62 rawdec: set timebase to 1/fps. 2012-02-26 07:30:21 +01:00
Paul B Mahol
159a2436b0 fate: add tests for cdxl video
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-25 00:18:24 -05:00
Anton Khirnov
0584e3ca97 lavf: don't set AVCodecContext.has_b_frames in compute_pkt_fields().
It is not supposed to be done outside lavc.

This is basically a revert of 818062f2f3.

It is unclear what issue this was supposed to fix, if it reappears again
it will have to be fixed in a more proper place.

The wtv-demux test change is because the sample starts with a B-frame.
2012-02-22 19:31:06 +01:00
Reimar Döffinger
2c87c7a952 Add prores regression test.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-21 14:42:30 -05:00
Reimar Döffinger
a86ca94615 Enable already existing rso regression test.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-21 14:42:30 -05:00
Reimar Döffinger
ecdb31caf2 Add regression test for "sox" format muxer/demuxer.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-21 14:42:30 -05:00
Carl Eugen Hoyos
8ee2ddcb2a Add dpx encoding regression test.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-21 14:42:30 -05:00
Justin Ruggles
770a5c6d02 adpcmenc: Use correct frame_size for Yamaha ADPCM.
Output packet size should match avctx->block_align. The target output packet
size is 1024 bytes.
Before:
mono   - 1024 samples -> 512 bytes
stereo - 2048 samples -> 2048 bytes
After:
mono   - 2048 samples -> 1024 bytes
stereo - 1024 samples -> 1024 bytes
2012-02-20 15:52:32 -05:00
Justin Ruggles
c9fdf3241a bethsoftvid: synchronize video timestamps with audio sample rate
According to unofficial documentation, the video rate is locked to the audio
sample rate. This results in proper synchronization of audio and video
timestamps from the demuxer. This only works if the first audio packet occurs
before the first video packet or the audio sample rate is the default rate of
11111 Hz, both of which are true for all samples in our archive.
2012-02-16 10:47:11 -05:00
Justin Ruggles
9546f331c6 bethsoftvid: Set video packet duration instead of accumulating pts. 2012-02-16 10:47:11 -05:00
Justin Ruggles
f320fb894c bethsoftvid: pass palette in side data instead of in a separate packet.
Update FATE reference to account for now non-existent palette packet.
This also fixes the FATE test if frame data is not initialized in
get_buffer(), so update comment in avconv accordingly.
2012-02-16 10:47:11 -05:00
Aneesh Dogra
186dcbcb50 sunrast: Add fate test for gray8.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-02-13 22:29:22 +01:00
Anton Khirnov
177bb4bf50 cljr: set the properties of the coded_frame, not input frame. 2012-02-12 08:05:38 +01:00
Justin Ruggles
b498867d66 FATE: update reference for seek-alac_mp4
This should have been updated in b590f3a7bf.
2012-02-11 16:41:01 -05:00
Justin Ruggles
b590f3a7bf alacenc: only encode frame size in header for a final smaller frame
Otherwise it is not needed because it matches the frame size as encoded in
the extradata.
2012-02-11 12:49:22 -05:00
Anton Khirnov
cd1ad18a65 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.
2012-02-08 21:51:24 +01:00
Anton Khirnov
1270e12e49 avconv: rework -t handling for encoding.
Current code compares the desired recording time with InputStream.pts,
which has a very unclear meaning. Change the code to use actual
timestamps of the frames passed to the encoder.

In several tests, one less frame is encoded, which is more correct.

In the idroq test one more frame is encoded, which is again more
correct.

Behavior with stream copy should be unchanged.
2012-02-07 20:11:11 +01:00
Anton Khirnov
4be1d7dc20 pva-demux test: add -vn
The output is obviously not supposed to contain video (since only
-acodec copy is specified), but that only happens because of the way -t
handling is implemented currently.
2012-02-07 20:06:57 +01:00
Anton Khirnov
d2afbd9a56 frame{crc/md5}: set the stream timebase from codec timebase.
Right now those muxers use the default timebase in all cases(1/90000).

This patch avoid unnecessary rescaling and makes the printed timestamps
more readable.

Also, extend the printed information to include the timebases and packet
pts/duration and align the columns.

Obviously changes the results of all fate tests which use those two
muxers.
2012-02-03 09:29:02 +01:00
Mans Rullgard
2c98f407c8 fate: make acodec-ac3_fixed test output raw AC3
There is no point in this test using the RM format.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-02-02 14:31:54 +00:00
Justin Ruggles
c3a06615bd bethsoftvideo: fix palette reading.
Return the correct number of consumed bytes and set *data_size = 0.
Returned size is 1 too small, leading to that 1 byte being read as the next
frame, which results in an extra blank frame at the beginning of the stream.
2012-02-01 19:41:39 -05:00
Janne Grunau
e67e3a3f4a fate-golomb: extend golomb-test to get_ue_golomb_long()
get_ue_golomb_long() is only tested for values up to 2^15 - 2 since
we can not write larger values.
Silence the test on success and return a non-zero value on error.
Use an heap scratch buffer instead of large stack buffer.
Remove unneeded includes.
2012-02-01 01:18:55 +01:00
Diego Biurrun
52afc97168 fate: add golomb-test 2012-01-31 19:56:13 +01:00
Anton Khirnov
7063b6eaee lavc: increase major version to 54.
The lavf-ffm test results change because ffmenc writes
AVCodecContext.flags/flags2 and the defaults for those change.
2012-01-27 10:38:30 +01:00
Alex Converse
08628b6afb Revert "sws/pixfmt/pixdesc: add support for yuva444p"
This reverts commit fc115c80b7.

Tests are broken.
2012-01-26 18:06:57 -08:00
Paul B Mahol
fc115c80b7 sws/pixfmt/pixdesc: add support for yuva444p
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-27 09:24:08 +08:00
Paul B Mahol
7de9af65c7 fate: add XWD image regression test
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-26 01:51:26 +01:00
Janne Grunau
f028d4d1c3 mxfdec: hybrid demuxing/seeking solution
This uses the old demuxing code for OP1a and separate demuxing code for OPAtom.
Timestamp output is added to the old demuxing code.

The seeking code is made to seek to the start of the desired EditUnit only,
from which the normal demuxing code takes over (if OP1a). This means we
do not use delta entries or slices, only StreamOffsets. OPAtom seeking
basically works like before.

This also makes D-10 seeking behave the same way as OP1a and OPAtom. In other
words, we allow seeking before the start or past the end for D-10 too.

Based on several patches by Tomas Härdin <tomas.hardin@codemill.se> and
Reimar Döffinger <Reimar.Doeffinger@gmx.de>.

Changed av_calloc to av_mallocz, added overflow checks.
2012-01-22 14:40:53 +01:00
Diego Biurrun
395e6402fe fate: Give some tests more sensible names. 2012-01-19 00:45:06 +01:00
Justin Ruggles
4c82c6d993 FATE: convert output to rgba for the targa tests which currently output pal8
fixes the tests on big-endian systems
2012-01-13 18:40:12 -05:00