Commit Graph
100 Commits
Author SHA1 Message Date
Kostya Shishkov 8f2aa89a5d mpc8: do not leave padding after last frame in buffer for the next decode call 2012-08-08 09:11:38 +02:00
Kostya Shishkov d3e0766fc0 g723_1: scale output as supposed for the case with postfilter disabled 2012-08-03 07:07:07 +02:00
Kostya Shishkov 94bfdfd6f0 g723_1: increase excitation storage by 4
Fixed codebook mode in 5300 rate may write up to SUBFRAME_LEN + 4 and
that is considered normal by the reference decoder. Without that additional
padding it might overwrite first elements of LPC history.
2012-08-03 07:07:07 +02:00
Kostya Shishkov 802bcdcb2f g723_1: fix upper bound parameter from inverse maximum autocorrelation 2012-08-03 07:07:07 +02:00
Kostya Shishkov 8ddadea171 g723_1: make scale_vector() behave like the reference 2012-08-03 07:07:07 +02:00
Kostya Shishkov 8772d2511a g723_1: fix off-by-one error in normalize_bits() 2012-08-03 07:07:07 +02:00
Kostya Shishkov 7f92db14f9 g723_1: save/restore excitation with offset to store LPC history
The same buffer with saved data is used later in LPC reconstruction, so
it should have some head space for LPC history.
2012-08-03 07:07:06 +02:00
Kostya Shishkov 0cf7d849ff tscc2: fix typo in array index 2012-07-27 07:34:38 +02:00
Kostya Shishkov 1470ce21ce Bump libavcodec and libavformat minor versions for G.723.1 decoder and demuxer 2012-07-22 08:43:12 +02:00
Kostya Shishkov 4cfb0d871d tscc2: do not add/subtract 128 bias during DCT
It turns out that the reference decoder subtracts 128 from DC during block
decode but adds it back during reordering block with zigzag pattern.
Transforming block with incorrect DC caused heavy visual artifacts for
many quantisers.
2012-07-18 07:05:59 +02:00
Kostya Shishkov 3c6c19184c tscc2: fix typo in DCT 2012-07-18 07:05:53 +02:00
Kostya Shishkov 0b40153d20 tscc2: DCT output should not be clipped
This fixes decoding some TSCC2 files with large quantisers.
2012-07-17 07:21:24 +02:00
Kostya Shishkov 5b7e3a195d MS Expression Encoder Screen decoder 2012-07-13 06:59:48 +02:00
Kostya Shishkov 781888da89 TechSmith Screen Codec 2 decoder 2012-07-11 07:29:05 +02:00
Kostya Shishkov ed219ed366 mss1: fix decoding masked regions in interframes
Spotted by Alberto Delmás
2012-07-10 13:58:05 +02:00
Kostya Shishkov 5467742232 mss3: use standard zigzag table 2012-07-09 18:17:51 +02:00
Kostya Shishkov acfb6b6cf8 mss3: split DSP functions that are used in MTS2(MSS4) into separate file 2012-07-09 18:17:51 +02:00
Kostya Shishkov 1f061da529 mss3: add forgotten 'static' qualifier for private table 2012-07-06 11:37:35 +02:00
Kostya Shishkov edf35d8342 MS ATC Screen (aka MSS3) decoder 2012-07-02 07:14:44 +02:00
Kostya Shishkov 15358ade15 mss1: validate number of changeable palette entries 2012-06-27 18:05:58 +02:00
Kostya Shishkov 8f5d573a83 mss1: report palette changed when some additional colours were decoded 2012-06-27 18:05:58 +02:00
Kostya Shishkov 005c80b645 MS Screen 1 decoder 2012-06-20 19:08:10 +02:00
Kostya Shishkov 19be0f3ca6 iac: add missing dependency 2012-06-10 06:50:10 +02:00
Kostya Shishkov cac4760bf4 iac: generate codec tables as they are supposed to be
Unlike its predecessor, Indeo Audio codec generates tables depending on
sampling rate. Previously decoder used pre-generated tables for 22050 Hz
which obviously doesn't work with other frequencies.

