Commit Graph
100 Commits
Author SHA1 Message Date
Kostya ShishkovandMartin Storsjö f399e406af altivec: perform an explicit unaligned load
Implicit vector loads on POWER7 hardware can use the VSX
instruction set instead of classic Altivec/VMX. Let's force
a VMX load in this case.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-16 10:08:47 +03:00
Kostya Shishkov 3e5898782d Voxware MetaSound decoder 2013-08-08 10:52:44 +02:00
Kostya Shishkov f544c58636 deprecate AV_CODEC_ID_VOXWARE and introduce AV_CODEC_ID_METASOUND instead
Voxware is the name of company, it has produced several audio codecs e.g.
MetaVoice family and MetaSound.
2013-08-07 10:56:18 +02:00
Kostya ShishkovandDiego Biurrun 86f4c59bd6 twinvq: Split VQF-specific part from common TwinVQ decoder core
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-08-05 20:59:23 +02:00
Kostya ShishkovandDiego Biurrun bc909626b0 twinvq: move all bitstream reading into single place
This is required for the future addition of VoxWare MetaSound decoder, for its
functions are mostly the same but bitstream reader is completely different
and bitstream format is slightly different too.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-08-05 19:37:47 +02:00
Kostya Shishkov 410066986f aic: use chroma scan tables while decoding luma component in progressive mode
For some unclear reason Apple decided to use the same scan tables for luma and
chroma in the progressive mode while using different ones for luma in the
interlaced mode.
2013-07-04 12:09:45 +02:00
Kostya ShishkovandLuca Barbato ee16a0ced0 smacker: check frame size validity
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:57:31 +02:00
Kostya ShishkovandLuca Barbato 58c95448e4 smacker: pad the extradata allocation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:57:31 +02:00
Kostya ShishkovandLuca Barbato bbb2945f2d smacker: check the return value of smacker_decode_tree
Also prevent a memory leak.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:56:50 +02:00
Kostya ShishkovandLuca Barbato f52edef301 smacker: fix an off by one in huff.length computation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:55:53 +02:00
Kostya Shishkov 7dfc3381dd g2meet: do not leak buffers 2013-06-12 09:54:45 +02:00
Kostya Shishkov 4d960d7f60 g2meet: more graceful cursor loading 2013-06-12 09:54:45 +02:00
Kostya Shishkov 767ae86cee g2meet: reset dimensions on header parsing errors 2013-06-12 09:54:45 +02:00
Kostya Shishkov 2d66a58ccd Go2Webinar decoder 2013-06-03 09:24:55 +02:00
Kostya Shishkov 31980b6abd vmd: decode videos with no LZ buffer size provided - they might not need it
The buffer is used for an additional pass of frame compression, so videos
can be coded without ever using it (and some are coded so indeed, e.g. in
Woodruff and the Schnibble of Azimuth game).
2013-06-02 19:08:09 +02:00
Kostya Shishkov 0aed0bfc62 vmd: fix mode 3 decoding 2013-06-02 19:07:31 +02:00
Kostya Shishkov de421b2085 use my full first name instead of short one in copyrights 2013-06-01 13:38:50 +02:00
Kostya Shishkov 33f64fd5d5 indeo4: expand allowed quantiser range
Indeo 4 has quantiser range 0-31 instead of 0-23 for Indeo 5, and clipping
quantiser leads to incorrect quantisation and DC prediction on low-quality
videos.

This fixes bug 259.
2013-06-01 06:36:47 +02:00
Kostya Shishkov 0b0953baec proresenc: alpha coding support 2013-05-30 09:23:26 +02:00
Kostya Shishkov 2cf5d29110 indeo4: reuse context block VLC for band instead of defaulting
Currently if no custom block VLC is specified for band, a default block VLC
will be used, while the global block VLC stored in the context should be used
instead.

This fixes decoding of one sample I have.
2013-05-28 14:10:58 +02:00
Kostya Shishkov 6647aa0426 indeo4: add missing Haar and slanted transforms
That involves fixing INV_HAAR4() macro and changing it to work with different
input and output like INV_HAAR8() instead of in-place transform.
2013-05-28 14:08:09 +02:00
Kostya Shishkov 3b03d7e251 dxtory v2 support 2013-05-28 13:35:09 +02:00
Kostya Shishkov 851bc1d6be smacker: assign video frame PTS 2013-05-28 09:03:41 +02:00
Kostya Shishkov 268bb88544 smacker: add a clarification notice about audio decoding 2013-05-28 06:17:08 +02:00
Kostya Shishkov c3c08baefb smacker: fix off-by-one error in palette expanding code 2013-05-27 18:19:08 +02:00
Kostya Shishkov 5f30c6c8ed Revert "smackaud: clip output samples"
Smacker audio uses overflows instead of clipping.