Many thanks to Maxim Poliakovsky for providing all needed information
for this.
2012-06-09 08:38:51 +02:00
Kostya Shishkov e1a3fa5d3a indeo4: handle frame type 1 properly
It turns out that this frame type is actually intra and should be used as
a reference for interframes too.
2012-06-09 08:38:31 +02:00
Kostya Shishkov c6061443f7 Indeo Audio decoder 2012-06-05 18:30:54 +02:00
Kostya Shishkov 34271cabac imc: make IMDCT support stereo output
This will be useful for Indeo Audio decoder which is almost the same
but supports stereo.
2012-06-05 18:28:44 +02:00
Kostya Shishkov c45e2da617 imc: move channel-specific data into separate context
This will be useful for Indeo Audio decoder which is almost the same
but supports stereo.
2012-06-05 18:28:44 +02:00
Kostya Shishkov b56825c40e mpc8: fix maximum bands handling
In Musepack SV8 codec property tell the maximum nonzero band, but every
frame codes maximum band as a limit (i.e. strictly less than given value).
Synthesis also expects maximum nonzero band, so there's a need to convert
frame maximum band limit value.
2012-06-05 06:55:57 +02:00
Kostya Shishkov 96fadfb158 bmv: add stricter checks for invalid decoded length
This makes decoder handle random data passed as BMV frame data.
2012-06-03 15:26:11 +02:00
Kostya Shishkov d073f122ea imc: some cosmetics 2012-05-25 20:18:02 +02:00
Kostya Shishkov f05b69a79f fix typo in comment 2012-05-20 14:15:14 +02:00
Kostya Shishkov cf61aaaca1 indeo: check for invalid motion vectors 2012-05-20 11:19:48 +02:00
Kostya Shishkov 9603738221 indeo: check that band output buffer exists 2012-05-20 11:19:48 +02:00
Kostya Shishkov 23ba1503f2 indeo: clear allocated band buffers 2012-05-20 11:19:48 +02:00
Kostya Shishkov a6e4ac40a6 indeo: track tile macroblock size 2012-05-20 11:19:48 +02:00
Kostya Shishkov fe7a37c36f indeo: check custom Huffman tables for errors 2012-05-20 11:19:47 +02:00
Kostya Shishkov aa372cf470 factor out common decoding code for Indeo 4 and Indeo 5 2012-05-20 11:19:30 +02:00
Kostya Shishkov b37d945dd4 mp3: fix start band index for block type 2 in 8kHz audio
In hybrid frames long window part ends at 36 samples for most of the cases
but at 72 for 8kHz case. For some reason decoder assumed it's 48 or even 36
samples, which caused wrong bitstream decoding for such blocks.