This reverts commit 375ca0aca8.
2013-05-27 18:19:01 +02:00
Kostya Shishkov 0418cbf081 fix scalarproduct_and_madd_int16_altivec() for orders > 16
the second and third sources were incremented only by half of the needed size
2013-05-26 16:10:47 +02:00
Kostya Shishkov e9e5a1bdc7 Monkey's Audio old versions FATE tests 2013-05-24 09:04:18 +02:00
Kostya Shishkov 03ece7b040 proresdec: simplify slice component offsets handling 2013-05-21 09:58:59 +02:00
Kostya Shishkov e45d6222cc Escape 130 FATE test 2013-05-19 07:09:36 +02:00
Kostya Shishkov 8e673efc6f prores: update FATE test to account for alpha plane present in the test sample 2013-05-19 07:09:23 +02:00
Kostya Shishkov cebdedca57 prores: decode alpha plane when it's present 2013-05-18 07:11:34 +02:00
Kostya Shishkov 1232a1647a Apple Intermediate Codec decoder 2013-05-17 06:31:05 +02:00
Kostya Shishkov 56c1b92576 dfa: implement missing TDLT coding method 2013-04-09 18:32:00 +02:00
Kostya Shishkov 472391b9a7 ape: use correct context for the bit table printed in debug 2013-03-27 16:20:08 +01:00
Kostya Shishkov 613a37eca4 ape: 3.80-3.92 decoding support 2013-03-25 18:40:56 +01:00
Kostya ShishkovandLuca Barbato 50c449ac24 iff: validate CMAP palette size
Fixes CVE-2013-2495

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
2013-03-18 10:48:29 +01:00
Kostya Shishkov c42e262513 add support for Monkey's Audio versions from 3.93 2013-03-15 09:50:42 +01:00
Kostya Shishkov 9652d4fcfc ape: provide two additional bytes in buffer for old MAC versions
Range coder in 3.90-3.95 overread two bytes in the final normalize.
2013-03-15 09:50:42 +01:00
Kostya Shishkov b164d66e35 ape: make version-dependent decoding functions called via pointers
This will help in supporting old versions, e.g. version 3.93 uses the same
range coder but different predictor and version 3.82 uses different range
coder and predictor. Also this should not make decoding newer versions slower
by introducing additional checks on versions.
2013-03-15 09:50:42 +01:00
Kostya Shishkov b5f536d24b pnm: add high-bitdepth PGMYUV support for both encoder and decoder 2013-02-23 16:49:22 +01:00
Kostya ShishkovandAnton Khirnov 89f11f498b qtrle: fix the topmost line for 1bit
Signed-off-by: Anton Khirnov <anton@khirnov.net>
CC:libav-stable@libav.org
2013-02-06 10:21:52 +01:00
Kostya ShishkovandAnton Khirnov 685e6f2e39 xxan: properly handle odd heights.
Duplicate the last one or two chroma lines.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
CC:libav-stable@libav.org
2013-02-06 10:21:52 +01:00
Kostya Shishkov 6d93308c0c mss2: reindent after last commit 2012-11-11 16:07:42 +01:00
Kostya ShishkovandDiego Biurrun 38fdf72580 swscale: do not forget to swap data in formats with different endianness
Otherwise during scaling it will try to interpret input in the wrong way and
that leads to the test results disagreeing on different platforms and with
different optimizations.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-10-31 17:53:57 +01:00
Kostya Shishkov 169514c440 indeo3: do not try to output more lines than we can fit
Internally chroma planes have multiple of four height while allocated image
planes might be smaller if CODEC_FLAG_EMU_EDGE is set. Thus we should not
output more lines of chroma than frame can accept.

Also the decoder can be safely switched to direct rendering now.
2012-10-19 07:58:51 +02:00
Kostya Shishkov 8774d58358 bmv: get a new frame on every decode_frame(), so we can use direct rendering 2012-10-19 07:58:51 +02:00
Kostya Shishkov 4dc8c8386e vc1dec: add flush function for WMV9 and VC-1 decoders
CC: libav-stable@libav.org
2012-09-28 07:08:54 +02:00
Kostya Shishkov 04fc5c6bde g723_1: add comfort noise generation 2012-08-30 18:21:12 +02:00
Kostya Shishkov 7627c35a81 vc1: export some functions
This is a preparatory step for the MSS2 decoder which needs to use
the WMV9 decoder to decode some kinds of frames.

From the patch by Alberto Delmás <adelmas@gmail.com>
2012-08-28 07:37:06 +02:00
Kostya Shishkov 0de4a563e4 mss1: move code that will be reused by MSS2 decoder into separate file 2012-08-27 18:12:10 +02:00
Kostya Shishkov 49df339f4b mss1: merge decode_intra() and decode_inter()
They have most of their code in common.
2012-08-27 18:11:50 +02:00
Kostya Shishkov 84f9d78a96 fate: add G.723.1 decoder tests 2012-08-09 19:35:47 +02:00
Kostya Shishkov e78e6c37ef g723_1: clip argument for 15-bit version of normalize_bits()
It expects maximum value to be 32767 but calculations in scale_vector()
which uses this function can give it ABS(-32768) which leads to wrong
result and thus clipping is needed.
2012-08-08 13:24:19 +02:00
Kostya Shishkov f86b2f3661 g723_1: use all LPC vectors in formant postfilter
Due to some mistake LPC vector for the first subframe was used for all
subframes instead of their own LPC vectors.
2012-08-08 13:23:22 +02:00
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