l3_25207.mpg from conformance suite demonstrates it the best.
2012-05-20 10:53:21 +02:00
Kostya Shishkov 6de226a2b8 indeo3: validate new frame size before resetting decoder 2012-05-15 19:05:39 +02:00
Kostya Shishkov bc00da2701 indeo3: when freeing buffers, set pointers referencing them to NULL as well 2012-05-15 19:05:39 +02:00
Kostya Shishkov 81064a8045 indeo3: initialise pixel planes on allocation
This prevents decoder from reading garbage from it in case of errors later.
2012-05-15 19:05:39 +02:00
Kostya Shishkov fc417db3f1 indeo3: ensure that decoded cell data is in 7-bit range as presumed by decoder 2012-05-15 19:05:39 +02:00
Kostya Shishkov 464e9ab011 lagarith: add YUY2 decoding support
Unlike other variants, for YUY2 we need to use different prediction:
* on line 0 for luma we should left predict starting from the second pixel
* on line 1 we should left predict first 4 pixels for luma and 2 for chroma
* median prediction employed here is taken directly from HuffYUV
2012-05-08 07:24:31 +02:00
Kostya Shishkov fb5c1aaea6 dfa: use more meaningful return codes 2012-05-06 19:18:27 +02:00
Kostya Shishkov a390aa0ea4 eatgv: check motion vectors 2012-05-06 19:17:32 +02:00
Kostya Shishkov 1fdb5649d9 lagarith: make offset array type unsigned
This is logical and also fixes checking for the fourth plane offset.
2012-05-06 09:32:08 +02:00
Kostya Shishkov 8099187e89 dfa: add some checks to ensure that decoder won't write past frame end 2012-05-06 09:31:52 +02:00
Kostya Shishkov 0e23b50821 wmall: fix reconstructing audio with uncoded channels 2012-05-02 18:46:11 +02:00
Kostya Shishkov 83632cbb11 proresenc: multithreaded quantiser search 2012-04-17 07:43:59 +02:00
Kostya Shishkov a05c41acd1 mp3dec: perform I/S and M/S only when frame mode is joint stereo.
Looks like some LAME versions produce dual stereo mode MP3s with
flags for intensity and middle stereo set. In this mode those flags
should be ignored like the reference decoder and derived ones do.
2012-03-29 19:08:05 +02:00
Kostya Shishkov f704eb612b id3v2: add another mimetype for JPEG image 2012-03-29 15:49:06 +02:00
Kostya Shishkov 72dadaa957 utvideo: mark output picture as keyframe.
Spotted by Антон.
2012-03-24 20:21:33 +01:00
Kostya Shishkov 494bce6224 ralf: read Huffman code lengths without GetBitContext
Those descriptions are stored in nibbles, so they are easy to extract.
And this way we don't need to pad tables for possible bit reader overreads.
2012-03-24 11:53:26 +01:00
Kostya Shishkov 87818103a0 wmall: output packet only if we have decoded some samples
Also set CODEC_CAP_DELAY to indicate that decoder may still have some
undecoded data left in internal buffer.
2012-03-22 07:16:47 +01:00
Kostya Shishkov 1d10afd581 bink: fix typo in FFALIGN() argument 2012-03-20 18:57:51 +01:00
Kostya Shishkov 8ae28ac0f3 bink: align plane width to 8 when calculating bundle sizes
This fixes decoding of Bink files with non-multiple-of-16 width.
2012-03-20 16:33:57 +01:00
Kostya Shishkov 18ba94c6f9 fix space type in Changelog 2012-03-19 19:22:18 +01:00
Kostya Shishkov b8560637d9 RealAudio Lossless decoder 2012-03-19 18:46:34 +01:00
Kostya Shishkov bb39bd195a zmbv: check decompress result
Changing flush type from Z_FINISH is needed since encoder compresses fixed
amount of data and doesn't care about writing end of stream marker.
2012-03-19 09:21:05 +01:00
Kostya Shishkov afc2263bcc zmbv: correct indentation 2012-03-19 09:20:39 +01:00
Kostya Shishkov 6acac061ab prores: allow user to set fixed quantiser 2012-03-18 08:04:15 +01:00
Kostya Shishkov 681e726865 dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2 2012-03-08 07:16:01 +01:00
Kostya Shishkov 4db4b53dc8 proresenc: give user a possibility to alter some encoding parameters
This allows user to select quantisation matrix from different profile,
stamp frames with custom vendor string and change target bitrate.
2012-03-04 07:35:00 +01: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
Kostya Shishkov 6d702dc072 proresenc: force bitrate not to exceed given limit
Apple ProRes Format Specifications mentions target data size for every frame,
so make sure frame meets it. This also allows encoder to demand much smaller
packet sizes for output.
2012-02-18 18:34:01 +01:00
Kostya Shishkov 5d9ad5425f prores: initialise encoder and decoder parts only when needed 2012-02-17 14:11:48 +01:00
Kostya Shishkov 17b11ffec7 proresenc: initialise 'sign' variable 2012-02-16 06:48:24 +01:00
Kostya Shishkov 1a265f6187 prores encoder 2012-02-15 07:14:51 +01:00
Kostya Shishkov 8835c2c829 prores: move data shared between decoder and encoder to common file 2012-02-15 07:14:45 +01:00
Kostya Shishkov 3ec623c22f prores: fix multithreaded decoding case when slice quantisers are not the same
Since quantisation matrices are stored in context, decoding slices with
different quantisers in parallel leads to unpredictable content of
aforementioned matrices and wrong output picture thereof.
2012-02-15 07:14:35 +01:00
Kostya Shishkov e6e7bfc11e wavpack: fix clipping for 32-bit lossy mode
Reference decoder clips data before shifting it to final range and also
forces 32-bit lossy mode to be actually 24-bit lossy mode in order to be
able to perform proper clipping.
2012-01-15 15:27:55 +01:00
Kostya Shishkov 08bab32cf1 indeo4: add some missing static and const qualifiers
From the patch by Reimar Döffinger.
2012-01-12 13:54:41 +01:00
Kostya Shishkov 490dcda6b6 utvideo: proper median prediction for interlaced videos 2012-01-03 17:08:49 +01:00
Kostya Shishkov 1fbd3d30ae indeo4: remove two unused variables 2011-12-29 17:42:31 +01:00
Kostya Shishkov adfe0c942e Indeo 4 decoder
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2011-12-28 15:22:18 +01:00
Kostya ShishkovandAnton Khirnov 19341c58e0 Dxtory capture format decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-10 11:58:03 +01:00
Kostya ShishkovandDiego Biurrun 1469f943ad indeo3: cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-11-28 10:01:49 +01:00
Kostya ShishkovandRonald S. Bultje 498605b4ad vc1: select interlaced scan table by FCM element
Interlaced videos can contain progressive frames too and now wrong scantable
is selected for them.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-26 18:14:07 -08:00
Kostya ShishkovandMartin Storsjö ffc638c283 lagarith: add some RGBA decoding support
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-16 10:49:51 +02:00
Kostya ShishkovandMartin Storsjö f545e00677 BMV demuxer and decoder
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-08 00:36:45 +02:00
Kostya ShishkovandAnton Khirnov 66760b30a3 cosmetics: insert some spaces in explicit enum value assignments
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-06 08:13:11 +01:00
Kostya ShishkovandAnton Khirnov 19900d60fd move 8SVX audio codecs to the audio codec list part on the next bump
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-06 08:12:42 +01:00
Kostya ShishkovandAnton Khirnov 0e288b8c52 deprecate codec IDs that won't ever be used
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-06 07:41:58 +01:00
Kostya ShishkovandLuca Barbato 46e1af3b0f utvideo: handle empty Huffman trees
If the frame is filled with the same colour, encoder may produce no data
and the fill value is indicated by zero code length (the rest of symbols
will have 0xFF for code length, meaning invalid).  So such Huffman trees
should be treated specially.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-10-29 12:54:08 -07:00
Kostya ShishkovandRonald S. Bultje 9a173575fd utvideo: account for coupled lines in YUV420 format
Luma slices in YUV420 colourspace should have height in multiple of two since
they have the same line of chrominance data corresponding to pair of them.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-28 23:51:58 -07:00
Kostya ShishkovandAnton Khirnov 0d8506b8c5 Ut Video decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-19 08:24:19 +02:00
Kostya ShishkovandRonald S. Bultje 42feaf4070 vc1: explicitly zero interlaced mode coding variables for progressive mode
Both v->fcm and v->field_mode are used in common code, now they won't be
reset for progressive frame after interlaced one causing writing past the
frame end for example.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-13 07:35:07 -07:00
Kostya ShishkovandDiego Biurrun 50f9721904 vc1: more prettyprinting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-12 17:33:58 +02:00
Kostya ShishkovandDiego Biurrun 94e725ca2b vc1: prettyprint some tables
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-12 17:33:58 +02:00
Kostya ShishkovandDiego Biurrun b18c68ad25 vc1: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-12 17:33:58 +02:00
Kostya ShishkovandDiego Biurrun 109d8aa1e6 vc1: K&R reformatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-10-10 18:35:35 +02:00
Kostya ShishkovandAnton Khirnov 23a1f0c592 rv34: check that subsequent slices have the same type as first one.
This prevents some crashes when corrupted bitstream reports e.g. P-type
slice in I-frame. Official RealVideo decoder demands all slices to be
of the same type too.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-12 15:51:30 +02:00
Kostya ShishkovandAnton Khirnov 47a8589f7b smacker demuxer: handle possible av_realloc() failure.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-12 15:51:21 +02:00
Kostya ShishkovandLuca Barbato bcd4aa8bec wavpack: fix wrong return value in wavpack_decode_block()
This function should return number of samples decoded, not number of bytes
decoded.
Spotted by Uoti Urpala.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-09-05 12:44:26 +02:00
Kostya ShishkovandAnton Khirnov 9bc4e21a9b wavpack: use context reset in appropriate places
This fixes improper flushing in the cases when the same frame is decoded in
several iterations (for being too large to fit into output buffer) and flush is
called mid-decoding and it also resets context in case of decoding errors.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-05 11:18:27 +02:00
Kostya ShishkovandMans Rullgard a80852316e RV40: reuse some H.264 motion compensation functions in RV40.
Since RV40 is based on H.264, it uses the same interpolation filters and
functions for halfpel interpolation in one direction can be reused.
Unfortunately other cases are implemented differently and produce slightly
different output because of rounding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-08-30 12:04:46 +01:00
Kostya ShishkovandAnton Khirnov 10397215aa Use deinterleavers for demangling audio packets in RealMedia.
Unlike other containers RealMedia stores its audio packets in scrambled form,
with interleaver ID preceeding audio codec ID. Currently deinterleaving
decision is tied to the codec while it's possible to have non-default
deinterleaver with audio codec (like Int0 deinterleaver instead of specific
one for Sipro).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-27 17:23:45 +02:00
Kostya ShishkovandLuca Barbato ccb919e34b WavPack demuxer: do not rely on index when timestamp is not in indexed range.
This fixes the situation when there are not enough entries in the index
(e.g. on initial seek there's only one index entry in the index) and index
search returns just the last known entry. That causes seeking function just to
seek there instead of trying harder to get at the requested position.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-21 12:55:17 +02:00